From d67489d1cb93c91ca24d2d50333ee03cfa4fcd51 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Mon, 23 Apr 2018 12:18:53 +0200 Subject: [PATCH] Added characters to editor panel --- layout/sidebar/sidebar.pixy | 3 +-- pages/characters/characters.pixy | 2 +- pages/characters/characters.scarlet | 3 +++ pages/editor/editor.pixy | 7 +++++++ pages/editor/editor.scarlet | 3 +++ 5 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 pages/characters/characters.scarlet diff --git a/layout/sidebar/sidebar.pixy b/layout/sidebar/sidebar.pixy index 316b0279..81b72c69 100644 --- a/layout/sidebar/sidebar.pixy +++ b/layout/sidebar/sidebar.pixy @@ -37,8 +37,6 @@ component Sidebar(user *arn.User) SidebarButton("AMVs", "/amvs", "video-camera") SidebarButton("Soundtracks", "/soundtracks", "headphones") SidebarButton("Quotes", "/quotes", "quote-left") - if user != nil && (user.Role == "editor" || user.Role == "admin") - SidebarButton("Characters", "/characters", "child") SidebarButton("Companies", "/companies", "building") SidebarButton("Users", "/users", "globe") @@ -57,6 +55,7 @@ component Sidebar(user *arn.User) //- SidebarButton("Statistics", "/statistics", "pie-chart") //- SidebarButton("Companies", "/companies", "building") //- SidebarButton("Genres", "/genres", "clone") + //- SidebarButton("Characters", "/characters", "child") .spacer diff --git a/pages/characters/characters.pixy b/pages/characters/characters.pixy index b40a6e49..eb7db9cc 100644 --- a/pages/characters/characters.pixy +++ b/pages/characters/characters.pixy @@ -14,7 +14,7 @@ component Characters(characters []*arn.Character, nextIndex int, tag string, use Icon("pencil") span Edit draft - #load-more-target.characters.characters-page + #load-more-target.characters-page CharactersScrollable(characters, user) if nextIndex != -1 diff --git a/pages/characters/characters.scarlet b/pages/characters/characters.scarlet new file mode 100644 index 00000000..ed577c1c --- /dev/null +++ b/pages/characters/characters.scarlet @@ -0,0 +1,3 @@ +.characters-page + horizontal-wrap + justify-content center \ No newline at end of file diff --git a/pages/editor/editor.pixy b/pages/editor/editor.pixy index dab19e2b..b9e3f164 100644 --- a/pages/editor/editor.pixy +++ b/pages/editor/editor.pixy @@ -8,6 +8,13 @@ component Editor(url string, score int, scoreTitle string, scoreTypes map[string .feature-card-text p Anime p.editor-score= stringutils.Plural(scoreTypes["Anime"], "contribution") + + a.feature-card.mountable(href="/characters") + .feature-card-icon.feature-card-color-character + RawIcon("child") + .feature-card-text + p Characters + p.editor-score= stringutils.Plural(scoreTypes["Character"], "contribution") a.feature-card.mountable(href="/editor/soundtracks/links") .feature-card-icon.feature-card-color-soundtrack diff --git a/pages/editor/editor.scarlet b/pages/editor/editor.scarlet index dd99724a..7cef4142 100644 --- a/pages/editor/editor.scarlet +++ b/pages/editor/editor.scarlet @@ -22,6 +22,9 @@ .feature-card-color-company background hsl(150, feature-card-saturation, feature-card-lightness) !important +.feature-card-color-character + background hsl(273, feature-card-saturation, feature-card-lightness) !important + > 1550px .editor-filters position fixed