2023-01-18 12:56:24 +00:00
|
|
|
@page "/"
|
2023-01-26 12:04:55 +00:00
|
|
|
@using ImageBoardServerApp.Data.Repository
|
2023-01-18 12:56:24 +00:00
|
|
|
|
|
|
|
<h1>BulletBoard</h1>
|
2023-01-26 12:04:55 +00:00
|
|
|
<span>This is a simple Imageboard made in Razor.</span>
|
|
|
|
<br/>
|
|
|
|
<span>We're currently hosting @amountOfPosts Threads with @amountOfComments Comments from @amountOfUsers Users.</span>
|
2023-01-27 20:15:50 +00:00
|
|
|
<br/>
|
|
|
|
<div class="loginwrapper">
|
|
|
|
<span class="loginlink">If you are a member of the server team please log in</span>
|
|
|
|
<span> </span>
|
|
|
|
<a class="loginlink imblue" href="/login">[here]</a>
|
|
|
|
<span class="loginlink">.</span>
|
|
|
|
</div>
|
2023-01-26 12:04:55 +00:00
|
|
|
|
|
|
|
@code{
|
|
|
|
private int amountOfPosts = -1;
|
|
|
|
private int amountOfComments = -1;
|
|
|
|
private int amountOfUsers = -1;
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
|
|
{
|
|
|
|
var posts = await PostsRepository.getPostsAsync();
|
|
|
|
amountOfPosts = posts.Count;
|
|
|
|
var comments = await CommentsRepository.getCommentsAsync();
|
|
|
|
amountOfComments = comments.Count;
|
|
|
|
var users = await UsersRepository.getUsersAsync();
|
|
|
|
amountOfUsers = users.Count;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|