From 87656c18c1ed8c20b5650cf04b54d649df5fb4fc Mon Sep 17 00:00:00 2001 From: limited_dev Date: Mon, 10 Apr 2023 19:19:55 +0200 Subject: [PATCH] feat: stop showing Other on rules page, changed from postsids to GETs for identification for the user, changed the colorsheme to dracula Signed-off-by: limited_dev --- ImageBoardServerApp/Pages/Basic/Rules.razor | 5 ++- .../Pages/Basic/ThreadPage.razor | 6 +-- .../Shared/Components/Comment.razor | 45 ++++++++++++++++++- .../Shared/Components/Comment.razor.css | 20 +++++---- .../Shared/Components/CommentHover.razor.css | 22 +++++---- .../Shared/Components/Post.razor | 6 +-- .../Shared/Components/Post.razor.css | 18 +++++--- .../Shared/MainLayout.razor.css | 10 ++--- 8 files changed, 94 insertions(+), 38 deletions(-) diff --git a/ImageBoardServerApp/Pages/Basic/Rules.razor b/ImageBoardServerApp/Pages/Basic/Rules.razor index 21ca8e6..279a49f 100644 --- a/ImageBoardServerApp/Pages/Basic/Rules.razor +++ b/ImageBoardServerApp/Pages/Basic/Rules.razor @@ -5,7 +5,10 @@ diff --git a/ImageBoardServerApp/Pages/Basic/ThreadPage.razor b/ImageBoardServerApp/Pages/Basic/ThreadPage.razor index e35d125..8f860ac 100644 --- a/ImageBoardServerApp/Pages/Basic/ThreadPage.razor +++ b/ImageBoardServerApp/Pages/Basic/ThreadPage.razor @@ -3,9 +3,9 @@ @using ImageBoardServerApp.Data.Repository @inject NavigationManager NavigationManager -#@threadId on /@boardName/ - BulletBoard +Thread #@post.GET on /@boardName/ - BulletBoard -

Thread #@threadId on /@boardName/

+

Thread #@post.GET on /@boardName/


