diff --git a/pages/music/music.go b/pages/music/music.go index 061a1d5a..66ced1d2 100644 --- a/pages/music/music.go +++ b/pages/music/music.go @@ -8,6 +8,8 @@ import ( "github.com/animenotifier/notify.moe/components" ) +const maxTracks = 10 + // Get renders the music page. func Get(ctx *aero.Context) string { tracks := []*arn.SoundTrack{} @@ -42,6 +44,10 @@ func Get(ctx *aero.Context) string { CreatedBy: "4J6qpK1ve", }) + if len(tracks) > maxTracks { + tracks = tracks[:maxTracks] + } + sort.Slice(tracks, func(i, j int) bool { return tracks[i].Created > tracks[j].Created }) diff --git a/pages/music/music.scarlet b/pages/music/music.scarlet index f648ed36..66ab4050 100644 --- a/pages/music/music.scarlet +++ b/pages/music/music.scarlet @@ -9,7 +9,7 @@ .sound-track-footer text-align right - margin-bottom content-padding + margin-bottom 1rem font-size 0.9em span