Merge pull request #207 from soulcramer/add_editor_tools_anime_edit_page

Add editor tools to the anime edit page
This commit is contained in:
2019-03-11 09:50:41 +09:00
committed by GitHub
8 changed files with 116 additions and 4 deletions

View File

@ -3,10 +3,23 @@ component EditAnimeTabs(anime *arn.Anime)
a.tab(href=anime.Link())
Icon("tv")
span Anime
Tab("Edit", "pencil", anime.Link() + "/edit")
Tab("Images", "image", anime.Link() + "/edit/images")
Tab("Characters", "users", anime.Link() + "/edit/characters")
Tab("Relations", "exchange", anime.Link() + "/edit/relations")
Tab("Episodes", "list-ol", anime.Link() + "/edit/episodes")
Tab("History", "history", anime.Link() + "/edit/history")
Tab("History", "history", anime.Link() + "/edit/history")
.search-links
a.search-link.google-badge.tip(href="https://www.google.com/search?q=" + anime.Title.Canonical, target="_blank", rel="noopener", aria-label="Google")
RawIcon("google")
a.search-link.annilist-badge.tip(href="https://anilist.co/search/anime?sort=SEARCH_MATCH&search=" + anime.Title.Canonical, target="_blank", rel="noopener", aria-label="Annilist")
RawIcon("annilist")
a.search-link.mal-badge.tip(href="https://myanimelist.net/anime.php?q=" + anime.Title.Canonical, target="_blank", rel="noopener", aria-label="MyAnimeList")
RawIcon("mal")
a.search-link.shoboi-badge.tip(href="http://cal.syoboi.jp/find?type=quick&sd=1&kw=" + anime.Title.Japanese, target="_blank", rel="noopener", aria-label="Shoboi")
RawIcon("shoboi")
a.search-link.tip(href="https://www.google.com/search?q=" + anime.Title.Canonical + " anime cover&tbm=isch&tbs=imgo:1,isz:lt,islt:qsvga", target="_blank", rel="noopener", aria-label="Cover image")
RawIcon("image")
a.search-link.tip(href="https://www.youtube.com/results?search_query=" + strings.Replace(anime.Title.Canonical+" PV", " ", "+", -1), target="_blank", rel="noopener", aria-label="Trailer")
RawIcon("youtube-full-color")

View File

@ -25,6 +25,54 @@
.feature-card-color-character
background hsl(273, feature-card-saturation, feature-card-lightness) !important
.search-links
position fixed
top 25%
left 95%
vertical
width fit-content
// This is a copy of the .badge style, but the position:absolute broke the layout
.search-link
horizontal
justify-content center
align-items center
background reverse-light-color
border-radius 50%
padding 0.5rem
color text-color
width 30px
height 30px
position relative
margin-top 0.2em
margin-bottom 0.2em
:hover
color text-color
background reverse-light-hover-color
:active
transform scale(1.2)
.google-badge,.shoboi-badge
background rgba(255, 255, 255, 0.80) !important
:hover
background rgba(255, 255, 255, 1) !important
.annilist-badge
background rgba(31, 38, 49, 0.80) !important
:hover
background rgba(31, 38, 49, 1) !important
.mal-badge
background rgba(46, 81, 181, 0.80) !important
:hover
background rgba(46, 81, 181, 1) !important
> 1550px
.editor-filters
position fixed

View File

@ -14,7 +14,7 @@ func AniList(ctx *aero.Context) string {
return anime.GetMapping("anilist/anime") == ""
},
func(anime *arn.Anime) string {
return "https://anilist.co/search?type=anime&q=" + anime.Title.Canonical
return "https://anilist.co/search/anime?sort=SEARCH_MATCH&search=" + anime.Title.Canonical
},
)
}