From 81720d71980a2bdda55cb41fa0165b7deea15d25 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Tue, 27 Jun 2017 00:35:46 +0200 Subject: [PATCH] Added proper post highlight --- mixins/Postable.pixy | 2 +- pages/dashboard/dashboard.pixy | 2 +- pages/threads/threads.scarlet | 4 ++++ styles/include/config.scarlet | 9 +++++---- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/mixins/Postable.pixy b/mixins/Postable.pixy index 8c165a6d..baf09b73 100644 --- a/mixins/Postable.pixy +++ b/mixins/Postable.pixy @@ -1,5 +1,5 @@ component Postable(post arn.Postable, highlightAuthorID string) - .post.mountable(data-highlight=post.Author().ID == highlightAuthorID) + .post.mountable(id=post.ID(), data-highlight=post.Author().ID == highlightAuthorID) .post-author Avatar(post.Author()) diff --git a/pages/dashboard/dashboard.pixy b/pages/dashboard/dashboard.pixy index 1ad95cac..22a71b50 100644 --- a/pages/dashboard/dashboard.pixy +++ b/pages/dashboard/dashboard.pixy @@ -15,7 +15,7 @@ component Dashboard(posts []*arn.Post, following []*arn.User) h3.widget-title Forums each post in posts - a.widget-element.ajax(href=post.Thread().Link()) + a.widget-element.ajax(href=post.Thread().Link() + "#" + post.ID) .widget-element-text Icon(arn.GetForumIcon(post.Thread().Tags[0])) span= post.Thread().Title diff --git a/pages/threads/threads.scarlet b/pages/threads/threads.scarlet index f6bf9857..da44d2d9 100644 --- a/pages/threads/threads.scarlet +++ b/pages/threads/threads.scarlet @@ -13,6 +13,10 @@ .post-author margin-bottom 0.25rem + + [data-highlight="true"] + .post-content + border 2px solid post-highlight-color > 600px .post diff --git a/styles/include/config.scarlet b/styles/include/config.scarlet index 2e5732d8..1ca8a328 100644 --- a/styles/include/config.scarlet +++ b/styles/include/config.scarlet @@ -1,10 +1,10 @@ // Colors text-color = rgb(60, 60, 60) -main-color = rgb(215, 38, 15) -link-color = main-color +main-color = rgb(248, 165, 130) +link-color = rgb(215, 38, 15) link-hover-color = rgb(242, 60, 30) link-active-color = link-hover-color -post-highlight-color = rgba(248, 165, 130, 0.7) + bg-color = rgb(246, 246, 246) // UI @@ -27,6 +27,7 @@ forum-tag-hover-color = rgb(46, 85, 160) // Forum forum-width = 830px +post-highlight-color = rgba(248, 165, 130, 0.7) // Avatar avatar-size = 50px @@ -35,7 +36,7 @@ avatar-size = 50px nav-color = text-color nav-link-color = rgba(255, 255, 255, 0.5) nav-link-hover-color = white -nav-link-hover-slide-color = rgb(248, 165, 130) +nav-link-hover-slide-color = main-color // nav-color = rgb(245, 245, 245) // nav-link-color = rgb(160, 160, 160) // nav-link-hover-color = rgb(80, 80, 80)