Improved Article Links
This commit is contained in:
parent
a94852298d
commit
3bd17a4cb5
|
@ -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>
|
||||
|
|
|
@ -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; }
|
||||
|
|
Loading…
Reference in a new issue