@@ -33,7 +33,7 @@ { try { - post = await PostsRepository.getPostByGETAsync(boardName, int.Parse(threadId)); + post = await PostsRepository.getPostByIdAsync(int.Parse(threadId)); } catch (FormatException fe) { diff --git a/ImageBoardServerApp/Shared/Components/Comment.razor b/ImageBoardServerApp/Shared/Components/Comment.razor index a43af9f..644688c 100644 --- a/ImageBoardServerApp/Shared/Components/Comment.razor +++ b/ImageBoardServerApp/Shared/Components/Comment.razor @@ -1,6 +1,6 @@ -@using System.Text.RegularExpressions @using ImageBoardServerApp.Auth @using ImageBoardServerApp.Data.Repository +@using System.Text.RegularExpressions @using System.ComponentModel.DataAnnotations @inject AuthenticationStateProvider authStateProvider @@ -53,7 +53,7 @@ > @line - @if (hoveringOver.p != -1 && hoveringOver == (x, y, commentNumber)) + @if (hoveringOver.p != -1 && hoveringOver == (x, y, commentNumber) && (hoverComment.ContainsKey(commentNumber) || hoverPost.ContainsKey(commentNumber))) { @if (isComment[commentNumber]) { @@ -85,6 +85,43 @@
[ Delete + ] [ Report @@ -106,6 +143,10 @@ private void onHover(int x, int y, int p) { + if (hoverComment.ContainsKey(p) || hoverPost.ContainsKey(p)) + { + hoveringOver= (x, y, -1); + } hoveringOver = (x, y, p); } diff --git a/ImageBoardServerApp/Shared/Components/Comment.razor.css b/ImageBoardServerApp/Shared/Components/Comment.razor.css index d6a2065..4600449 100644 --- a/ImageBoardServerApp/Shared/Components/Comment.razor.css +++ b/ImageBoardServerApp/Shared/Components/Comment.razor.css @@ -1,23 +1,27 @@ .toggleOpened{ - color: #0a58ca; + color: #6272a4; text-decoration: none; } .toggleOpened:hover{ - color: #0a58ca; !important; + color: #6272a4; !important; cursor: pointer; } +.threadFooter.a{ + color: #6272a4; +} + .title{ - color: #1e5aaf; + color: #8be9fd; } .name{ - color: #339305; + color: #50fa7b; } .redText { - color: #da1313; + color: #ff5555; } @@ -36,7 +40,7 @@ } .greenText{ - color: #3caf03; + color: #50fa7b; } .threadImage{ @@ -67,9 +71,9 @@ .Admin{ - color: #ff191c; + color: #ff5555; } .Mod{ - color: #af13d7; + color: #bd93f9; } \ No newline at end of file diff --git a/ImageBoardServerApp/Shared/Components/CommentHover.razor.css b/ImageBoardServerApp/Shared/Components/CommentHover.razor.css index 0398886..4600449 100644 --- a/ImageBoardServerApp/Shared/Components/CommentHover.razor.css +++ b/ImageBoardServerApp/Shared/Components/CommentHover.razor.css @@ -1,23 +1,27 @@ .toggleOpened{ - color: #0a58ca; + color: #6272a4; text-decoration: none; } .toggleOpened:hover{ - color: #0a58ca; !important; + color: #6272a4; !important; cursor: pointer; } +.threadFooter.a{ + color: #6272a4; +} + .title{ - color: #1e5aaf; + color: #8be9fd; } .name{ - color: #339305; + color: #50fa7b; } .redText { - color: #da1313; + color: #ff5555; } @@ -36,7 +40,7 @@ } .greenText{ - color: #3caf03; + color: #50fa7b; } .threadImage{ @@ -51,7 +55,7 @@ width: 100%; } -.threadImage img:hover{ +.threadImage img.active{ /*transform: scale(3);*/ max-width:500px; width: 100%; @@ -67,9 +71,9 @@ .Admin{ - color: #ff191c; + color: #ff5555; } .Mod{ - color: #af13d7; + color: #bd93f9; } \ No newline at end of file diff --git a/ImageBoardServerApp/Shared/Components/Post.razor b/ImageBoardServerApp/Shared/Components/Post.razor index 271ba8a..c5f81b3 100644 --- a/ImageBoardServerApp/Shared/Components/Post.razor +++ b/ImageBoardServerApp/Shared/Components/Post.razor @@ -1,7 +1,7 @@ -@using System.Text.RegularExpressions -@using ImageBoardServerApp.Data.Repository +@using ImageBoardServerApp.Data.Repository @using ImageBoardServerApp.Auth @using System.ComponentModel.DataAnnotations +@using System.Text.RegularExpressions @inject AuthenticationStateProvider authStateProvider @inject NavigationManager navigationManager; @@ -104,7 +104,7 @@ @if (showOpenThread) { [ - (@post.Comments.Count) View Thread + (@post.Comments.Count) View Thread ] } else diff --git a/ImageBoardServerApp/Shared/Components/Post.razor.css b/ImageBoardServerApp/Shared/Components/Post.razor.css index 3672759..f507cb1 100644 --- a/ImageBoardServerApp/Shared/Components/Post.razor.css +++ b/ImageBoardServerApp/Shared/Components/Post.razor.css @@ -1,27 +1,27 @@ .toggleOpened{ - color: #0a58ca; + color: #6272a4; text-decoration: none; } .toggleOpened:hover{ - color: #0a58ca; !important; + color: #6272a4; !important; cursor: pointer; } .title{ - color: #1e5aaf; + color: #8be9fd; } .name{ - color: #339305; + color: #50fa7b; } .Admin{ - color: #ff191c; + color: #ff5555; } .Mod{ - color: #af13d7; + color: #bd93f9; } .threadHeader{ @@ -33,13 +33,17 @@ align-self: end; !important; } +.threadFooter.a{ + color: #6272a4; +} + .threadContent{ text-align: left; display: flex; } .greenText{ - color: #3caf03; + color: #50fa7b; } .threadImage{ diff --git a/ImageBoardServerApp/Shared/MainLayout.razor.css b/ImageBoardServerApp/Shared/MainLayout.razor.css index f3fa437..3d21ab5 100644 --- a/ImageBoardServerApp/Shared/MainLayout.razor.css +++ b/ImageBoardServerApp/Shared/MainLayout.razor.css @@ -6,8 +6,8 @@ main { flex: 1; - background-color: #1b1d1e; - color: #dcdcdc; + background-color: #282a36; + color: #f8f8f2; padding: 0; margin: 0; } @@ -18,13 +18,13 @@ main { .top-row { - border-bottom: 1px solid #d6d5d5; + border-bottom: 1px solid #f8f8f2; justify-content: flex-end; height: 3.5rem; display: flex; align-items: center; - background-color: #1f2223; - color: #dcdcdc; + background-color: #282a36; + color: #f8f8f2; } .top-row a {