add: 添加对于子路径的支持

This commit is contained in:
2024-02-15 20:21:52 +08:00
parent 2bfd65735f
commit c067f11be7
8 changed files with 33 additions and 23 deletions

View File

@@ -40,7 +40,7 @@
@foreach (KeyValuePair<string, BlogEssay> pair in group)
{
<div class="archive-item">
<a href="/essays/@(pair.Key)" target="_blank">
<a href="essays/@(pair.Key)" target="_blank">
<FluentStack Orientation="@Orientation.Horizontal">
<FluentLabel Typo="@Typography.H5" Style="width: 80px">
@(pair.Value.PublishTime.ToString("MM-dd"))

View File

@@ -74,51 +74,51 @@
HorizontalGap="20">
@if (Page != 1)
{
<a href="/?page=@(Page - 1)#blog-content" class="pagination-item">
<a href="./?page=@(Page - 1)#blog-content" class="pagination-item">
<i class="chevron-left"></i>
</a>
}
@if (Page == 1)
{
<a href="/?page=1#blog-content" class="pagination-item">
<a href="./?page=1#blog-content" class="pagination-item">
<span>1</span>
</a>
<a href="/?page=2#blog-content" class="pagination-item">
<a href="./?page=2#blog-content" class="pagination-item">
<span>2</span>
</a>
<a href="/?page=3#blog-content" class="pagination-item">
<a href="./?page=3#blog-content" class="pagination-item">
<span>3</span>
</a>
}
else if (Page == _pageCount)
{
<a href="/?page=@(_pageCount - 2)#blog-content" class="pagination-item">
<a href="./?page=@(_pageCount - 2)#blog-content" class="pagination-item">
<span>@(_pageCount - 2)</span>
</a>
<a href="/?page=@(_pageCount - 1)#blog-content" class="pagination-item">
<a href="./?page=@(_pageCount - 1)#blog-content" class="pagination-item">
<span>@(_pageCount - 1)</span>
</a>
<a href="/?page=@(_pageCount)#blog-content" class="pagination-item">
<a href="./?page=@(_pageCount)#blog-content" class="pagination-item">
<span>@(_pageCount)</span>
</a>
}
else
{
<a href="/?page=@(Page - 1)#blog-content" class="pagination-item">
<a href="./?page=@(Page - 1)#blog-content" class="pagination-item">
<span>@(Page - 1)</span>
</a>
<a href="/?page=@(Page)#blog-content" class="pagination-item">
<a href="./?page=@(Page)#blog-content" class="pagination-item">
<span>@(Page)</span>
</a>
<a href="/?page=@(Page + 1)#blog-content" class="pagination-item">
<a href="./?page=@(Page + 1)#blog-content" class="pagination-item">
<span>@(Page + 1)</span>
</a>
}
@if (Page != _pageCount)
{
<a href="/?page=@(Page + 1)#blog-content" class="pagination-item">
<a href="./?page=@(Page + 1)#blog-content" class="pagination-item">
<i class="chevron-right"></i>
</a>
}

View File

@@ -33,7 +33,7 @@
@foreach (KeyValuePair<string, int> pair in EssayContentInstance.Tags)
{
<div class="tag-item">
<a href="/tags?TagName=@(pair.Key)">
<a href="tags?TagName=@(pair.Key)">
<span style="font-size: @(14 + pair.Value)px; color: @(RandomColor())">
@pair.Key
</span>
@@ -52,7 +52,7 @@
{
<div style="margin: 0 4% 0 4%">
<div class="tag-essay-item">
<a href="/essays/@(essay.FileName)" target="_blank">
<a href="essays/@(essay.FileName)" target="_blank">
<FluentStack Orientation="@Orientation.Horizontal">
<FluentLabel Typo="@Typography.H5" Style="width: 120px">
@(essay.PublishTime.ToString("yyyy-MM-dd"))