Added id-refs to article links to automatically scroll to top

This commit is contained in:
Mia Rose Winter 2024-02-13 20:28:22 +01:00
parent 56f067d4f5
commit 336e18d4e1
Signed by: miawinter
GPG key ID: 4B6F6A83178F595E
2 changed files with 2 additions and 2 deletions

View file

@ -6,7 +6,7 @@
<SectionContent SectionName="GlobalHeader">
<header class="bg-secondary text-secondary-content border-b-2 border-current py-6 px-4 md:px-12">
<h1 class="text-3xl lg:text-5xl font-light">
<h1 id="article-title" class="text-3xl lg:text-5xl font-light">
@Article.Title
</h1>
<p>

View file

@ -16,7 +16,7 @@
private string Link =>
Article.PublishDate.Year >= 9999
? $"/article/{Article.Id}"
: $"/{Article.PublishDate.Year}/{Article.PublishDate.Month:D2}/{Article.PublishDate.Day:D2}/{TitleEncoded}";
: $"/{Article.PublishDate.Year}/{Article.PublishDate.Month:D2}/{Article.PublishDate.Day:D2}/{TitleEncoded}#article-title";
[Parameter(CaptureUnmatchedValues = true)]
public Dictionary<string, object>? AdditionalAttributes { get; set; }