This commit is contained in:
parent
81c890471c
commit
f52af26f31
2 changed files with 13 additions and 57 deletions
|
|
@ -22,35 +22,24 @@ const poems = posts.map((post) => ({
|
|||
dateLabel: formatDate.format(post.data.pubDate),
|
||||
searchText: `${post.data.title} ${post.data.description}`.toLowerCase(),
|
||||
}));
|
||||
|
||||
const recentPoems = poems.slice(0, 3);
|
||||
---
|
||||
|
||||
<DefaultLayout title={SITE_TITLE} description={SITE_DESCRIPTION}>
|
||||
<section class="poetry-home">
|
||||
<div class="poetry-home-panel">
|
||||
<div class="poetry-home-chrome" aria-hidden="true">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</div>
|
||||
|
||||
<header class="poetry-home-header">
|
||||
<div>
|
||||
<p class="poetry-home-kicker">{ACTIVE_BLOG_SITE.description}</p>
|
||||
<h1>{ACTIVE_BLOG_SITE.title}</h1>
|
||||
</div>
|
||||
<h1>{ACTIVE_BLOG_SITE.title}</h1>
|
||||
|
||||
<form class="poetry-search" data-poem-search-form role="search">
|
||||
<label class="sr-only" for="poem-search">Search poems</label>
|
||||
<label class="sr-only" for="poem-search">Search</label>
|
||||
<input
|
||||
id="poem-search"
|
||||
data-poem-search-input
|
||||
type="search"
|
||||
autocomplete="off"
|
||||
placeholder="Search poems"
|
||||
placeholder="Search"
|
||||
/>
|
||||
<button type="submit" aria-label="Search poems">
|
||||
<button type="submit" aria-label="Search">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true">
|
||||
<circle cx="11" cy="11" r="6.5"></circle>
|
||||
<path d="m16 16 4 4"></path>
|
||||
|
|
@ -60,20 +49,7 @@ const recentPoems = poems.slice(0, 3);
|
|||
</header>
|
||||
|
||||
<div class="poetry-home-grid">
|
||||
<section class="poetry-recent" aria-labelledby="recent-poems">
|
||||
<h2 id="recent-poems">Recent</h2>
|
||||
<ol>
|
||||
{recentPoems.map((poem) => (
|
||||
<li>
|
||||
<time>{poem.dateLabel}</time>
|
||||
<a href={poem.href}>{poem.title}</a>
|
||||
</li>
|
||||
))}
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<section class="poetry-archive" aria-labelledby="all-poems">
|
||||
<h2 id="all-poems">All Poems</h2>
|
||||
<section class="poetry-archive" aria-label="Poem archive">
|
||||
<ol data-poem-list>
|
||||
{poems.map((poem) => (
|
||||
<li data-poem-row data-search={poem.searchText}>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue