From 4a00855233be6a5b4b83750161dc5be4de2230a8 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Thu, 28 Jul 2016 12:02:11 +0000 Subject: [PATCH] done #578 @0.5 --- js/215-home-references.js | 5 +++-- less/215-home-references.less | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/js/215-home-references.js b/js/215-home-references.js index f1d8f6f..fc30d57 100644 --- a/js/215-home-references.js +++ b/js/215-home-references.js @@ -11,8 +11,8 @@ function load_home_references() { var firstColumns = $("section.references .links .reference:lt(9)"); - $("section.references .links .scrollHolder").prepend($(lastColumn).clone()); - $("section.references .links .scrollHolder").append($(firstColumns).clone()); + $("section.references .links .scrollHolder").prepend($(lastColumn).clone().addClass('forinfinite')); + $("section.references .links .scrollHolder").append($(firstColumns).clone().addClass('forinfinite')); $("section.references .links").append('
'); @@ -51,6 +51,7 @@ function resizeHomeReferences(ww, wh) { $(links).css({width: (uw * 2) + marginRight, height: uh * 2}); $(links).find('.arrow').css({width: marginRight, fontSize: ww * 0.05}); + $(links).scrollLeft(0); $(links).find('.reference').each(function () { diff --git a/less/215-home-references.less b/less/215-home-references.less index 5ced45d..2c4b2a5 100644 --- a/less/215-home-references.less +++ b/less/215-home-references.less @@ -9,10 +9,26 @@ section.references { height: 100%; overflow: hidden; + @media @m900 { + overflow-x: scroll; + overflow-y: hidden; + -webkit-overflow-scrolling: touch; + } + .scrollHolder { position: absolute; top: 0; left: 0; + + @media @m900 { + left: 0 !important; + } + } + + .arrows { + @media @m900 { + display: none; + } } .arrow { @@ -80,6 +96,12 @@ section.references { } } } + + &.forinfinite { + @media @m900 { + display: none; + } + } } .img { -- 2.39.5