Style improvements
This commit is contained in:
parent
5357d669cf
commit
00996de045
@ -11,7 +11,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const maxEpisodes = 26
|
const maxEpisodes = 26
|
||||||
const maxEpisodesLongSeries = 10
|
const maxEpisodesLongSeries = 12
|
||||||
const maxDescriptionLength = 170
|
const maxDescriptionLength = 170
|
||||||
|
|
||||||
// Get anime page.
|
// Get anime page.
|
||||||
@ -25,15 +25,9 @@ func Get(ctx *aero.Context) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
episodes := anime.Episodes().Items
|
episodes := anime.Episodes().Items
|
||||||
// episodesReversed := false
|
|
||||||
|
|
||||||
if len(episodes) > maxEpisodes {
|
if len(episodes) > maxEpisodes {
|
||||||
// episodesReversed = true
|
episodes = anime.Episodes().LastReversed(maxEpisodesLongSeries)
|
||||||
episodes = episodes[len(episodes)-maxEpisodesLongSeries:]
|
|
||||||
|
|
||||||
for i, j := 0, len(episodes)-1; i < j; i, j = i+1, j-1 {
|
|
||||||
episodes[i], episodes[j] = episodes[j], episodes[i]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Friends watching
|
// Friends watching
|
||||||
@ -64,11 +58,7 @@ func Get(ctx *aero.Context) string {
|
|||||||
relations := anime.Relations()
|
relations := anime.Relations()
|
||||||
|
|
||||||
if relations != nil {
|
if relations != nil {
|
||||||
items := relations.Items
|
relations.SortByStartDate()
|
||||||
|
|
||||||
sort.Slice(items, func(i, j int) bool {
|
|
||||||
return items[i].Anime().StartDate < items[j].Anime().StartDate
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Soundtracks
|
// Soundtracks
|
||||||
|
@ -73,6 +73,9 @@
|
|||||||
margin-bottom 0.5rem
|
margin-bottom 0.5rem
|
||||||
min-width 200px
|
min-width 200px
|
||||||
|
|
||||||
|
.video-container
|
||||||
|
box-shadow shadow-light
|
||||||
|
|
||||||
> 500px
|
> 500px
|
||||||
.anime-soundtracks
|
.anime-soundtracks
|
||||||
horizontal-wrap
|
horizontal-wrap
|
||||||
|
@ -4,17 +4,23 @@
|
|||||||
> 700px
|
> 700px
|
||||||
.episodes
|
.episodes
|
||||||
horizontal-wrap
|
horizontal-wrap
|
||||||
justify-content space-around
|
justify-content flex-start
|
||||||
|
|
||||||
.episode
|
.episode
|
||||||
vertical
|
vertical
|
||||||
flex 0
|
flex 0
|
||||||
flex-basis 200px
|
flex-basis 190px
|
||||||
margin 0.5rem
|
margin 0.5rem
|
||||||
padding 0.5rem
|
padding 0.5rem
|
||||||
overflow hidden
|
overflow hidden
|
||||||
|
border ui-border
|
||||||
border-radius ui-element-border-radius
|
border-radius ui-element-border-radius
|
||||||
color text-color
|
color text-color
|
||||||
|
box-shadow shadow-light
|
||||||
|
|
||||||
|
[data-available="false"]
|
||||||
|
&.mounted
|
||||||
|
opacity 0.25 !important
|
||||||
|
|
||||||
:hover
|
:hover
|
||||||
color text-color
|
color text-color
|
||||||
|
@ -4,7 +4,7 @@ component AnimeEpisodes(anime *arn.Anime, episodes []*arn.AnimeEpisode, user *ar
|
|||||||
h3.anime-section-name Episodes
|
h3.anime-section-name Episodes
|
||||||
.episodes
|
.episodes
|
||||||
each episode in episodes
|
each episode in episodes
|
||||||
a.episode.ajax.mountable(href=anime.Link() + "/episode/" + strconv.Itoa(episode.Number), data-mountable-type="episode")
|
a.episode.ajax.mountable(href=anime.Link() + "/episode/" + strconv.Itoa(episode.Number), data-mountable-type="episode", data-available=episode.Available())
|
||||||
.episode-number
|
.episode-number
|
||||||
if episode.Number != -1
|
if episode.Number != -1
|
||||||
span= episode.Number
|
span= episode.Number
|
||||||
|
Loading…
Reference in New Issue
Block a user