|
| 1 | +--- |
| 2 | +export interface Props { |
| 3 | + title: string; |
| 4 | +} |
| 5 | +
|
| 6 | +const { title } = Astro.props; |
| 7 | +--- |
| 8 | + |
| 9 | +<!DOCTYPE html> |
| 10 | +<html lang="en"> |
| 11 | + <head> |
| 12 | + <meta charset="UTF-8" /> |
| 13 | + <meta name="viewport" content="width=device-width" /> |
| 14 | + <link rel="icon" type="image/svg+xml" href="/favicon.svg" /> |
| 15 | + <meta name="generator" content={Astro.generator} /> |
| 16 | + <title>{title}</title> |
| 17 | + </head> |
| 18 | + <body> |
| 19 | + <slot /> |
| 20 | + </body> |
| 21 | +</html> |
| 22 | +<style> |
| 23 | + :root { |
| 24 | + --font-size-base: clamp(1rem, 0.34vw + 0.91rem, 1.19rem); |
| 25 | + --font-size-lg: clamp(1.2rem, 0.7vw + 1.2rem, 1.5rem); |
| 26 | + --font-size-xl: clamp(2.44rem, 2.38vw + 1.85rem, 3.75rem); |
| 27 | + |
| 28 | + --color-text: hsl(12, 5%, 4%); |
| 29 | + --color-bg: hsl(10, 21%, 95%); |
| 30 | + --color-border: hsl(17, 24%, 90%); |
| 31 | + } |
| 32 | + |
| 33 | + html { |
| 34 | + font-family: system-ui, sans-serif; |
| 35 | + font-size: var(--font-size-base); |
| 36 | + color: var(--color-text); |
| 37 | + background-color: var(--color-bg); |
| 38 | + } |
| 39 | + |
| 40 | + body { |
| 41 | + margin: 0; |
| 42 | + } |
| 43 | + |
| 44 | + |
| 45 | +</style> |
| 46 | + |
| 47 | +<style is:global> |
| 48 | + h1 { |
| 49 | + font-size: var(--font-size-xl); |
| 50 | + } |
| 51 | + |
| 52 | + h2 { |
| 53 | + font-size: var(--font-size-lg); |
| 54 | + } |
| 55 | + |
| 56 | + code { |
| 57 | + font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, |
| 58 | + Bitstream Vera Sans Mono, Courier New, monospace; |
| 59 | + } |
| 60 | +</style> |
0 commit comments