Frontend homepage looking good on desktop

This commit is contained in:
aronmal 2023-02-05 00:40:19 +00:00
parent 78c0263444
commit 61acca3018
Signed by: aronmal
GPG key ID: 816B7707426FC612
4 changed files with 190 additions and 148 deletions

View file

@ -1,4 +1,5 @@
import { faCompass } from '@fortawesome/pro-solid-svg-icons' import { faPlus, faUserPlus } from '@fortawesome/pro-solid-svg-icons'
import { faEye, faLeftLong } from '@fortawesome/pro-regular-svg-icons'
import { faCirclePlay } from '@fortawesome/pro-thin-svg-icons' import { faCirclePlay } from '@fortawesome/pro-thin-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { useState } from 'react' import { useState } from 'react'
@ -8,32 +9,41 @@ export default function Home() {
return ( return (
<div id='box'> <div id='box'>
<button id='navExpand'> <button id='navExpand'>
<FontAwesomeIcon icon={faCompass} /> <img src='/assets/burger-menu.png' alt='Burger Menu' />
</button> </button>
<div className='flex-row'> <div id='shield'>
<div id='shield'> <div id='width'>
<div id='width'> <h1>Leaky</h1>
<h1>Leaky</h1> <h1>Ships</h1>
<h1>Ships</h1>
</div>
</div> </div>
</div> </div>
<div className='beforeStartBox'> {!heWantsToPlay ?
{!heWantsToPlay ? <>
<> <div id='videoWrapper' >
<div id='videoWrapper'> <FontAwesomeIcon icon={faCirclePlay} />
<FontAwesomeIcon icon={faCirclePlay} /> </div>
</div> <button id='startButton' onClick={() => setHeWantsToPlay(true)}>START</button>
<button id='startButton' onClick={() => setHeWantsToPlay(true)}>START</button> </> :
</> : <div id='startBox'>
<div id='startBox'> <button id='back' onClick={() => setHeWantsToPlay(false)}>
<div> <FontAwesomeIcon icon={faLeftLong} />
<button className='optionButton'>Raum erstellen</button> </button>
<button className='optionButton'>Raum beitreten</button> <div>
<button className='optionButton'>Zuschauen</button> <button className='optionButton'>
</div> Raum erstellen
</div>} <FontAwesomeIcon icon={faPlus} />
</div> </button>
<button className='optionButton'>
Raum beitreten
<FontAwesomeIcon icon={faUserPlus} />
</button>
<button className='optionButton'>
Zuschauen
<FontAwesomeIcon icon={faEye} />
</button>
</div>
</div>}
{/* </div> */}
</div > </div >
) )
} }

View file

