-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create initial screen and update select screen
- Loading branch information
Showing
3 changed files
with
297 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const initialScreen = document.querySelector('.initial-screen'); | ||
const btnStart = document.querySelector('.initial-screen__btn'); | ||
|
||
btnStart.addEventListener('click', () => { | ||
initialScreen.classList.add('initial-screen--close'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,220 @@ | ||
/* GLOBAL */ | ||
* { | ||
padding: 0; | ||
margin: 0; | ||
border: 0; | ||
box-sizing: border-box; | ||
} | ||
|
||
:root { | ||
--bg-color: rgba(23, 20, 33, 1); | ||
--selection-bg-color: rgb(0, 0, 0); | ||
--alternative-color: rgb(255, 255, 255); | ||
--default-color: rgba(51, 209, 122, 1); | ||
--font: 'Silkscreen', sans-serif; | ||
} | ||
|
||
html, | ||
body { | ||
background-color: var(--bg-color); | ||
color: var(--default-color); | ||
|
||
font-family: var(--font); | ||
font-weight: 400; | ||
font-size: 1rem; | ||
|
||
width: 100%; | ||
height: 100vh; | ||
} | ||
|
||
body{ | ||
overflow-y: scroll; | ||
} | ||
|
||
button{ | ||
cursor: pointer; | ||
} | ||
|
||
ul{ | ||
list-style: none; | ||
} | ||
|
||
::selection { | ||
background-color: var(--selection-bg-color); | ||
|
||
color: var(--alternative-color); | ||
} | ||
|
||
::-webkit-scrollbar{ | ||
width: .75rem; | ||
|
||
background: var(--bg-color); | ||
} | ||
|
||
::-webkit-scrollbar-thumb{ | ||
background: var(--default-color); | ||
} | ||
|
||
/* INITIAL SCREEN */ | ||
.initial-screen { | ||
background-color: var(--bg-color); | ||
|
||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
z-index: 1000; | ||
transform: translateX(0%); | ||
|
||
width: 100%; | ||
height: 100vh; | ||
|
||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
.initial-screen--close{ | ||
animation: startChip-8 1.2s .4s backwards; | ||
display: none; | ||
} | ||
|
||
.initial-screen__content { | ||
width: 80%; | ||
height: 100vh; | ||
|
||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
gap: 2rem; | ||
|
||
padding-block: 2rem; | ||
} | ||
|
||
.initial-screen__group-line { | ||
width: 100%; | ||
|
||
display: flex; | ||
flex-direction: column; | ||
gap: 2rem; | ||
} | ||
|
||
.initial-screen__line { | ||
width: 100%; | ||
height: 1.5rem; | ||
|
||
background-color: var(--default-color); | ||
} | ||
|
||
.initial-screen__title { | ||
font-weight: 700; | ||
font-size: 6rem; | ||
text-align: center; | ||
|
||
margin-bottom: .75rem; | ||
} | ||
|
||
.initial-screen__btn { | ||
display: block; | ||
|
||
background: none; | ||
color: var(--default-color); | ||
|
||
font-family: var(--font); | ||
font-size: 1rem; | ||
|
||
margin: 0 auto; | ||
} | ||
|
||
@keyframes startChip-8 { | ||
from{ | ||
opacity: 1; | ||
display: flex; | ||
} | ||
|
||
to{ | ||
opacity: 0; | ||
display: none; | ||
} | ||
} | ||
|
||
/* SELECT SCREEN */ | ||
.select-screen{ | ||
width: 100%; | ||
height: auto; | ||
min-height: 100vh; | ||
|
||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
|
||
padding: 2rem; | ||
} | ||
|
||
.select-screen fieldset{ | ||
width: 100%; | ||
max-width: 44.688rem; | ||
|
||
margin-bottom: 2rem; | ||
} | ||
|
||
.select-screen__header{ | ||
display: flex; | ||
align-items: center; | ||
gap: 1rem; | ||
|
||
margin-bottom: 1.25rem; | ||
} | ||
|
||
.select-screen__line{ | ||
width: 59.3%; | ||
height: .125rem; | ||
|
||
background: var(--default-color); | ||
} | ||
|
||
.select-screen__title{ | ||
font-size: 2.5rem; | ||
text-align: center; | ||
} | ||
|
||
.select-screen__games{ | ||
display: flex; | ||
flex-direction: column; | ||
gap: 2rem; | ||
|
||
width: fit-content; | ||
} | ||
|
||
.select-screen__chose-game{ | ||
appearance: none; | ||
-webkit-appearance: none; | ||
|
||
cursor: pointer; | ||
|
||
background: transparent; | ||
border: .125rem solid var(--default-color); | ||
|
||
width: .75rem; | ||
height: .75rem; | ||
|
||
transition: all .3s ease-in-out; | ||
} | ||
|
||
.select-screen__chose-game:checked{ | ||
background: var(--default-color); | ||
border-radius: 50%; | ||
} | ||
|
||
.select-screen__keyboard{ | ||
margin-top: .7rem; | ||
} | ||
|
||
.select-screen__confirm{ | ||
background: transparent; | ||
color: var(--default-color); | ||
|
||
font-family: var(--font); | ||
font-size: 1.5rem; | ||
|
||
margin-top: 1rem; | ||
} |