diff options
author | 2022-09-20 12:32:27 +0000 | |
---|---|---|
committer | 2022-09-20 12:32:27 +0000 | |
commit | 4d1b1b583bb9be37f5fafe23baa6b700cb205702 (patch) | |
tree | f812d9c88d976364ac2e608db994dad647431512 | |
parent | c84d85ba4d85f250d87bbc98c74665992f6c2768 (diff) | |
download | astro-4d1b1b583bb9be37f5fafe23baa6b700cb205702.tar.gz astro-4d1b1b583bb9be37f5fafe23baa6b700cb205702.tar.zst astro-4d1b1b583bb9be37f5fafe23baa6b700cb205702.zip |
[ci] format
Diffstat (limited to '')
-rw-r--r-- | examples/deno/astro.config.mjs | 8 | ||||
-rw-r--r-- | examples/deno/src/components/Layout.astro | 87 | ||||
-rw-r--r-- | examples/deno/src/pages/index.astro | 32 |
3 files changed, 69 insertions, 58 deletions
diff --git a/examples/deno/astro.config.mjs b/examples/deno/astro.config.mjs index 71783d132..1a5c7f32c 100644 --- a/examples/deno/astro.config.mjs +++ b/examples/deno/astro.config.mjs @@ -1,9 +1,9 @@ import { defineConfig } from 'astro/config'; -import deno from "@astrojs/deno"; +import deno from '@astrojs/deno'; // https://astro.build/config export default defineConfig({ - output: "server", - adapter: deno() -});
\ No newline at end of file + output: 'server', + adapter: deno(), +}); diff --git a/examples/deno/src/components/Layout.astro b/examples/deno/src/components/Layout.astro index b8fc659fe..fc0995154 100644 --- a/examples/deno/src/components/Layout.astro +++ b/examples/deno/src/components/Layout.astro @@ -8,48 +8,47 @@ const { title } = Astro.props as Props; <!DOCTYPE html> <html lang="en"> -<head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width"> - <link rel="icon" type="image/x-icon" href="/favicon.ico" /> - <title>{title}</title> -</head> -<body> - <slot /> -</body> + <head> + <meta charset="UTF-8" /> + <meta name="viewport" content="width=device-width" /> + <link rel="icon" type="image/x-icon" href="/favicon.ico" /> + <title>{title}</title> + </head> + <body> + <slot /> + <style> + :root { + --font-size-base: clamp(1rem, 0.34vw + 0.91rem, 1.19rem); + --font-size-lg: clamp(1.2rem, 0.7vw + 1.2rem, 1.5rem); + --font-size-xl: clamp(2.44rem, 2.38vw + 1.85rem, 3rem); + + --color-text: hsl(12, 5%, 4%); + --color-bg: hsl(10, 21%, 95%); + } + + html { + font-family: system-ui, sans-serif; + font-size: var(--font-size-base); + color: var(--color-text); + background-color: var(--color-bg); + } + + body { + margin: 0; + } + + :global(h1) { + font-size: var(--font-size-xl); + } + + :global(h2) { + font-size: var(--font-size-lg); + } + + :global(code) { + font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, + Bitstream Vera Sans Mono, Courier New, monospace; + } + </style> + </body> </html> - -<style> - :root { - --font-size-base: clamp(1rem, 0.34vw + 0.91rem, 1.19rem); - --font-size-lg: clamp(1.2rem, 0.7vw + 1.2rem, 1.5rem); - --font-size-xl: clamp(2.44rem, 2.38vw + 1.85rem, 3rem); - - --color-text: hsl(12, 5%, 4%); - --color-bg: hsl(10, 21%, 95%); - } - - html { - font-family: system-ui, sans-serif; - font-size: var(--font-size-base); - color: var(--color-text); - background-color: var(--color-bg); - } - - body { - margin: 0; - } - - :global(h1) { - font-size: var(--font-size-xl); - } - - :global(h2) { - font-size: var(--font-size-lg); - } - - :global(code) { - font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, - Bitstream Vera Sans Mono, Courier New, monospace; - } -</style> diff --git a/examples/deno/src/pages/index.astro b/examples/deno/src/pages/index.astro index 2a0bf7d07..19e358c77 100644 --- a/examples/deno/src/pages/index.astro +++ b/examples/deno/src/pages/index.astro @@ -5,7 +5,10 @@ import Layout from '../components/Layout.astro'; <Layout title="Welcome to Astro (on Deno)."> <main> <h1>Welcome to <span class="text-gradient">Astro</span> on Deno</h1> - <p class="instructions"><strong>Your first mission:</strong> tweak this message to try our hot module reloading. Check the <code>src/pages</code> directory!</p> + <p class="instructions"> + <strong>Your first mission:</strong> tweak this message to try our hot module reloading. Check + the <code>src/pages</code> directory! + </p> <ul role="list" class="link-card-grid"> <li class="link-card"> <a href="https://astro.build/integrations/"> @@ -39,7 +42,9 @@ import Layout from '../components/Layout.astro'; fill="currentColor" > <title>heart</title> - <path d="M256 448l-30.164-27.211C118.718 322.442 48 258.61 48 179.095 48 114.221 97.918 64 162.4 64c36.399 0 70.717 16.742 93.6 43.947C278.882 80.742 313.199 64 349.6 64 414.082 64 464 114.221 464 179.095c0 79.516-70.719 143.348-177.836 241.694L256 448z" /> + <path + d="M256 448l-30.164-27.211C118.718 322.442 48 258.61 48 179.095 48 114.221 97.918 64 162.4 64c36.399 0 70.717 16.742 93.6 43.947C278.882 80.742 313.199 64 349.6 64 414.082 64 464 114.221 464 179.095c0 79.516-70.719 143.348-177.836 241.694L256 448z" + ></path> </svg> </p> </a> @@ -51,9 +56,15 @@ import Layout from '../components/Layout.astro'; <style> :root { --color-border: hsl(17, 24%, 90%); - --astro-gradient: linear-gradient(0deg,#4F39FA, #DA62C4); - --link-gradient: linear-gradient(45deg, #4F39FA, #DA62C4 30%, var(--color-border) 60%); - --night-sky-gradient: linear-gradient(0deg, #392362 -33%, #431f69 10%, #30216b 50%, #1f1638 100%); + --astro-gradient: linear-gradient(0deg, #4f39fa, #da62c4); + --link-gradient: linear-gradient(45deg, #4f39fa, #da62c4 30%, var(--color-border) 60%); + --night-sky-gradient: linear-gradient( + 0deg, + #392362 -33%, + #431f69 10%, + #30216b 50%, + #1f1638 100% + ); } h2 { @@ -75,7 +86,7 @@ import Layout from '../components/Layout.astro'; main { margin: auto; - padding: 1em; + padding: 1em; max-width: 60ch; } @@ -83,7 +94,7 @@ import Layout from '../components/Layout.astro'; font-weight: 900; background-image: var(--astro-gradient); -webkit-background-clip: text; - -webkit-text-fill-color: transparent; + -webkit-text-fill-color: transparent; background-size: 100% 200%; background-position-y: 100%; border-radius: 0.4rem; @@ -91,7 +102,8 @@ import Layout from '../components/Layout.astro'; } @keyframes pulse { - 0%, 100% { + 0%, + 100% { background-position-y: 0%; } 50% { @@ -142,7 +154,7 @@ import Layout from '../components/Layout.astro'; } .link-card:is(:hover, :focus-within) h2 { - color: #4F39FA; + color: #4f39fa; } .link-card:is(:hover, :focus-within) h2 span { @@ -151,7 +163,7 @@ import Layout from '../components/Layout.astro'; .heart { display: inline-block; - color: #DA62C4; + color: #da62c4; animation: heartbeat 3s ease-in-out infinite; } |