Made blog index landmark elements more accessible (#1578)
* Made blog index landmark elements more accessible * Fixed CSS * Hopefully the CSS actually works now
This commit is contained in:
parent
3e51037262
commit
e9c377b84a
5 changed files with 10 additions and 14 deletions
|
@ -10,10 +10,8 @@ const { post } = Astro.props;
|
|||
<p class="publish-date">{post.publishDate}</p>
|
||||
<a href={post.url}><h1 class="title">{post.title}</h1></a>
|
||||
</header>
|
||||
<main>
|
||||
<p>{post.description}</p>
|
||||
<a href={post.url}>Read more</a>
|
||||
</main>
|
||||
<p>{post.description}</p>
|
||||
<a href={post.url}>Read more</a>
|
||||
</article>
|
||||
|
||||
<style>
|
||||
|
|
|
@ -76,15 +76,15 @@ allPosts = allPosts.sort((a, b) => new Date(b.publishDate).valueOf() - new Date(
|
|||
<body>
|
||||
<BlogHeader />
|
||||
<div class="layout">
|
||||
<article class="content">
|
||||
<main class="content">
|
||||
<section class="intro">
|
||||
<h1 class="latest">{title}</h1>
|
||||
<p>{description}</p>
|
||||
</section>
|
||||
<section>
|
||||
<section aria-label="Blog post list">
|
||||
{allPosts.map(p => <BlogPostPreview post={p} />)}
|
||||
</section>
|
||||
</article>
|
||||
</main>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -14,9 +14,7 @@ const { title, publishDate, href } = Astro.props;
|
|||
<p class="publish-date">{publishDate}</p>
|
||||
<a href={href}><h1 class="title">{title}</h1></a>
|
||||
</header>
|
||||
<main>
|
||||
<slot />{' '}<a href={href}>Read more →</a>
|
||||
</main>
|
||||
<slot />{' '}<a href={href}>Read more →</a>
|
||||
</article>
|
||||
|
||||
<style>
|
||||
|
|
|
@ -61,12 +61,12 @@ let lang = 'en';
|
|||
<body>
|
||||
<BlogHeader />
|
||||
<div class="layout">
|
||||
<article class="content">
|
||||
<main class="content">
|
||||
<section class="intro">
|
||||
<h1 class="latest">The Astro Blog</h1>
|
||||
<p>{description}</p>
|
||||
</section>
|
||||
<section>
|
||||
<section aria-label="Blog post list">
|
||||
<BlogPostPreview title="Astro 0.21 Preview: Vite + WASM = ⚡️" publishDate="October 6, 2021" href="/blog/astro-021-preview">
|
||||
<span>Get a sneak preview of what's next for Astro, including our new Vite build engine and WASM-powered Go compiler.</span>
|
||||
</BlogPostPreview>
|
||||
|
@ -95,7 +95,7 @@ let lang = 'en';
|
|||
<span>We're excited to announce Astro as a new way to build static websites and deliver lightning-fast performance without sacrificing a modern developer experience.</span>
|
||||
</BlogPostPreview>
|
||||
</section>
|
||||
</article>
|
||||
</main>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -116,7 +116,7 @@ body {
|
|||
gap: 1em;
|
||||
}
|
||||
|
||||
.layout > article {
|
||||
.layout > :is(main,article) {
|
||||
grid-column: 2;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue