Added proper post highlight

This commit is contained in:
Eduard Urbach 2017-06-27 00:35:46 +02:00
parent 7c5d0bbcff
commit 81720d7198
4 changed files with 11 additions and 6 deletions

View File

@ -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())

View File

@ -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

View File

@ -13,6 +13,10 @@
.post-author
margin-bottom 0.25rem
[data-highlight="true"]
.post-content
border 2px solid post-highlight-color
> 600px
.post

View File

@ -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)