feat: added dead link to Board Page, added PageTitle to DeadLink page

Signed-off-by: limited_dev <loginakkisativ@gmail.com>
This commit is contained in:
limited_dev 2023-06-08 23:33:54 +02:00
parent ee9219b9ac
commit 7a3830aef3
2 changed files with 9 additions and 3 deletions

View file

@ -1,6 +1,7 @@
@page "/{boardTag}/" @page "/{boardTag}/"
@using ImageBoardServerApp.Data.Repository
@using System.ComponentModel.DataAnnotations @using System.ComponentModel.DataAnnotations
@using ImageBoardServerApp.Data.Repository
@inject NavigationManager navManager
<Board board="@m"/> <Board board="@m"/>
@ -16,6 +17,10 @@
protected override async Task OnParametersSetAsync() protected override async Task OnParametersSetAsync()
{ {
m = await BoardsRepository.getBoardByTagAsync(boardTag); m = await BoardsRepository.getBoardByTagAsync(boardTag);
if (m == null)
{
navManager.NavigateTo("/sys/dead");
}
} }
} }

View file

@ -1,7 +1,8 @@
@page "/sys/dead" @page "/sys/dead"
<h3>DeadLink</h3> <PageTitle>Dead Link - Bulletboards</PageTitle>
<h3>404 - Nothing at this address.</h3>
<img class="deadlink" src="img/static/deadlink/1.png" alt="Img is dead as well"/> <img class="deadlink" src="img/static/deadlink/1.png" alt="Img is dead as well"/>
<span>This link is dead.</span> <span>Seems like this link is dead.</span>
<br/> <br/>
<a href="/">Return home</a> <a href="/">Return home</a>