diff --git a/src/components/RegisterPage.vue b/src/components/RegisterPage.vue index b2572ea..0cebbe9 100644 --- a/src/components/RegisterPage.vue +++ b/src/components/RegisterPage.vue @@ -491,7 +491,7 @@ h2 { text-decoration: none; font-weight: bold; cursor: pointer; - border-bottom: 1px solid #ff5fff; + border-bottom: 1px solid $link-color; } hr { diff --git a/src/components/RequestWine.vue b/src/components/RequestWine.vue index 58fbd32..2dee37b 100644 --- a/src/components/RequestWine.vue +++ b/src/components/RequestWine.vue @@ -158,7 +158,7 @@ input[type="text"] { font-family: Arial; text-decoration: none; font-weight: bold; - border-bottom: 1px solid #ff5fff; + border-bottom: 1px solid $link-color; width: fit-content; } diff --git a/src/components/TodaysPage.vue b/src/components/TodaysPage.vue index d79b037..0dfdf12 100644 --- a/src/components/TodaysPage.vue +++ b/src/components/TodaysPage.vue @@ -33,6 +33,7 @@ export default { diff --git a/src/components/VinlottisPage.vue b/src/components/VinlottisPage.vue index 66ba9c3..fe19205 100644 --- a/src/components/VinlottisPage.vue +++ b/src/components/VinlottisPage.vue @@ -48,7 +48,6 @@ import PurchaseGraph from "@/ui/PurchaseGraph"; import TotalBought from "@/ui/TotalBought"; import Highscore from "@/ui/Highscore"; import WinGraph from "@/ui/WinGraph"; -import Banner from "@/ui/Banner"; import Wines from "@/ui/Wines"; import Vipps from "@/ui/Vipps"; import Countdown from "@/ui/Countdown"; @@ -60,7 +59,6 @@ export default { TotalBought, Highscore, WinGraph, - Banner, Wines, Vipps, Countdown @@ -241,7 +239,7 @@ h1 { .generator-link { font-weight: bold; - border-bottom: 1px solid #ff5fff; + border-bottom: 1px solid $link-color; } .win, diff --git a/src/components/VirtualLotteryPage.vue b/src/components/VirtualLotteryPage.vue index cb2730b..f5b5310 100644 --- a/src/components/VirtualLotteryPage.vue +++ b/src/components/VirtualLotteryPage.vue @@ -234,7 +234,7 @@ export default { .generator-link { font-weight: bold; - border-bottom: 1px solid #ff5fff; + border-bottom: 1px solid $link-color; } diff --git a/src/styles/banner.scss b/src/styles/banner.scss index 5823376..a50f981 100644 --- a/src/styles/banner.scss +++ b/src/styles/banner.scss @@ -1,147 +1,211 @@ @import "./media-queries.scss"; +@import "./variables.scss"; +.top-banner{ + display: grid; + grid-template-columns: 0.5fr 1fr 0.5fr; + grid-template-areas: "menu logo clock"; + grid-gap: 1em; + align-items: center; + justify-items: center; + background-color: $primary; + -webkit-box-shadow: 0px 0px 22px -8px rgba(0, 0, 0, 0.65); + -moz-box-shadow: 0px 0px 22px -8px rgba(0, 0, 0, 0.65); + box-shadow: 0px 0px 22px -8px rgba(0, 0, 0, 0.65); +} -// https://codepen.io/erikterwan/pen/EVzeRP -@include mobile{ - #menuToggle - { - display: block; - position: relative; - margin: 7px; - - z-index: 1; - - -webkit-user-select: none; - user-select: none; - } +.company-logo{ + grid-area: logo; +} - #menuToggle a - { - text-decoration: none; - color: #333333; - - transition: color 0.3s ease; - } - - - #menuToggle input - { - display: block; - width: 40px; - height: 32px; - position: absolute; - top: -7px; - left: -5px; - +.menu-toggle-container{ + grid-area: menu; + color: #1e1e1e; + border-radius: 50% 50%; + z-index: 3; + width: 42px; + height: 42px; + background: white; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + row-gap: 4px; + &:hover{ cursor: pointer; - - opacity: 0; /* hide this */ - z-index: 2; /* and place it over the hamburger */ - - -webkit-touch-callout: none; } - /* - * Just a quick hamburger - */ - #menuToggle span - { + span{ display: block; - width: 33px; - height: 4px; - margin-bottom: 5px; position: relative; - - background: #333333; border-radius: 3px; - + height: 3px; + width: 18px; + background: #111; z-index: 1; - transform-origin: 4px 0px; - - transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0), - background 0.5s cubic-bezier(0.77,0.2,0.05,1.0), - opacity 0.55s ease; + transition: + transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0), + background 0.5s cubic-bezier(0.77,0.2,0.05,1.0), + opacity 0.55s ease; } - - #menuToggle span:first-child - { + + span:first-child{ transform-origin: 0% 0%; } - #menuToggle span:nth-last-child(2) - { + span:nth-last-child(2){ transform-origin: 0% 100%; } - /* - * Transform all the slices of hamburger - * into a crossmark. - */ - #menuToggle input:checked ~ span - { - opacity: 1; - transform: rotate(45deg) translate(-2px, -1px); - background: #232323; + &.open{ + span{ + opacity: 1; + transform: rotate(-45deg) translate(2px, -2px); + background: #232323; + } + + span:nth-last-child(2){ + opacity: 0; + transform: rotate(0deg) scale(0.2, 0.2); + } + + span:nth-last-child(3){ + transform: rotate(45deg) translate(3.5px, -2px); + } } - /* - * But let's hide the middle one. - */ - #menuToggle input:checked ~ span:nth-last-child(3) - { - opacity: 0; - transform: rotate(0deg) scale(0.2, 0.2); - } - - /* - * Ohyeah and the last one should go the other direction - */ - #menuToggle input:checked ~ span:nth-last-child(2) - { - transform: rotate(-45deg) translate(0, -1px); - } - - /* - * Make this absolute positioned - * at the top left of the screen - */ - #menu - { - position: absolute; - width: 100vw; - margin: -100px 0 0 -50px; - padding-bottom: 10px; - padding-top: 125px; + &.open{ + background: #fff; - background-color: $primary; - list-style-type: none; - -webkit-font-smoothing: antialiased; - /* to stop flickering of text in safari */ - - transform-origin: 0% 0%; - transform: translate(-100%, 0); - - transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0); - } - - #menu li - { - padding: 10px 0; - font-size: 22px; - } - - /* - * And let's slide it in from the left - */ - #menuToggle input:checked ~ ul - { - transform: none; } } -@include desktop{ - #menuToggle{ - display: none; +.menu{ + position: fixed; + top: 0; + background-color: $primary; + width: 100%; + z-index: 2; + overflow: hidden; + transition: max-height 0.5s ease-out; + height: 100vh; + max-height: 100vh; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + row-gap: 3em; + + &.collapsed{ + max-height: 0%; + } + + a{ + text-decoration: none; + } + + .single-route{ + font-size: 3em; + outline: 0; + text-decoration: none; + color: #1e1e1e; + border-bottom: 4px solid transparent; + display: block; + + &.open{ + -webkit-animation: fadeInFromNone 3s ease-out; + -moz-animation: fadeInFromNone 3s ease-out; + -o-animation: fadeInFromNone 3s ease-out; + animation: fadeInFromNone 3s ease-out; + } + + &:hover{ + cursor: pointer; + border-color: $link-color; + } } } + +@-webkit-keyframes fadeInFromNone { + 0% { + display: none; + opacity: 0; + } + + 10% { + display: block; + opacity: 0; + } + + 100% { + display: block; + opacity: 1; + } +} + +@-moz-keyframes fadeInFromNone { + 0% { + display: none; + opacity: 0; + } + + 10% { + display: block; + opacity: 0; + } + + 100% { + display: block; + opacity: 1; + } +} + +@-o-keyframes fadeInFromNone { + 0% { + display: none; + opacity: 0; + } + + 10% { + display: block; + opacity: 0; + } + + 100% { + display: block; + opacity: 1; + } +} + +@keyframes fadeInFromNone { + 0% { + display: none; + opacity: 0; + } + + 10% { + display: block; + opacity: 0; + } + + 100% { + display: block; + opacity: 1; + } +} + +.clock { + grid-area: clock; + text-decoration: none; + color: #333333; + display: flex; + font-family: Arial; + @include mobile { + font-size: 0.8em; + margin-right: 1rem; + } + h2 { + display: flex; + } +} \ No newline at end of file diff --git a/src/styles/global.scss b/src/styles/global.scss index 4507271..d4bbfce 100644 --- a/src/styles/global.scss +++ b/src/styles/global.scss @@ -170,7 +170,7 @@ textarea { .vin-link { font-weight: bold; - border-bottom: 1px solid #ff5fff; + border-bottom: 1px solid $link-color; font-size: 1rem; margin-left: 15px; } diff --git a/src/styles/variables.scss b/src/styles/variables.scss index 5dc5d05..9886163 100644 --- a/src/styles/variables.scss +++ b/src/styles/variables.scss @@ -15,3 +15,5 @@ $dark-yellow: #ecc31d; $light-red: #fbd7de; $red: #ef5878; $dark-red: #ec3b61; + +$link-color: #ff5fff; \ No newline at end of file diff --git a/src/ui/Banner.vue b/src/ui/Banner.vue index 4f66d63..9a53fa8 100644 --- a/src/ui/Banner.vue +++ b/src/ui/Banner.vue @@ -1,26 +1,22 @@