2018-03-19 21:55:55 +00:00
|
|
|
component Editor(url string, score int, scoreTypes map[string]int, user *arn.User)
|
2018-03-09 11:38:46 +00:00
|
|
|
EditorTabs(url)
|
2018-03-09 13:00:33 +00:00
|
|
|
h1.mountable= "Welcome to the Editor Panel, " + user.Nick + "!"
|
|
|
|
|
|
|
|
.feature-cards
|
|
|
|
.feature-card.mountable
|
2018-03-09 21:33:08 +00:00
|
|
|
.feature-card-icon.editor-score= score
|
|
|
|
p.feature-card-text Your contribution score.
|
2018-03-19 21:55:55 +00:00
|
|
|
|
|
|
|
.feature-cards.feature-cards-alternative-color
|
|
|
|
for objectType, score := range scoreTypes
|
|
|
|
.feature-card.mountable
|
|
|
|
.feature-card-icon.editor-score= score
|
|
|
|
p.feature-card-text= objectType
|
2017-10-06 20:07:12 +00:00
|
|
|
|
2018-03-09 11:38:46 +00:00
|
|
|
component EditorTabs(url string)
|
2017-10-06 20:07:12 +00:00
|
|
|
.tabs
|
|
|
|
Tab("Editor", "pencil", "/editor")
|
2018-03-22 21:26:52 +00:00
|
|
|
Tab("MAL", "exchange", "/editor/maldiff/anime")
|
|
|
|
Tab("Kitsu", "exchange", "/editor/kitsu/new/anime")
|
2018-03-22 21:41:45 +00:00
|
|
|
Tab("Anime", "tv", "/editor/anime/mapping/mal")
|
2018-03-22 21:26:52 +00:00
|
|
|
Tab("Companies", "building", "/editor/companies/description")
|
2018-03-07 03:03:15 +00:00
|
|
|
Tab("Search", "search", "/database")
|
2017-10-06 20:07:12 +00:00
|
|
|
|
2018-03-22 21:26:52 +00:00
|
|
|
if strings.Contains(url, "/editor/anime/")
|
2018-03-09 11:38:46 +00:00
|
|
|
.tabs
|
2018-03-22 21:41:45 +00:00
|
|
|
Tab("Mappings", "arrows-h", "/editor/anime/mapping/mal")
|
2018-03-22 21:26:52 +00:00
|
|
|
Tab("Synopsis", "align-left", "/editor/anime/synopsis")
|
|
|
|
Tab("Genres", "clone", "/editor/anime/genres")
|
|
|
|
Tab("Start date", "calendar", "/editor/anime/startdate")
|
|
|
|
Tab("Images", "image", "/editor/anime/image/lowres")
|
|
|
|
|
|
|
|
if strings.Contains(url, "/editor/anime/mapping/")
|
|
|
|
.tabs
|
|
|
|
Tab("MAL", "arrows-h", "/editor/anime/mapping/mal")
|
|
|
|
Tab("Shoboi", "arrows-h", "/editor/anime/mapping/shoboi")
|
|
|
|
Tab("AniList", "arrows-h", "/editor/anime/mapping/anilist")
|
|
|
|
|
|
|
|
if strings.Contains(url, "/editor/anime/image/")
|
|
|
|
.tabs
|
|
|
|
Tab("Low-Res", "image", "/editor/anime/image/lowres")
|
|
|
|
Tab("Ultra Low-Res", "image", "/editor/anime/image/ultralowres")
|
2018-03-09 11:38:46 +00:00
|
|
|
|
|
|
|
//- a.tab.ajax(href="/admin", aria-label="Admin")
|
|
|
|
//- Icon("wrench")
|
|
|
|
//- span.tab-text Admin
|