generated from goitacademy/react-homework-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from Mayotopia04/arvi-branch
Arvi's updated codes for hompage and sidebard
- Loading branch information
Showing
5 changed files
with
153 additions
and
162 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
https://github.com/Mayotopia04/Team-Outfit/pull/5 | ||
https://github.com/Mayotopia04/Team-Outfit/pull/5 | ||
https://github.com/Mayotopia04/Team-Outfit/pull/14 | ||
https://github.com/Mayotopia04/Team-Outfit/pull/1#issue-2378652746 | ||
https://github.com/Mayotopia04/Team-Outfit/pull/1/commits/69eb61f2932e2af3ee68bbfab4cb2ff4d05fbfd6 |
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 |
---|---|---|
@@ -1,116 +1,120 @@ | ||
$sideBarColor: #ffffff; | ||
/* Set sidebar background color to white */ | ||
|
||
.asideBox { | ||
margin: 0 -20px; | ||
background: $sideBarColor; | ||
padding: 40px 20px; | ||
min-width: 280px; | ||
min-height: 433px; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
gap: 40px; | ||
|
||
@media #{$minTablet} { | ||
margin: 0 -32px; | ||
width: 100%; | ||
min-height: 166px; | ||
flex-direction: row; | ||
align-items: flex-start; | ||
justify-content: space-between; | ||
padding: 80px 88px; | ||
background-image: url('../../helpers/images/leaves-aside-tablet.png'); | ||
background-repeat: no-repeat; | ||
background-position: top -180px; | ||
} | ||
.sideBar { | ||
width: 440px; | ||
padding: 40px 0 84px 0; | ||
/* color */ | ||
color: var(--second-color); | ||
/* font */ | ||
line-height: 1.21; | ||
} | ||
|
||
@media #{$desktop} { | ||
margin: 0 -32px; | ||
background: $sideBarColor; | ||
margin-left: auto; | ||
gap: 60px; | ||
padding: 0; | ||
width: 497px; | ||
height: 850px; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
background-image: url('../../helpers/images/leaves-desktop-aside.png'); | ||
background-repeat: no-repeat; | ||
background-position: 0 -80%; | ||
overflow: auto; | ||
} | ||
.section { | ||
width: 100%; | ||
} | ||
|
||
.title { | ||
margin-bottom: 20px; | ||
font-weight: 700; | ||
/* color */ | ||
color: var(--main-color); | ||
/* font */ | ||
font-size: 14px; | ||
line-height: 17px; | ||
letter-spacing: 0.04em; | ||
color: #212121; | ||
} | ||
|
||
@media screen and (min-width: 1280px) { | ||
margin-bottom: 38px; | ||
} | ||
.item { | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
|
||
.div { | ||
min-width: 280px; | ||
max-width: 520px; | ||
.item:not(:last-child) { | ||
margin-bottom: 15px; | ||
} | ||
|
||
@media screen and (min-width: 768px) { | ||
width: 244px; | ||
} | ||
.button { | ||
border: none; | ||
color: inherit; | ||
transition: color 250ms linear; | ||
} | ||
|
||
@media screen and (min-width: 1280px) { | ||
width: 290px; | ||
} | ||
.button:hover, | ||
.button:focus, | ||
.button:active { | ||
color: var(--accent-color); | ||
} | ||
|
||
.kcalList { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 20px; | ||
.additional { | ||
margin-top: 40px; | ||
} | ||
|
||
.kcalItem { | ||
display: flex; | ||
justify-content: space-between; | ||
.productsList { | ||
padding-right: 10px; | ||
max-height: 160px; | ||
overflow-y: auto; | ||
} | ||
|
||
$textBaseStyles: ` font-weight: 400; | ||
font-size: 14px; | ||
line-height: 17px; | ||
letter-spacing: 0.04em; | ||
color: #9b9faa; | ||
`; | ||
.productsList::-webkit-scrollbar { | ||
width: 6px; | ||
} | ||
|
||
.text { | ||
#{$textBaseStyles} | ||
.productsList::-webkit-scrollbar-track { | ||
background-color: var(--bg-color); | ||
} | ||
|
||
.span { | ||
#{$textBaseStyles} | ||
.productsList::-webkit-scrollbar-thumb { | ||
background-color: var(--third-color); | ||
} | ||
|
||
.productList { | ||
display: flex; | ||
flex-direction: column; | ||
height: 200px; | ||
gap: 20px; | ||
overflow-y: scroll; | ||
@media screen and (max-width: 479px) { | ||
.sideBar { | ||
width: 100%; | ||
} | ||
} | ||
|
||
@media screen and (max-width: 767px) { | ||
.section:first-child { | ||
margin-bottom: 40px; | ||
} | ||
} | ||
|
||
&::-webkit-scrollbar { | ||
width: 6px; | ||
@media screen and (min-width: 768px) { | ||
.sideBar { | ||
width: 610px; | ||
padding: 80px 0 90px 0; | ||
} | ||
|
||
&::-webkit-scrollbar-track { | ||
background: #e2e2e2; | ||
.box { | ||
display: flex; | ||
} | ||
|
||
.section:first-child { | ||
flex-shrink: 0; | ||
width: 288px; | ||
margin-right: 80px; | ||
} | ||
|
||
.title { | ||
margin-bottom: 30px; | ||
} | ||
|
||
.additional { | ||
max-width: 360px; | ||
margin-left: auto; | ||
margin-right: auto; | ||
} | ||
} | ||
|
||
@media screen and (min-width: 1280px) { | ||
.sideBar { | ||
width: 288px; | ||
padding: 0; | ||
margin-left: auto; | ||
margin-right: 80px; | ||
} | ||
|
||
.box { | ||
flex-direction: column; | ||
} | ||
|
||
&::-webkit-scrollbar-thumb { | ||
background-color: #264061; | ||
.section:first-child { | ||
margin-right: 0; | ||
margin-bottom: 60px; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,21 +1,18 @@ | ||
import React from 'react'; | ||
import CalcForm from 'components/CalcForm'; | ||
import { Container } from 'components/Container'; | ||
import ThemeSwitcher from 'components/ThemeSwitcher'; | ||
import styles from './Home.module.scss'; // Import SCSS module | ||
import s from './HomePage.module.css'; | ||
|
||
const Home = () => { | ||
import { Container, DailyCaloriesForm } from 'components'; | ||
|
||
const HomePage = () => { | ||
return ( | ||
<div className={styles.Container}> | ||
<div className={styles.MainGrid}> | ||
<CalcForm /> | ||
</div> | ||
<div className={styles.ThemeSwitcherBox}> | ||
<ThemeSwitcher /> | ||
</div> | ||
</div> | ||
<main> | ||
<section className={s.section}> | ||
<Container> | ||
<h3 className="visually-hidden">HomePage </h3> | ||
<DailyCaloriesForm /> | ||
</Container> | ||
</section> | ||
</main> | ||
); | ||
}; | ||
|
||
export default Home; | ||
|
||
export default HomePage; |
Oops, something went wrong.