feat: start home parameters

This commit is contained in:
RoxanneRlld
2024-02-13 07:01:26 +01:00
committed by alexis
parent f15d3d2c17
commit 4b9a59ed12
4 changed files with 84 additions and 8 deletions
+6 -2
View File
@@ -21,6 +21,7 @@ import Help from './components/Help/Help';
import Logo from './assets/logo';
import './App.scss';
import Question from './assets/question';
import Home from './components/Home/Home';
// ---------------------------------------------------------------------------------------------------------------------
const App = () => {
@@ -28,7 +29,7 @@ const App = () => {
return (
<div className='App'>
<RecoilRoot>
{/* <RecoilRoot>
<div className='stats'>
<Timer />
<Logo className={'logo'} />
@@ -49,7 +50,10 @@ const App = () => {
displayHelp(false);
}}
/>
)}
)} */}
<header className='App-header'>
<Home />
</header>
</div>
);
};
+30
View File
@@ -0,0 +1,30 @@
import './styles.scss';
const Home = () => {
return (
<div className='gameContainer'>
<h1 className='gameTitle'>Démineur</h1>
<div className='settingsContainer'>
<div className='selectorBox'>
<p className='chooseTitle'>Choisissez la taille de la grille</p>
<select className='parameterBox'>
<option value='little'>Petit</option>
<option value='medium'>Moyen</option>
<option value='big'>Grand</option>
</select>
</div>
<div className='selectorBox'>
<p className='chooseTitle'>Choisissez votre niveau</p>
<select className='parameterBox'>
<option value='easy'>Facile</option>
<option value='medium'>Moyen</option>
<option value='hard'>Difficile</option>
</select>
</div>
<button className='startGameBtn'>Commencer</button>
</div>
</div>
);
};
export default Home;
+47
View File
@@ -0,0 +1,47 @@
.gameContainer {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
}
.gameTitle {
font-size: 2rem;
font-weight: bold;
}
.settingsContainer {
display: grid;
grid-template-rows: repeat(2, 1fr);
margin: 1rem 0 1rem 0;
gap: 10px;
}
.selectorBox {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
}
.chooseTitle{
font-size: 1.2rem;
}
.parameterBox {
font-size: 1rem;
border-radius: 5px;
padding: 2.5px 5px;
}
.startGameBtn {
margin: 1rem 0 1rem 0;
padding: 0.7rem 1rem;
border-radius: 10px;
font-size: 1.2rem;
font-weight: bold;
background-color: #333;
color: #FFF;
border: #FFF 0.5px solid;
cursor: pointer;
}
+1 -6
View File
@@ -5,17 +5,12 @@
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
user-select: none;
}
#root {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 20px;
width: 100svw;
height: 100svh;
background: #598b8e;
overflow: hidden;
color: #fff;
}