diff options
Diffstat (limited to 'www/src/pages/blog/index.astro')
-rw-r--r-- | www/src/pages/blog/index.astro | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/www/src/pages/blog/index.astro b/www/src/pages/blog/index.astro deleted file mode 100644 index be8201cd7..000000000 --- a/www/src/pages/blog/index.astro +++ /dev/null @@ -1,84 +0,0 @@ ---- -import BaseHead from '../../components/BaseHead.astro'; -import BlogHeader from '../../components/BlogHeader.astro'; -import BlogPostPreview from '../../components/BlogPostPreview.astro'; - -let title = 'Astro Blog'; -let description = 'Everything you need to know about Astro, direct from mission control.'; -let permalink = 'https://astro.build/blog'; -let lang = 'en'; - -const posts = Astro.fetchContent('../../data/blog-posts/*.md').sort((a, b) => new Date(b.publishDate) - new Date(a.publishDate)); ---- - -<html lang={lang ?? 'en'}> - <head> - <BaseHead {title} {description} canonicalURL={permalink} /> - <link rel="stylesheet" href={Astro.resolve('../../scss/blog.scss')} /> - - <style> - body { - width: 100%; - display: grid; - grid-template-rows: 3.5rem 1fr; - --gutter: 0.5rem; - --doc-padding: 2rem; - } - - header { - width: 100%; - height: 100%; - background-color: var(--theme-bg-offset); - display: flex; - align-items: center; - justify-content: center; - } - - .content { - margin-top: 4rem; - margin-bottom: 8rem; - } - - .content :global(main > * + *) { - margin-top: 1rem; - } - - .intro { - padding-bottom: 4rem; - margin-bottom: 2rem; - border-bottom: 4px solid var(--theme-divider); - } - - .intro > * { - margin: 0; - } - - .latest { - font-size: 2.5rem; - font-weight: 700; - } - </style> - </head> - - <body> - <BlogHeader /> - <div class="layout"> - <main class="content"> - <section class="intro"> - <h1 class="latest">The Astro Blog</h1> - <p>{description}</p> - </section> - <section aria-label="Blog post list"> - {posts.map((p) => { - const href = `/blog/${p.file.pathname.split('/').pop().split('.').shift()}`; - return ( - <BlogPostPreview title={p.title} publishDate={p.publishDate} href={href}> - <span>{p.description}</span> - </BlogPostPreview> - ); - })} - </section> - </main> - </div> - </body> -</html> |