@ -12,6 +12,7 @@ body {
* { * {
padding: 0; padding: 0;
margin: 0; margin: 0;
box-sizing: border-box;
} }
.App { .App {

View file

@ -1,196 +1,225 @@
@use './mixins/display' as *; @use './mixins/display' as *;
@use './mixins/effects' as *;
@use './mixins/CP_Font' as *; @use './mixins/CP_Font' as *;
@import './mixins/variables';
@import url('https://fonts.googleapis.com/css2?family=Farro:wght@300;400;500;700&display=swap');
#box { #box {
border: 2px solid black;
min-height: 100vh; min-height: 100vh;
background-color: #282c34; background-color: #282c34;
@include flex-col;
align-items: center;
justify-content: space-around;
#navExpand { #navExpand {
@include flex;
align-items: center;
justify-content: center;
position: absolute; position: absolute;
top: 64px; top: 64px;
left: 64px; left: 64px;
width: 96px; width: 96px;
height: 96px; height: 96px;
background-color: black; background-color: $grayish;
border-radius: 8px; border-radius: 8px;
border: none; box-shadow: 0 0 2px 2px #0008 inset;
svg { img {
height: 50%; height: 80%;
width: 50%; width: 80%;
color: white;
} }
} }
.flex-row { #shield {
@include flex-row; @include flex-row;
justify-content: center; justify-content: center;
height: 250px;
width: 700px;
background-image: url("/assets/shield.png");
background-repeat: no-repeat;
background-size: contain;
#shield { #width {
@include flex-row; @include flex-col;
justify-content: center; justify-content: space-between;
height: 250px;
width: 700px; h1 {
margin: 5%; @include CP_Font;
background-image: url("/assets/shield.png"); margin: 3%;
background-repeat: no-repeat; width: 100%;
background-size: contain; text-align: center;
font-size: 5.8em;
letter-spacing: 6px;
&:first-child {
border-top: 5px solid black;
}
&:last-child {
border-bottom: 5px solid black;
}
}
}
@media (max-width: 2000px) {
height: 200px;
width: 560px;
#width { #width {
@include flex-col;
justify-content: space-between;
h1 { h1 {
@include CP_Font; font-size: 4.5em;
margin: 3%; letter-spacing: 4px;
width: 100%;
text-align: center;
font-size: 5.8em;
letter-spacing: 6px;
&:first-child { &:first-child {
border-top: 5px solid black; border-top: 4px solid black;
} }
&:last-child { &:last-child {
border-bottom: 5px solid black; border-bottom: 4px solid black;
} }
} }
} }
}
@media (max-width: 1000px) { @media (max-width: 800px) {
height: 200px; height: 160px;
width: 560px; width: 450px;
#width { #width {
h1 { h1 {
font-size: 4.5em; font-size: 3.6em;
letter-spacing: 4px; letter-spacing: 3px;
&:first-child { &:first-child {
border-top: 4px solid black; border-top: 3px solid black;
} }
&:last-child { &:last-child {
border-bottom: 4px solid black; border-bottom: 3px solid black;
}
} }
} }
} }
}
@media (max-width: 800px) { @media (max-width: 600px) {
height: 160px; height: 100px;
width: 450px; width: 280px;
#width { #width {
h1 { h1 {
font-size: 3.6em; font-size: 2.4em;
letter-spacing: 3px; letter-spacing: 2px;
&:first-child { &:first-child {
border-top: 3px solid black; border-top: 2px solid black;
}
&:last-child {
border-bottom: 3px solid black;
}
} }
}
}
@media (max-width: 600px) { &:last-child {
height: 100px; border-bottom: 2px solid black;
width: 280px;
#width {
h1 {
font-size: 2.4em;
letter-spacing: 2px;
&:first-child {
border-top: 2px solid black;
}
&:last-child {
border-bottom: 2px solid black;
}
} }
} }
} }
} }
} }
.beforeStartBox { #videoWrapper {
position: relative;
display: flex;
align-items: center;
justify-content: center;
height: 350px;
width: 700px;
background-color: #2227;
border: 4px solid black;
border-radius: 8px;
svg {
font-size: 6em;
color: #231f20;
path {
stroke: black;
stroke-width: 2px;
stroke-linejoin: round;
}
}
}
#startButton {
font-family: 'Farro', sans-serif;
font-weight: bold;
font-size: 3em;
color: black;
background-color: $warn;
border: none;
border-radius: 8px;
padding: calc(2rem + 8px) 6rem 2rem 6rem;
}
#startBox {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: space-evenly; background-color: $grayish;
height: 100%; box-shadow: 0 0 2px 2px #fffb inset, 0 0 2px 2px #fff2;
width: 100%; border: 4px solid black;
padding: 3rem;
border-radius: 8px;
min-width: 60vw;
gap: 2rem;
#videoWrapper { #back {
display: flex; font-size: 3em;
align-items: center; color: $grayish;
justify-content: center; align-self: flex-start;
height: 225px; background-color: #000C;
width: 525px;
background-color: #2227;
border: 2px solid black;
border-radius: 8px;
svg {
font-size: 4em;
color: #231f20;
path {
stroke: black;
stroke-width: 2px;
stroke-linejoin: round;
}
}
}
#startButton {
font-size: 2.5em;
color: white;
background-color: black;
border: none; border: none;
border-radius: 8px; border-radius: 8px;
padding: 2rem 6rem; padding: 0 .5rem;
margin-top: -1.5rem;
width: 10rem;
box-shadow: 0 0 2px 2px #fff6 inset;
border: 2px solid #000C;
} }
#startBox { div {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
background-color: #B1B2B5CC; gap: 3rem;
border: 3px solid black;
padding: 3rem;
border-radius: 8px;
min-width: 60vw;
div { .optionButton {
display: flex; position: relative;
flex-direction: column; font-size: 2.5em;
align-items: center; color: $grayish;
gap: 3rem; background-color: #000C;
border: none;
border-radius: 8px;
padding: 1rem calc(4rem + 48px) 1rem 4rem;
width: 100%;
box-shadow: 0 0 2px 2px #fff6 inset;
border: 2px solid #000C;
.optionButton { &:last-child {
font-size: 2em; margin-top: 2rem;
color: #B1B2B5CC;
background-color: #000C;
border: none;
border-radius: 8px;
padding: 1rem 4rem;
width: 100%;
} }
svg {
position: absolute;
font-size: 2em;
top: 0;
bottom: 0;
width: 48px;
right: 24px;
}
} }
} }
} }
} }

View file

@ -1 +1,3 @@
$theme: #282c34; $theme: #282c34;
$grayish: #B1B2B5CC;
$warn: #fabd04;