diff options
Diffstat (limited to 'src/pages/micro/index.astro')
| -rw-r--r-- | src/pages/micro/index.astro | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/pages/micro/index.astro b/src/pages/micro/index.astro new file mode 100644 index 0000000..7393216 --- /dev/null +++ b/src/pages/micro/index.astro @@ -0,0 +1,54 @@ +--- +import BaseHead from '../../components/BaseHead.astro'; +import Header from '../../components/Header.astro'; +import Footer from '../../components/Footer.astro'; +import { SITE_TITLE, SITE_DESCRIPTION } from '../../consts'; +import { getCollection } from 'astro:content'; +import FormattedDate from '../../components/FormattedDate.astro'; + +const posts = (await getCollection('micro')).sort( + (a, b) => a.data.pubDate.valueOf() - b.data.pubDate.valueOf() +); +--- + +<!DOCTYPE html> +<html lang="en"> + <head> + <BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} /> + <style> + ul { + list-style-type: none; + padding: unset; + } + ul li { + display: flex; + } + ul li :global(time) { + flex: 0 0 130px; + font-style: italic; + color: #646464; + } + ul li a:visited { + color: #8e32dc; + } + </style> + </head> + <body> + <Header /> + <main> + <section> + <ul> + { + posts.map((post) => ( + <li> + <FormattedDate date={post.data.pubDate} /> + <a href={`/micro/${post.slug}/`}>{post.data.title}</a> + </li> + )) + } + </ul> + </section> + </main> + <Footer /> + </body> +</html> |
