chore: cleanup

This commit is contained in:
limited_dev 2023-02-03 11:33:56 +01:00
parent 0e725b065a
commit f5ac34e639
17 changed files with 67 additions and 3 deletions

View file

@ -0,0 +1,6 @@
@page "/faq"
<h3>FAQ</h3>
@code {
}

View file

@ -0,0 +1,40 @@
@page "/"
@using ImageBoardServerApp.Data.Repository
@using ImageBoardServerApp.Auth
@inject AuthenticationStateProvider authStateProvider
<h1>BulletBoard</h1>
<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>
<br/>
<span>@Details</span>
@code{
private string Details { get; set; }
private int amountOfPosts = -1;
private int amountOfComments = -1;
private int amountOfUsers = -1;
protected override async Task OnInitializedAsync()
{
var cauthStateProvder = (CustomAuthenticationStateProvider)authStateProvider;
var user = await cauthStateProvder.GetAuthenticationStateAsync();
if (user.User.Identity.IsAuthenticated)
{
var usr = user.User.Identity.Name;
Details = $"Welcome {usr}";
}
else
{
Details = "Please log in first.";
}
var posts = await PostsRepository.getPostsAsync();
amountOfPosts = posts.Count;
var comments = await CommentsRepository.getCommentsAsync();
amountOfComments = comments.Count;
var users = await UsersRepository.getUsersAsync();
amountOfUsers = users.Count;
}
}

View file

@ -0,0 +1,14 @@
.loginlink{
display: block;
font-size: 10px;
color: #c6cfd0;
}
.imblue{
color: #0a53be;
cursor: pointer;
}
.loginwrapper{
display: flex;
}

View file

@ -0,0 +1,20 @@
@page "/rules"
<div class="rules_headline">
<h3>Rules</h3>
</div>
<ul type="1" class="rules_list">
<li>You may not post stuff that would get us into trouble with the feds.</li>
<li>You may not post NSFW / NSFL on this platform.</li>
<li>You may not post political content on this platform.</li>
<li>You may not plan or participate in "raids" on this platform.</li>
<li>You have to be atleast 18 years old to post.</li>
<li>You may not post through VPNs, Proxies or the TOR network.</li>
<li>You may not post posts, which are not of the same topic as the target board.</li>
</ul>
@code {
}

View file

@ -0,0 +1,13 @@
.rules_headline{
text-align: center;
font-weight: 1000;
/*the text have to be in a biger Pixel number I do not know how to do it */
}
.rules_list{
text-align:left;
display:block;
font-size: 14px;
font-weight: 60 ;
/*the text sice can stay like it is, if you do not want to change it.*/
}