Renamed /src to /frontend.

This commit is contained in:
2020-12-06 21:48:21 +01:00
parent 913268b01c
commit ce7e05fd43
57 changed files with 8 additions and 8 deletions

222
frontend/styles/banner.scss Normal file
View File

@@ -0,0 +1,222 @@
@import "./media-queries.scss";
@import "./variables.scss";
.top-banner{
position: sticky;
top: 0;
z-index: 1;
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;
// ios homescreen app whitespace above header fix.
&::before {
content: '';
width: 100%;
height: 3rem;
position: absolute;
top: -3rem;
background-color: inherit;
}
}
.company-logo{
grid-area: logo;
}
.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;
&:hover{
cursor: pointer;
}
span{
display: block;
position: relative;
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;
}
span:first-child{
transform-origin: 0% 0%;
margin-bottom: 4px;
}
span:nth-last-child(2){
transform-origin: 0% 100%;
margin-bottom: 4px;
}
&.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);
}
}
&.open{
background: #fff;
}
}
.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;
}
}

331
frontend/styles/global.scss Normal file
View File

@@ -0,0 +1,331 @@
@import "./media-queries.scss";
@import "./variables.scss";
@font-face {
font-family: "knowit";
font-weight: 600;
src: url("/public/assets/fonts/bold.woff");
}
@font-face {
font-family: "knowit";
font-weight: 300;
src: url("/public/assets/fonts/regular.woff");
}
body {
font-family: Arial;
margin: 0;
}
a {
text-decoration: none;
}
.title {
text-align: center;
width: fit-content;
margin: 2rem auto;
text-align: center;
font-family: knowit, Arial;
margin-top: 3.8rem;
font-weight: 600;
@include mobile {
margin-top: 1.5rem;
font-size: 1.6rem;
}
}
.subtext {
margin-top: 0.5rem;
font-size: 1.22rem;
@include mobile {
margin-top: 0;
font-size: 1.15rem;
}
}
.label-div {
display: flex;
flex-direction: column;
justify-content: space-between;
label {
margin-bottom: 0.25rem;
font-weight: 600;
text-transform: uppercase;
}
input {
margin: 0;
margin-bottom: auto;
height: 2rem;
padding: 0.5rem;
min-width: 0;
width: 98%;
padding: 1%;
}
}
.button-container {
display: flex;
justify-content: center;
flex-direction: row;
> *:not(:last-child) {
margin-right: 2rem;
}
&.column {
flex-direction: column;
align-items: center;
> * {
margin-right: unset;
margin-bottom: 1rem;
}
}
@include mobile {
&:not(.row) {
flex-direction: column;
align-items: center;
> *:not(:last-child) {
margin-right: unset;
margin-bottom: .75rem;
}
}
}
}
input,
textarea {
border-radius: 0;
box-shadow: none;
-webkit-appearance: none;
font-size: 1.1rem;
border: 1px solid rgba(#333333, 0.3);
}
.vin-button {
font-family: Arial;
$color: #b7debd;
position: relative;
display: inline-block;
background: $color;
color: #333;
padding: 10px 30px;
margin: 0;
border: 0;
width: fit-content;
font-size: 1.3rem;
line-height: 1.3rem;
height: 4rem;
max-height: 4rem;
cursor: pointer;
font-weight: 500;
transition: transform 0.5s ease;
-webkit-font-smoothing: antialiased;
// disable-dbl-tap-zoom
touch-action: manipulation;
&.auto-height {
height: auto;
}
&.danger {
background-color: $red;
color: white;
}
&::after {
content: "";
position: absolute;
transition: opacity 0.3s ease-in-out;
z-index: -1;
width: 100%;
height: 100%;
top: 0;
left: 0;
opacity: 0;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.07),
0 4px 8px rgba(0, 0, 0, 0.07), 0 8px 16px rgba(0, 0, 0, 0.07),
0 16px 32px rgba(0, 0, 0, 0.07), 0 32px 64px rgba(0, 0, 0, 0.07);
}
&:hover:not(:disabled) {
transform: scale(1.02) translateZ(0);
&::after {
opacity: 1;
}
}
&:disabled{
opacity: 0.25;
cursor: not-allowed;
}
&.small {
height: min-content;
}
}
.cursor {
&-pointer {
cursor: pointer;
}
}
.text-center {
text-align: center;
}
.vin-link {
font-weight: bold;
border-bottom: 1px solid $link-color;
font-size: 1rem;
cursor: pointer;
text-decoration: none;
color: $matte-text-color;
&:focus, &:hover {
border-color: $link-color;
}
}
.margin-top {
&-md {
margin-top: 3rem;
}
&-sm {
margin-top: 1rem;
}
&-0 {
margin-top: 0;
}
}
.margin-left {
&-md {
margin-left: 3rem;
}
&-sm {
margin-left: 1rem;
}
&-0 {
margin-left: 0;
}
}
.margin-right {
&-md {
margin-right: 3rem;
}
&-sm {
margin-right: 1rem;
}
&-0 {
margin-right: 0;
}
}
.margin-bottom {
&-md {
margin-bottom: 3rem;
}
&-sm {
margin-bottom: 1rem;
}
&-0 {
margin-bottom: 0;
}
}
.width {
&-100 {
width: 100%;
}
&-75 {
width: 75%;
}
&-50 {
width: 50%;
}
&-25 {
width: 25%;
}
}
.cursor {
&-pointer {
cursor: pointer;
}
}
.no-margin {
margin: 0 !important;
}
.raffle-element {
margin: 20px 0;
-webkit-mask-image: url(/public/assets/images/lodd.svg);
background-repeat: no-repeat;
mask-image: url(/public/assets/images/lodd.svg);
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
color: #333333;
&.green-raffle {
background-color: $light-green;
}
&.blue-raffle {
background-color: $light-blue;
}
&.yellow-raffle {
background-color: $light-yellow;
}
&.red-raffle {
background-color: $light-red;
}
}
@mixin raffle {
padding-bottom: 50px;
&::before, &::after {
content: "";
position: absolute;
left: 0;
right: 0;
bottom: 25px;
height: 50px;
background: radial-gradient(closest-side, #fff, #fff 50%, transparent 50%);
background-size: 50px 50px;
background-position: 0 25px;
background-repeat: repeat-x;
}
&::after{
background: radial-gradient(closest-side, transparent, transparent 50%, #fff 50%);
background-size: 50px 50px;
background-position: 25px -25px;
bottom: -25px
}
}
.desktop-only {
@include mobile {
display: none;
}
}
.mobile-only {
@include desktop {
display: none;
}
}

View File

@@ -0,0 +1,71 @@
@import "./media-queries.scss";
@import "./variables.scss";
.outer {
display: flex;
flex-direction: column;
@include desktop {
margin-top: 10vh;
}
}
h2 {
font-family: knowit, Arial;
text-align: center;
font-size: 3rem;
width: 100vw;
@include mobile {
font-size: 2rem;
}
}
form {
display: flex;
flex-direction: row;
justify-content: space-around;
align-items: center;
flex-wrap: wrap;
margin: 2rem auto 0;
width: 80vw;
max-width: 1100px;
@include mobile {
display: flex;
flex-direction: column;
justify-content: center;
width: 90vw;
}
.label-div input {
font-size: 2rem;
min-height: 2rem;
line-height: 2rem;
border: none;
border-bottom: 1px solid black;
max-width: 30vw;
@include mobile {
max-width: unset;
font-size: 2rem;
min-height: 2rem;
line-height: 2rem;
margin-bottom: 1.5rem;
}
}
}
.vin-button {
margin-bottom: 0;
margin-top: auto;
}
.error {
padding: 1.25rem;
margin: 1.25rem;
width: calc(100% - 5rem);
background-color: $light-red;
color: $red;
}

View File

@@ -0,0 +1,28 @@
$mobile-width: 768px;
$tablet-max: 1200px;
$desktop-max: 2004px;
@mixin mobile {
@media (max-width: #{$mobile-width}) {
@content;
}
}
@mixin tablet {
@media (min-width: #{$mobile-width + 1px}) {
@content;
}
}
@mixin desktop {
@media (min-width: #{$tablet-max + 1px}) {
@content;
}
}
@mixin widescreen {
@media (min-width: #{$desktop-max + 1px}){
@content;
}
}

View File

@@ -0,0 +1,46 @@
.flex {
display: flex;
&.column {
flex-direction: column;
}
&.row {
flex-direction: row;
}
&.wrap {
flex-wrap: wrap;
}
&.justify-center {
justify-content: center;
}
&.justify-space-between {
justify-content: space-between;
}
&.justify-end {
justify-content: flex-end;
}
&.justify-start {
justify-content: flex-start;
}
&.align-center {
align-items: center;
}
}
.inline-block {
display: inline-block;
}
.float {
&-left {
float: left;
}
&-right {
float: right;
}
}

View File

@@ -0,0 +1,21 @@
$primary: #b7debd;
$light-green: #c8f9df;
$green: #0be881;
$dark-green: #0ed277;
$light-blue: #d4f2fe;
$blue: #4bcffa;
$dark-blue: #24acda;
$light-yellow: #fff6d6;
$yellow: #ffde5d;
$dark-yellow: #ecc31d;
$light-red: #fbd7de;
$red: #ef5878;
$dark-red: #ec3b61;
$link-color: #ff5fff;
$matte-text-color: #333333;

View File

@@ -0,0 +1,122 @@
@font-face {
font-family: 'vinlottis-icons';
src:
url('/public/assets/fonts/vinlottis-icons/vinlottis-icons.ttf?95xu5r') format('truetype'),
url('/public/assets/fonts/vinlottis-icons/vinlottis-icons.woff?95xu5r') format('woff'),
url('/public/assets/fonts/vinlottis-icons/vinlottis-icons.svg?95xu5r#vinlottis-icons') format('svg');
font-weight: normal;
font-style: normal;
font-display: block;
}
.icon {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'vinlottis-icons' !important;
speak: never;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon--arrow-long-right:before {
content: "\e907";
}
.icon--arrow-long-left:before {
content: "\e908";
}
.icon--arrow-right:before {
content: "\e909";
}
.icon--arrow-left:before {
content: "\e900";
}
.icon--ballon:before {
content: "\e90b";
}
.icon--bars:before {
content: "\e90c";
}
.icon--bottle:before {
content: "\e90d";
}
.icon--cake-chart:before {
content: "\e90f";
}
.icon--stopwatch:before {
content: "\e911";
}
.icon--cloud:before {
content: "\e912";
}
.icon--dart:before {
content: "\e914";
}
.icon--eye-1:before {
content: "\e919";
}
.icon--eye-2:before {
content: "\e91a";
}
.icon--eye-3:before {
content: "\e91b";
}
.icon--eye-4:before {
content: "\e91c";
}
.icon--eye-5:before {
content: "\e91d";
}
.icon--eye-6:before {
content: "\e91e";
}
.icon--eye-7:before {
content: "\e91f";
}
.icon--eye-8:before {
content: "\e920";
}
.icon--face-1:before {
content: "\e922";
}
.icon--face-2:before {
content: "\e923";
}
.icon--face-3:before {
content: "\e924";
}
.icon--heart-sparks:before {
content: "\e928";
}
.icon--heart:before {
content: "\e929";
}
.icon--medal:before {
content: "\e936";
}
.icon--megaphone:before {
content: "\e937";
}
.icon--phone:before {
content: "\e93a";
}
.icon--plus:before {
content: "\e93e";
}
.icon--spark:before {
content: "\e946";
}
.icon--tag:before {
content: "\e949";
}
.icon--talk:before {
content: "\e94b";
}
.icon--cross:before {
content: "\e952";
}