chore: cleanup
This commit is contained in:
parent
0e725b065a
commit
f5ac34e639
17 changed files with 67 additions and 3 deletions
6
ImageBoardServerApp/Pages/Basic/FAQ.razor
Normal file
6
ImageBoardServerApp/Pages/Basic/FAQ.razor
Normal file
|
@ -0,0 +1,6 @@
|
|||
@page "/faq"
|
||||
<h3>FAQ</h3>
|
||||
|
||||
@code {
|
||||
|
||||
}
|
40
ImageBoardServerApp/Pages/Basic/Index.razor
Normal file
40
ImageBoardServerApp/Pages/Basic/Index.razor
Normal 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;
|
||||
}
|
||||
|
||||
}
|
14
ImageBoardServerApp/Pages/Basic/Index.razor.css
Normal file
14
ImageBoardServerApp/Pages/Basic/Index.razor.css
Normal file
|
@ -0,0 +1,14 @@
|
|||
.loginlink{
|
||||
display: block;
|
||||
font-size: 10px;
|
||||
color: #c6cfd0;
|
||||
}
|
||||
|
||||
.imblue{
|
||||
color: #0a53be;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.loginwrapper{
|
||||
display: flex;
|
||||
}
|
20
ImageBoardServerApp/Pages/Basic/Rules.razor
Normal file
20
ImageBoardServerApp/Pages/Basic/Rules.razor
Normal 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 {
|
||||
|
||||
}
|
13
ImageBoardServerApp/Pages/Basic/Rules.razor.css
Normal file
13
ImageBoardServerApp/Pages/Basic/Rules.razor.css
Normal 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.*/
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue