Changed forum-tags to tabs

This commit is contained in:
Eduard Urbach 2017-07-03 15:34:50 +02:00
parent db94850ce2
commit e6d18f2e1d
7 changed files with 46 additions and 46 deletions

View File

@ -17,6 +17,7 @@
"input", "input",
"grid", "grid",
"forum", "forum",
"tabs",
"user", "user",
"video", "video",
"loading", "loading",

View File

@ -1,5 +1,5 @@
component ForumTags component ForumTags
.buttons.forum-tags .buttons.tabs
ForumTag("All", "", "list") ForumTag("All", "", "list")
ForumTag("General", "general", "list") ForumTag("General", "general", "list")
ForumTag("News", "news", "list") ForumTag("News", "news", "list")
@ -9,6 +9,6 @@ component ForumTags
ForumTag("Bugs", "bug", "list") ForumTag("Bugs", "bug", "list")
component ForumTag(title string, category string, icon string) component ForumTag(title string, category string, icon string)
a.button.forum-tag.action(href=strings.TrimSuffix("/forum/" + category, "/"), data-action="diff", data-trigger="click") a.button.tab.action(href=strings.TrimSuffix("/forum/" + category, "/"), data-action="diff", data-trigger="click")
Icon(arn.GetForumIcon(category)) Icon(arn.GetForumIcon(category))
span.forum-tag-text= title span.tab-text= title

View File

@ -6,29 +6,6 @@
width 100% width 100%
max-width forum-width max-width forum-width
.forum-tag
color text-color !important
:hover,
&.active
color white !important
background-color forum-tag-hover-color !important
// color text-color !important
// :hover
// color white !important
// &.active
// color white !important
// background-color link-hover-color
< 920px
.forum-tag
.icon
margin-right 0
.forum-tag-text
display none
> 1250px > 1250px
#new-thread #new-thread
position fixed position fixed

View File

@ -36,27 +36,27 @@ func Profile(ctx *aero.Context, viewUser *arn.User) string {
}, func() { }, func() {
animeList = viewUser.AnimeList() animeList = viewUser.AnimeList()
}, func() { }, func() {
threads = viewUser.Threads() // threads = viewUser.Threads()
arn.SortThreadsLatestFirst(threads) // arn.SortThreadsLatestFirst(threads)
if len(threads) > maxPosts { // if len(threads) > maxPosts {
threads = threads[:maxPosts] // threads = threads[:maxPosts]
} // }
}, func() { }, func() {
posts = viewUser.Posts() // posts = viewUser.Posts()
arn.SortPostsLatestFirst(posts) // arn.SortPostsLatestFirst(posts)
if len(posts) > maxPosts { // if len(posts) > maxPosts {
posts = posts[:maxPosts] // posts = posts[:maxPosts]
} // }
}, func() { }, func() {
tracks = viewUser.SoundTracks() // tracks = viewUser.SoundTracks()
arn.SortSoundTracksLatestFirst(tracks) // arn.SortSoundTracksLatestFirst(tracks)
if len(tracks) > maxTracks { // if len(tracks) > maxTracks {
tracks = tracks[:maxTracks] // tracks = tracks[:maxTracks]
} // }
}) })
return ctx.HTML(components.Profile(viewUser, user, animeList, threads, posts, tracks)) return ctx.HTML(components.Profile(viewUser, user, animeList, threads, posts, tracks))

View File

@ -63,10 +63,6 @@
.thread-link-title .thread-link-title
color text-color color text-color
.forum-tags
// justify-content flex-start !important
margin-bottom 1rem
.post-author .post-author
horizontal horizontal
justify-content center justify-content center

View File

@ -83,7 +83,7 @@
.extra-navigation .extra-navigation
display block display block
< 400px height < 380px height
#navigation #navigation
vertical vertical
height 100% height 100%

26
styles/tabs.scarlet Normal file
View File

@ -0,0 +1,26 @@
.tab
color text-color !important
:hover,
&.active
color white !important
background-color forum-tag-hover-color !important
// color text-color !important
// :hover
// color white !important
// &.active
// color white !important
// background-color link-hover-color
< 920px
.tab
.icon
margin-right 0
.tab-text
display none
.tabs
// justify-content flex-start !important
margin-bottom 1rem