-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
96f6090
commit f4803e0
Showing
8 changed files
with
253 additions
and
154 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,52 @@ | ||
import { css } from "hono/css"; | ||
import type { FC } from "hono/jsx"; | ||
|
||
const cardLayout = css` | ||
padding: 1rem; | ||
border-radius: 0.5rem; | ||
border: 1px solid transparent; | ||
text-align: center; | ||
&:hover { | ||
border: 1px solid rgb(209 213 219); | ||
background-color: rgb(243 244 246); | ||
transition: all; | ||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); | ||
} | ||
@media (prefers-color-scheme: dark) { | ||
&:hover { | ||
background-color: rgba(38, 38, 38, 0.3); | ||
border: 1px solid rgb(38 38 38); | ||
} | ||
} | ||
@media screen and (min-width: 1024px) { | ||
text-align: left; | ||
} | ||
`; | ||
|
||
const labelClass = css` | ||
font-size: 24px; | ||
font-weight: 600; | ||
margin-bottom: 0.75rem; | ||
@media (prefers-color-scheme: dark) { | ||
color: white; | ||
} | ||
`; | ||
|
||
const valueClass = css` | ||
font-size: 14px; | ||
opacity: 0.5; | ||
@media (prefers-color-scheme: dark) { | ||
color: white; | ||
} | ||
`; | ||
|
||
export type Card = { label: string; value?: string | number }; | ||
|
||
const Card: FC<Card> = ({ label, value }: Card) => { | ||
return ( | ||
<div class={cardLayout}> | ||
<div class={labelClass}>{label}</div> | ||
<div class={valueClass}>{value}</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Card; | ||
import { css } from "hono/css"; | ||
import type { FC } from "hono/jsx"; | ||
|
||
const cardLayout = css` | ||
padding: 1rem; | ||
border-radius: 0.5rem; | ||
border: 1px solid transparent; | ||
text-align: center; | ||
&:hover { | ||
border: 1px solid rgb(209 213 219); | ||
background-color: rgb(243 244 246); | ||
transition: all; | ||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); | ||
} | ||
@media (prefers-color-scheme: dark) { | ||
&:hover { | ||
background-color: rgba(38, 38, 38, 0.3); | ||
border: 1px solid rgb(38 38 38); | ||
} | ||
} | ||
@media screen and (min-width: 1024px) { | ||
text-align: left; | ||
} | ||
`; | ||
|
||
const labelClass = css` | ||
font-size: 24px; | ||
font-weight: 600; | ||
margin-bottom: 0.75rem; | ||
@media (prefers-color-scheme: dark) { | ||
color: white; | ||
} | ||
`; | ||
|
||
const valueClass = css` | ||
font-size: 14px; | ||
opacity: 0.5; | ||
@media (prefers-color-scheme: dark) { | ||
color: white; | ||
} | ||
`; | ||
|
||
export type Card = { label: string; value?: string | number }; | ||
|
||
export const Card: FC<Card> = ({ label, value }: Card) => { | ||
return ( | ||
<div class={cardLayout}> | ||
<div class={labelClass}>{label}</div> | ||
<div class={valueClass}>{value}</div> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,52 @@ | ||
import { Style, css } from "hono/css"; | ||
import type { FC, PropsWithChildren } from "hono/jsx"; | ||
|
||
const globalClasses = css` | ||
font-family: "Inter", sans-serif; | ||
font-optical-sizing: auto; | ||
font-weight: 400; | ||
font-style: normal; | ||
font-variation-settings: "slnt" 0; | ||
background: linear-gradient(to bottom, transparent, rgb(255, 255, 255)) | ||
rgb(214, 219, 220); | ||
margin: 0; | ||
@media (prefers-color-scheme: dark) { | ||
background: linear-gradient(to bottom, transparent, rgb(0, 0, 0)) | ||
rgb(0, 0, 0); | ||
} | ||
`; | ||
|
||
const mainClass = css` | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
max-width: 1024; | ||
margin: 0 auto; | ||
flex-direction: column; | ||
height: 79vh; | ||
padding: 3rem; | ||
@media screen and (min-width: 1024px) { | ||
padding: 6rem; | ||
} | ||
`; | ||
|
||
const Layout: FC<PropsWithChildren> = (props: PropsWithChildren) => { | ||
return ( | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin /> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Inter:[email protected]&display=swap" | ||
rel="stylesheet" | ||
/> | ||
<Style /> | ||
</head> | ||
<body class={globalClasses}> | ||
<main class={mainClass}>{props.children}</main> | ||
</body> | ||
</html> | ||
); | ||
}; | ||
|
||
export default Layout; | ||
import { Style, css } from "hono/css"; | ||
import type { FC, PropsWithChildren } from "hono/jsx"; | ||
|
||
const globalClasses = css` | ||
font-family: "Inter", sans-serif; | ||
font-optical-sizing: auto; | ||
font-weight: 400; | ||
font-style: normal; | ||
font-variation-settings: "slnt" 0; | ||
background: linear-gradient(to bottom, transparent, rgb(255, 255, 255)) | ||
rgb(214, 219, 220); | ||
margin: 0; | ||
@media (prefers-color-scheme: dark) { | ||
background: linear-gradient(to bottom, transparent, rgb(0, 0, 0)) | ||
rgb(0, 0, 0); | ||
} | ||
`; | ||
|
||
const mainClass = css` | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
max-width: 1024; | ||
margin: 0 auto; | ||
flex-direction: column; | ||
height: 79vh; | ||
padding: 3rem; | ||
@media screen and (min-width: 1024px) { | ||
padding: 6rem; | ||
} | ||
`; | ||
|
||
export const Layout: FC<PropsWithChildren> = (props: PropsWithChildren) => { | ||
return ( | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin /> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Inter:[email protected]&display=swap" | ||
rel="stylesheet" | ||
/> | ||
<Style /> | ||
</head> | ||
<body class={globalClasses}> | ||
<main class={mainClass}>{props.children}</main> | ||
</body> | ||
</html> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
{ | ||
"version": "0.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"vercel-build": "echo 🔥" | ||
}, | ||
"dependencies": { | ||
"@hono/node-server": "^1.8.2", | ||
"hono": "^4.1.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.