From 72d70421ac7ec141a8a820c23cec54507b411dee Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sun, 25 Nov 2018 23:20:01 +0100 Subject: mobile css --- docs/js/shards.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'docs/js/shards.js') diff --git a/docs/js/shards.js b/docs/js/shards.js index 6512e70..28abca0 100644 --- a/docs/js/shards.js +++ b/docs/js/shards.js @@ -19,10 +19,12 @@ const shards = (function(){ document.querySelector('h1').addEventListener('click', () => { sounds.play('click') rebuild() + site.navigateHash('') + player.hidePlaylist() }) } function build(){ - count = choice([5,7,7,11,11,13,13]) + count = choice(is_mobile ? [5,7] : [5,7,7,11,11]) light = cielab.gradient(count) dark = cielab.gradient(count) let el @@ -69,7 +71,7 @@ const shards = (function(){ function step() { t += 1 light = cielab.gradient(count) - let w = { min: randrange(20, 40), max: randrange(10, 90) } + let w = { min: is_mobile ? randrange(40, 90) : randrange(20, 40), max: randrange(10, 90) } if (w.min > w.max) { w.min += 10 } -- cgit v1.2.3-70-g09d2