Skip to content

Commit

Permalink
style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zuba2033 committed Sep 21, 2023
1 parent 683c26a commit b6f3c56
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/components/missionManifest/missionManifest.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
justify-content: center;
align-items: center;
column-gap: 20px;
padding: 20px 20px;
padding: 15px;
background-color: $blocks-color;
min-height: 100%;
&__img {
Expand Down
34 changes: 29 additions & 5 deletions src/components/roverFilter/RoverFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const RoverFilter = () => {
const manifest = useSelector(state => state.manifest);
const { selectedRover } = useSelector(state => state.form);

const disabled = manifest.manifestLoadingStatus === "loading"
const disabled = manifest.manifestLoadingStatus === "loading";

const onRadioChange = (e) => {
dispatch(roverFilterChanged(e.target.value));
Expand All @@ -23,19 +23,43 @@ const RoverFilter = () => {
<h2 className={titleClassList}>Select rover</h2>
<div className="roverFilter__inputs">
<label className="roverFilter__input">
<input disabled={disabled} type="radio" name="rover-choise" id="curiosity" value="curiosity" onChange={onRadioChange}/>
<input disabled={disabled}
checked={selectedRover === "curiosity"}
type="radio"
name="rover-choise"
id="curiosity"
value="curiosity"
onChange={onRadioChange}/>
<span htmlFor="curiosity">Curiosity</span>
</label>
<label className="roverFilter__input">
<input disabled={disabled} type="radio" name="rover-choise" id="opportunity" value="opportunity" onChange={onRadioChange}/>
<input disabled={disabled}
checked={selectedRover === "opportunity"}
type="radio"
name="rover-choise"
id="opportunity"
value="opportunity"
onChange={onRadioChange}/>
<span>Opportunity</span>
</label>
<label className="roverFilter__input">
<input disabled={disabled} type="radio" name="rover-choise" id="spirit" value="spirit" onChange={onRadioChange}/>
<input disabled={disabled}
checked={selectedRover === "spirit"}
type="radio"
name="rover-choise"
id="spirit"
value="spirit"
onChange={onRadioChange}/>
<span>Spirit</span>
</label>
<label className="roverFilter__input">
<input disabled={disabled} type="radio" name="rover-choise" id="perseverance" value="perseverance" onChange={onRadioChange}/>
<input disabled={disabled}
checked={selectedRover === "perseverance"}
type="radio"
name="rover-choise"
id="perseverance"
value="perseverance"
onChange={onRadioChange}/>
<span >Perseverance</span>
</label>
</div>
Expand Down
14 changes: 12 additions & 2 deletions src/components/welcomeBlock/WelcomeBlock.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
import { useDispatch } from 'react-redux';
import { roverFilterChanged } from '../../slices/formSlice';

import './welcomeBlock.scss';

const WelcomeBlock = () => {

const dispatch = useDispatch();

const onPerseveranceClick = () => {
dispatch(roverFilterChanged("perseverance"));
}

return (
<header className="welcomeBlock">
<h1 className="welcomeBlock__title">Dear friend!</h1>
<div className="welcomeBlock__text">
Here you can see the photos from the surface of Mars!
<ul className="welcomeBlock__list">
<li>Choose rover. The <span>Perseverance</span> is recommended!</li>
<li>Choose rover. The <span onClick={() => onPerseveranceClick()}>Perseverance</span> is recommended!</li>
<li>Choose sol (Martian day). Or click random</li>
<li>Load the gallery</li>
<li>Open the slider when the gallery is loaded!</li>
</ul>
<div className="welcomeBlock__contacts">
For any issues contact me on <a href="https://github.com/zuba2033/mars-photos/issues">GitHub!</a>
For any issues contact me on <a href="https://github.com/zuba2033/mars-photos/issues" rel="noreferrer" target="_blank">GitHub!</a>
</div>
</div>
</header>
Expand Down
2 changes: 2 additions & 0 deletions src/components/welcomeBlock/welcomeBlock.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
height: 100%;
background: $blocks-color;
padding: 20px;
user-select: none;
&__title {
text-align: center;
}
Expand All @@ -26,6 +27,7 @@
position: relative;
margin-left: 20px;
span {
cursor: pointer;
display: inline-block;
border-bottom: 1.5px solid #fff;
}
Expand Down
15 changes: 6 additions & 9 deletions src/styles/bgstars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ $shadows-big: multiple-box-shadow(350);

html {
height: 100%;
background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
background: #090A0F;
}

#stars {
width: 1px;
height: 1px;
background: transparent;
box-shadow: $shadows-small;
animation: animStar 200s linear infinite;
animation: animStar 250s linear infinite;
&:after {
content: " ";
position: absolute;
top: 2000px;
top: 100%;
width: 1px;
height: 1px;
background: transparent;
Expand All @@ -39,11 +39,11 @@ html {
height: 2px;
background: transparent;
box-shadow: $shadows-medium;
animation : animStar 250s linear infinite;
animation : animStar 300s linear infinite;
&:after {
content: " ";
position: absolute;
top: 2000px;
top: 100%;
width: 2px;
height: 2px;
background: transparent;
Expand All @@ -56,12 +56,9 @@ html {
height: 3px;
background: transparent;
box-shadow: $shadows-big;
animation: animStar 300s linear infinite;
animation: animStar 350s linear infinite;
}




@keyframes animStar {
from {
transform: translateY(0px);
Expand Down
5 changes: 4 additions & 1 deletion src/styles/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ body {

.button {
color: #fff;
user-select: none;
background-color: $btn-color;
text-align: center;
font-weight: 700;
Expand All @@ -73,8 +74,10 @@ body {
}

.App {
user-select: none;
max-width: 1150px;
min-height: 100vh;
max-height: min-content;
margin: 0 auto;
padding: 20px;
color: #fff;
Expand All @@ -84,7 +87,7 @@ body {
transition: padding 1s;
display: grid;
column-gap: 20px;
grid-template-columns: calc(45% - 5px) calc(55% - 15px);
grid-template-columns: calc(46% - 5px) calc(54% - 15px);
}
}

Expand Down

0 comments on commit b6f3c56

Please sign in to comment.