This commit is contained in:
2017-11-04 17:11:47 +01:00
parent b12c4130ba
commit 28da13e8f0
11 changed files with 90 additions and 47 deletions

View File

@ -75,6 +75,10 @@ func Get(ctx *aero.Context) string {
return !track.IsDraft && len(track.Media) > 0 && arn.Contains(track.Tags, "anime:"+anime.ID)
})
sort.Slice(tracks, func(i, j int) bool {
return tracks[i].Title < tracks[j].Title
})
if err != nil {
return ctx.Error(http.StatusNotFound, "Error fetching soundtracks", err)
}

View File

@ -11,7 +11,7 @@
margin-top 1rem
flex-basis 300px
> 1500px
> 1400px
.anime
horizontal
@ -44,6 +44,32 @@
.anime-info-value
text-align right
.anime-soundtracks
vertical
margin-top 1rem
.anime-soundtrack
vertical
width 100%
margin-bottom 0.5rem
> 500px
.anime-soundtracks
horizontal-wrap
justify-content flex-start
margin-top 0
.anime-soundtrack
max-width 200px
margin calc(content-padding / 2)
// .anime-soundtracks
// horizontal-wrap
// .anime-soundtrack
// flex-basis 400px
// padding-bottom video-padding
.anime-section
margin-top 1rem

View File

@ -1,7 +1,7 @@
component AnimeCharacters(anime *arn.Anime)
//- AnimeTabs(anime)
if len(anime.Characters().Items) > 0
if anime.Characters() != nil && len(anime.Characters().Items) > 0
.anime-section
h3.anime-section-name Characters
.characters

View File

@ -6,4 +6,7 @@ component AnimeTracks(anime *arn.Anime, tracks []*arn.SoundTrack)
h3.anime-section-name Tracks
.anime-soundtracks
each track in tracks
ExternalMedia(track.Media[0])
.anime-soundtrack.mountable(data-mountable-type="track")
.video-container
iframe.video.lazy(data-src=track.Media[0].EmbedLink(), allowfullscreen="allowfullscreen")
a.sound-track-footer.ajax(href=track.Link())= track.Title

View File

@ -29,6 +29,11 @@
flex 1
clip-long-text
a
color text-color
:hover
color link-hover-color
.anime-list-item-episodes
horizontal
justify-content flex-end

View File

@ -73,24 +73,6 @@ component Settings(user *arn.User)
Icon("circle-o")
span Not connected
.widget.mountable
h3.widget-title
Icon("download")
span Import
ImportLists(user)
.widget.mountable
h3.widget-title
Icon("upload")
span Export
.widget-section
label JSON:
a.button(href="/api/animelist/" + user.ID)
Icon("upload")
span Export anime list as JSON
.widget.mountable
h3.widget-title
Icon("puzzle-piece")
@ -113,6 +95,24 @@ component Settings(user *arn.User)
a.button(href="https://www.youtube.com/watch?v=opyt4cw0ep8", target="_blank", rel="noopener")
Icon("android")
span Get the Android App
.widget.mountable
h3.widget-title
Icon("download")
span Import
ImportLists(user)
.widget.mountable
h3.widget-title
Icon("upload")
span Export
.widget-section
label JSON:
a.button(href="/api/animelist/" + user.ID)
Icon("upload")
span Export anime list as JSON
.widget.mountable(data-api="/api/settings/" + user.ID)
h3.widget-title
@ -138,6 +138,21 @@ component Settings(user *arn.User)
.profile-image-container.avatar-preview
img.profile-image.mountable(src=strings.Replace(user.Settings().Avatar.SourceURL, "http://", "https://", 1), alt="Avatar preview")
.widget.mountable(data-api="/api/settings/" + user.ID)
h3.widget-title
Icon("font")
span Formatting
.widget-section
label(for="TitleLanguage")= "Title language:"
select.widget-ui-element.action(id="TitleLanguage", data-field="TitleLanguage", value=user.Settings().TitleLanguage, title="Language of anime titles", data-action="save", data-trigger="change")
option(value="canonical") Canonical
option(value="english") English
option(value="romaji") Romaji
option(value="japanese") 日本語
InputNumber("Format.RatingsPrecision", float64(user.Settings().Format.RatingsPrecision), "Ratings precision", "How many decimals after the comma would you like to display in ratings on anime pages?", "0", "2", "1")
.widget.mountable(data-api="/api/settings/" + user.ID)
h3.widget-title
Icon("star")
@ -158,22 +173,6 @@ component Settings(user *arn.User)
a.button.ajax(href="/shop")
Icon("star")
span Go PRO
.widget.mountable(data-api="/api/settings/" + user.ID)
h3.widget-title
Icon("font")
span Formatting
.widget-section
label(for="TitleLanguage")= "Title language:"
select.widget-ui-element.action(id="TitleLanguage", data-field="TitleLanguage", value=user.Settings().TitleLanguage, title="Language of anime titles", data-action="save", data-trigger="change")
option(value="canonical") Canonical
option(value="english") English
option(value="romaji") Romaji
option(value="japanese") 日本語
InputNumber("Format.RatingsPrecision", float64(user.Settings().Format.RatingsPrecision), "Ratings precision", "How many decimals after the comma would you like to display in ratings on anime pages?", "0", "2", "1")
//- .widget.mountable(data-api="/api/settings/" + user.ID)
//- h3.widget-title