diff --git a/frontend/components/VirtualLotteryPage.vue b/frontend/components/VirtualLotteryPage.vue index e6d1065..8bb8cd3 100644 --- a/frontend/components/VirtualLotteryPage.vue +++ b/frontend/components/VirtualLotteryPage.vue @@ -1,48 +1,60 @@ @@ -139,6 +151,20 @@ export default { } this.attendeesFetched = true; }, + scrollToContent() { + console.log(window.scrollY) + const intersectingHeaderHeight = this.$refs.header.getBoundingClientRect().bottom - 50; + const { scrollY } = window; + let scrollHeight = intersectingHeaderHeight; + if (scrollY > 0) { + scrollHeight = intersectingHeaderHeight + scrollY; + } + + window.scrollTo({ + top: scrollHeight, + behavior: "smooth" + }); + }, track() { window.ga('send', 'pageview', '/lottery/game'); } @@ -146,241 +172,149 @@ export default { }; - +header { + background-color: $primary; + padding-bottom: 3rem; + margin-bottom: 3rem; - - -