diff --git a/index.js b/index.js index b3e610f..74a60a2 100755 --- a/index.js +++ b/index.js @@ -195,7 +195,8 @@ DOM.set({ article: { model: STYLE.FLEX, justifyContent: _isMobile.as("flex-start", "center"), - minHeight: "607px", + minHeight: "calc(100vh - 10em)", + height: "fit-content", width: _isMobile.as("47em", "100%"), margin: _isMobile.as("6em 0 1.5em 9em", "0 0 1em 0"), content: _currentPage.as(p => PAGES[p] ? PAGES[p] : undefined), diff --git a/src/CardScroll.js b/src/CardScroll.js index 0d54b8d..cc2fd76 100644 --- a/src/CardScroll.js +++ b/src/CardScroll.js @@ -22,11 +22,11 @@ class CardScroll extends HTMLElement { margin: "6em auto", position: "relative", width: "20em", - minHeight: "30em", + minHeight: "25em", section: items.map((item, i) => ({ position: 'absolute', width: "20em", - minHeight: "30em", + minHeight: "25em", backgroundColor: "white", borderRadius: "2.5em", boxShadow: "1px 1px 3px black", diff --git a/src/animations.js b/src/animations.js index dd48a11..5cb0fa5 100755 --- a/src/animations.js +++ b/src/animations.js @@ -1,11 +1,11 @@ -const SPEED = 500; +const SPEED = 300; const queue = []; const trigger = (s = SPEED) => setTimeout(_ => { - if (!queue.length) return; let entry = queue.shift(); entry.elem.set(entry.model); + if (!queue.length) return; trigger(s); }, 0.3 * s); @@ -25,8 +25,11 @@ export const queueDown = (elem, model = { Object.entries(properModel).forEach(([key, val]) => val.through ? elem.set(val.through[0], key) : null); - queue.push({elem:elem, model:properModel}); - if (queue.length === 1) trigger(0.5 * s); + queue.push({ + elem: elem, + model: properModel + }); + if (queue.length === 1) trigger(s); }