Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
💄 Display the trailers with a better visual and responsive.
Browse files Browse the repository at this point in the history
  • Loading branch information
soulcramer committed Oct 10, 2018
1 parent 201e18d commit d7fb490
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 21 deletions.
9 changes: 4 additions & 5 deletions pages/anime/trailers.pixy
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
component AnimeTrailers(anime *arn.Anime, user *arn.User)
h1.mountable
a(href=anime.Link())= anime.Title.ByUser(user)
if anime.Trailers != nil && len(anime.Trailers) > 0
.anime-section.mountable
h3.anime-section-name
a(href=anime.TrailersLink()) Trailers

.trailers.anime-trailers
.anime-trailers
each trailer in anime.Trailers
if trailer.ServiceID != ""
.trailer.mountable(data-mountable-type="trailer")
.anime-trailer.video-container
//iframe.video(src="https://www.youtube.com/embed/" + trailer.ServiceID + "?showinfo=0", allowfullscreen)
ExternalMedia(trailer)
iframe.lazy(data-src=trailer.EmbedLink(), allowfullscreen)
27 changes: 11 additions & 16 deletions pages/anime/trailers.scarlet
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
.anime-trailers
vertical
horizontal-wrap
justify-content space-around
.trailer
margin 1rem 0
border-bottom-left-radius ui-element-border-radius !important
border-top-left-radius ui-element-border-radius !important
box-shadow shadow-light
min-height 200px
min-height 180px
border-radius ui-element-border-radius
width 320px
overflow hidden
display flex

iframe
width 100%

>
500px
.anime-trailers
horizontal-wrap
justify-content flex-start
> 500px
.anime-trailers
justify-content flex-start

.trailer
max-width 200px
margin calc(content-padding / 2)
min-height 112px
height 112px
margin soundtrack-margin
margin-bottom media-bottom-margin
.trailer
margin calc(content-padding / 2)
margin-bottom media-bottom-margin

0 comments on commit d7fb490

Please sign in to comment.