Preliminary responsive slider

This commit is contained in:
James Barnsley
2017-01-11 21:54:20 +13:00
parent 0540ff621e
commit e4b8b8bde6
3 changed files with 31 additions and 5 deletions

View File

@ -506,7 +506,7 @@ export function getDiscover(){
var favorite_tracks_uris = helpers.asURIs(response.items)
favorite_tracks_uris = favorite_tracks_uris.sort(() => .5 - Math.random())
favorite_tracks_uris = favorite_tracks_uris.slice(0,10)
favorite_tracks_uris = favorite_tracks_uris.slice(0,3)
for (var i = 0; i < favorite_tracks_uris.length; i++){

View File

@ -1,12 +1,16 @@
.grid-slider-wrapper {
padding-bottom: 40px;
padding-bottom: 10px;
.grid-slider {
position: relative;
overflow-x: scroll;
overflow-x: hidden;
overflow-y: hidden;
height: 220px;
height: 22vw;
.has-touch-events & {
overflow-x: scroll;
}
.liner {
position: absolute;
@ -20,5 +24,21 @@
margin: 0 0.5% !important;
}
}
}
}
@include responsive( $bp_medium ){
.grid-slider {
height: 21vw;
}
}
@include responsive( 500px ){
.grid-slider {
height: 40vw;
.liner {
width: 666.6667%;
}
}
}
}

View File

@ -3,4 +3,10 @@
section {
padding: 40px;
}
@include responsive( $bp_medium ){
section {
padding: 20px;
}
}
}