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