Take the page heading from the Markdown body, not a separate <h1>

This commit is contained in:
tleininger committed 2026-09-24 14:26:35 +02:00
1 parent e242eaf79a
commit 01d25eb04b
3 files changed
+3 -15

No files matched your search

@@ -8,10 +8,7 @@
else if (_page is not null)
{
<PageTitle>@_page.Title</PageTitle>
<article>
<h1>@_page.Title</h1>
@Body
</article>
<article>@Body</article>
<PageEmbeds Embed="_page.Embed" />
}
@* No page and not unavailable: the slug was unknown; NavigationManager.NotFound()
@@ -12,12 +12,9 @@ else if (_post is not null)
<a href="/posts">&larr; Alle Beiträge</a>
</nav>
<article>
<header>
<h1>@_post.Title</h1>
<time class="post-meta" datetime="@_post.Date.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture)">
@_post.Date.ToString("d. MMMM yyyy", Cultures.German)
</time>
</header>
@Body
</article>
}
@@ -1,13 +1,7 @@
.post-meta {
display: flex;
justify-content: space-between;
align-items: baseline;
gap: 1rem;
margin-bottom: 1rem;
}
.post-meta time {
display: block;
color: var(--color-text-soft); /* token, so it adapts in dark mode */
font-size: 0.85rem;
margin-top: 1.5rem; /* space from the "all posts" link above */
margin-bottom: 0.25rem; /* keep the body close below */
}