Improved tracks on the user profile

This commit is contained in:
Eduard Urbach 2017-06-27 18:43:13 +02:00
parent 8727ab63eb
commit de9e743067
4 changed files with 32 additions and 9 deletions

View File

@ -11,11 +11,13 @@ component Music(tracks []*arn.SoundTrack)
SoundTrack(track)
component SoundTrack(track *arn.SoundTrack)
.sound-track(id=track.ID)
a.sound-track-anime-link.ajax(href="/anime/" + track.MainAnime().ID)
img.sound-track-anime-image.lazy(data-src=track.MainAnime().Image.Small, alt=track.MainAnime().Title.Canonical, title=track.MainAnime().Title.Canonical)
.sound-track.mountable(id=track.ID)
.sound-track-content
a.sound-track-anime-link.ajax(href="/anime/" + track.MainAnime().ID)
img.sound-track-anime-image.lazy(data-src=track.MainAnime().Image.Small, alt=track.MainAnime().Title.Canonical, title=track.MainAnime().Title.Canonical)
iframe.lazy(data-src="https://w.soundcloud.com/player/?url=https://api.soundcloud.com/tracks/" + track.Media[0].ServiceID + "?auto_play=false&hide_related=true&show_comments=true&show_user=true&show_reposts=false&visual=true")
iframe.lazy(data-src="https://w.soundcloud.com/player/?url=https://api.soundcloud.com/tracks/" + track.Media[0].ServiceID + "?auto_play=false&hide_related=true&show_comments=true&show_user=true&show_reposts=false&visual=true")
.sound-track-footer
span posted by
a.ajax(href=track.CreatedByUser().Link())= track.CreatedByUser().Nick
.sound-track-footer
span posted by
a.ajax(href=track.CreatedByUser().Link())= track.CreatedByUser().Nick

View File

@ -2,6 +2,9 @@
vertical
.sound-track
vertical
.sound-track-content
horizontal
iframe

View File

@ -9,7 +9,7 @@ import (
)
const maxPosts = 5
const maxTracks = 5
const maxTracks = 4
// Get user profile page.
func Get(ctx *aero.Context) string {

View File

@ -90,4 +90,22 @@ profile-boot-duration = 2s
// Categories
.profile-category
margin-bottom content-padding
margin-bottom content-padding
.sound-tracks
horizontal-wrap
justify-content space-around
.sound-track-anime-link
display none
.sound-track
flex 1
flex-basis 500px
padding 1rem
> 800px
.profile-category
.sound-tracks
.sound-track-anime-link
display block