bulletboards/ImageBoardServerApp/Pages/Basic/Index.razor

61 lines
2 KiB
Text
Raw Permalink Normal View History

2023-01-18 12:56:24 +00:00
@page "/"
@using ImageBoardServerApp.Util
@using ImageBoardServerApp.Data.Repository
2023-02-02 07:15:43 +00:00
@inject AuthenticationStateProvider authStateProvider
2023-01-18 12:56:24 +00:00
<h1>BulletBoards @ver</h1>
<p>
This is a simple <a href="https://en.wiktionary.org/wiki/imageboard">imageboard</a> made in <a href="https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blazor">Razor Server</a>.
<br/>
This project was made by Pierre, Jennifer and Eric.
<br/>
This project is licensed under the <a href="https://www.gnu.org/licenses/gpl-3.0.en.html#license-text">GPL-3.0</a>.
<br/>
Click <a href="https://www.gnu.org/philosophy/free-sw.en.html">here</a> to learn more about free software.
<br/>
Check out the project on <a href="https://git.limited-dev.de/eric/imageboard">GitLab</a>.
<br>
<br/>
We're currently @amountOfUsers users, viewing @amountOfPosts post with @amountOfComments comment.
<br/>
Click here to:
<AuthorizeView>
<Authorized>
<a href="/sys/you">Edit your account information</a>
</Authorized>
<NotAuthorized>
<a href="/sys/register">Create an account to start posting</a>
<a>
&emsp;
</a>
or
<a>&emsp;</a>
<a href="/sys/login">Log into your account</a>
</NotAuthorized>
</AuthorizeView>
<br/>
<br/>
<img src="img/static/sys/qr.png" alt="QR CODE"/>
</p>
@code{
private int amountOfPosts = -1;
private int amountOfComments = -1;
private int amountOfUsers = -1;
public string ver { get; set; } = TheManager.version;
protected override async Task OnParametersSetAsync()
{
var posts = await PostsRepository.getPostsAsync();
amountOfPosts = posts.Count;
var comments = await CommentsRepository.getCommentsAsync();
amountOfComments = comments.Count;
var users = await UsersRepository.getUsersAsync();
amountOfUsers = users.Count;
await base.OnParametersSetAsync();
}
}