Improved Article Links

This commit is contained in:
Mia Rose Winter 2024-02-14 15:06:16 +01:00
parent a94852298d
commit 3bd17a4cb5
Signed by: miawinter
GPG key ID: 4B6F6A83178F595E
2 changed files with 3 additions and 3 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 id="article-title" class="text-3xl lg:text-5xl font-light">
<h1 class="text-3xl lg:text-5xl font-light">
@Article.Title
</h1>
<p>

View file

@ -2,7 +2,7 @@
@using System.Net
@using System.Web
<a href="@Link" @attributes="AdditionalAttributes">
<a href="@Link" target="_top" @attributes="AdditionalAttributes">
@ChildContent
</a>
@ -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-title";
: $"/{Article.PublishDate.Year}/{Article.PublishDate.Month:D2}/{Article.PublishDate.Day:D2}/{TitleEncoded}";
[Parameter(CaptureUnmatchedValues = true)]
public Dictionary<string, object>? AdditionalAttributes { get; set; }