Skip to content

Commit

Permalink
#24 Refonte du CSS et envoie d'images
Browse files Browse the repository at this point in the history
  • Loading branch information
BluedyRimuru committed Feb 24, 2024
1 parent 937e334 commit 149e57f
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 32 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@

# Motus

## Description

Il s'agit d'un projet développé sous ReactJS.


## Installation

```shell
$ npm install
$ npm start
$ npm install --force
```

## Fonctionnalités


## Commandes

```shell
$ npm run lint -- --fix
$ npm start
```

## Développeurs
Expand Down
2 changes: 1 addition & 1 deletion src/components/DifficultyRules.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function DifficultyRules ({ answer }: DifficultyRulesProps) {
<p>☄️ {locationState.color ? 'Couleur autorisée' : 'Couleur non autorisée'}</p>
</div>
<div className="rules">
<button onClick={handleClick}>Besoin d&rsquo;un indice ?</button>
<button onClick={handleClick} className='button-style'>Besoin d&rsquo;un indice ?</button>
</div>
</div>
)
Expand Down
19 changes: 12 additions & 7 deletions src/components/WordHistory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,20 @@ export default function WordHistory ({

// render
return (
<div>
<div className="history">
<p>{inputValue}</p>
{historyInput.map((answer, index) => (
<div key={index} className={'container-history'}>
{answer.split('').map((letter, indexLetter) => (
<p key={indexLetter} className={verifyLetter(letter, indexLetter, wordLetter)}>{letter}</p>
<table>
<tbody>
{historyInput.map((answer, index) => (
<tr key={index} className={'container-history'}>
{answer.split('').map((letter, indexLetter) => (
<td key={indexLetter}
className={verifyLetter(letter, indexLetter, wordLetter)}>{letter}</td>
))}
</tr>
))}
</div>
))}
</tbody>
</table>
</div>
)
}
35 changes: 23 additions & 12 deletions src/home/Motus.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,23 @@ p {
}

.input {
background-color: #0d1117;
background-image: url('../resources/images/retry-bg.png');
border-radius: 20px;
border: 3px solid #30363d;
height: 80px;
width: 90%;
}

.history {
background-color: #0d1117;
background-image: url('../resources/images/fu_xuan.jpg');
border-radius: 20px;
border: 3px solid #30363d;
margin-top: 40px;
padding: 30px;
height: 500px;
min-height: 500px;
width: 90%;
display: flex;
justify-content: center;
}

.retry {
Expand All @@ -99,15 +101,6 @@ p {
color: red;
}

.container-history {
display: flex;
}

.container-history p {
margin-right: 5px;
padding: 10px;
}

.green {
background: green;
}
Expand Down Expand Up @@ -169,3 +162,21 @@ p {
font-size: 16px;
margin: 20px;
}

td {
border: 3px solid #30363d;
border-radius: 5px;
padding: 20px;
max-height: 10px;
}

tr {
padding: 10px;
}

table {
border-collapse: collapse;
width: auto;
min-height: 20px;
display: block;
}
12 changes: 5 additions & 7 deletions src/home/Motus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,11 @@ export default function Motus () {
inputValue={inputValue}
setInputValue={setInputValue}
/>
<div className="history">
<WordHistory
answer={answer}
historyInput={historyInput}
inputValue={inputValue}
/>
</div>
<WordHistory
answer={answer}
historyInput={historyInput}
inputValue={inputValue}
/>
<div className="retry">
<Link to='/' className='button-style'>Page d&rsquo;accueil</Link>
<button onClick={reloadPage} className="button-style">Recommencer</button>
Expand Down
Binary file added src/resources/images/fu_xuan.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/resources/images/retry-bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 149e57f

Please sign in to comment.