-
Notifications
You must be signed in to change notification settings - Fork 754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop #192
Open
nazar-medushevskyi
wants to merge
20
commits into
mate-academy:master
Choose a base branch
from
nazar-medushevskyi:develop
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Develop #192
Changes from 14 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
e88ceb3
addPages
nazar-medushevskyi 5008125
fix-image
nazar-medushevskyi 552f257
added logic for favorites
nazar-medushevskyi fa83e24
last version before basket
nazar-medushevskyi 6035c94
fix
nazar-medushevskyi 2b5cc6b
fixx
nazar-medushevskyi 3f8a51a
added basket logic
nazar-medushevskyi e379781
add logic for basket
nazar-medushevskyi 7f6bb40
addBasketLogic
nazar-medushevskyi ed7b72d
addLogicForB
nazar-medushevskyi 48d9c9c
developp
nazar-medushevskyi ce0b4ff
fix-all
nazar-medushevskyi b144af9
fix2
nazar-medushevskyi 66cdc5b
fix-2
nazar-medushevskyi 91f5e9c
commitForTest&AddData-cy
nazar-medushevskyi 959e1a5
The latest version before fixing the counts in the shopping cart
nazar-medushevskyi cec9cd5
fix-ALL&Finish
nazar-medushevskyi 1d83974
developpp
nazar-medushevskyi ec91912
fix code for preview part 1
nazar-medushevskyi b8cd956
add-Hover
nazar-medushevskyi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,2 @@ | ||
// not empty | ||
|
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,9 +1,75 @@ | ||
import { Route, Routes, useLocation } from 'react-router-dom'; | ||
import './App.scss'; | ||
import { useEffect } from 'react'; | ||
import { FavoriteContextProvider } from './FavoriteContext'; | ||
import { HomePage } from './Components/Pages/HomePage'; | ||
import { Header } from './Components/Header'; | ||
import { NotFoundPage } from './Components/Pages/NotFoundPage'; | ||
import { PhonesPage } from './Components/Pages/PhonesPage'; | ||
import { PhonePreview } from './Components/Pages/PhonePreview'; | ||
import { ContactsPage } from './Components/Pages/Contacts'; | ||
import { Favorite } from './Components/Pages/Favorite'; | ||
import { Basket } from './Components/Pages/Basket'; | ||
import { Rights } from './Components/Pages/Rights/Rights'; | ||
import { Footer } from './Components/Footer'; | ||
|
||
const App = () => ( | ||
<div className="App"> | ||
<h1>React Phone Catalog</h1> | ||
</div> | ||
); | ||
export const App = () => { | ||
const location = useLocation(); | ||
|
||
export default App; | ||
useEffect(() => { | ||
window.scrollTo(0, 0); | ||
}, [location]); | ||
|
||
return ( | ||
<FavoriteContextProvider> | ||
<Header searchValue="" setSearchValue={() => null} /> | ||
|
||
<div className="main"> | ||
<Routes> | ||
<Route path="/" element={<HomePage />} /> | ||
<Route path="/phones" element={<PhonesPage />} /> | ||
<Route path="/phones/:id" element={<PhonePreview />} /> | ||
<Route | ||
path="/tablets" | ||
element={( | ||
<NotFoundPage | ||
title="Tables" | ||
h1="Tablet page under construction" | ||
text=" | ||
the tablet page is not ready yet, we suggest you return to the" | ||
/> | ||
)} | ||
/> | ||
<Route | ||
path="/accessories" | ||
element={( | ||
<NotFoundPage | ||
title="Accessories" | ||
h1="Accessories page under construction" | ||
text=" | ||
accessories page is not ready yet, we suggest you return to the" | ||
/> | ||
)} | ||
/> | ||
<Route path="/favorites" element={<Favorite />} /> | ||
<Route path="/basket" element={<Basket />} /> | ||
<Route path="/contacts" element={<ContactsPage />} /> | ||
<Route path="/rights" element={<Rights />} /> | ||
<Route | ||
path="*" | ||
element={( | ||
<NotFoundPage | ||
title="Page Not Found!" | ||
h1="Page Not Found!" | ||
text="sorry, it looks like you got lost, | ||
we suggest you return to the" | ||
/> | ||
)} | ||
/> | ||
</Routes> | ||
</div> | ||
|
||
<Footer /> | ||
</FavoriteContextProvider> | ||
); | ||
}; |
Empty file.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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,142 @@ | ||
html { | ||
scroll-behavior: smooth; | ||
} | ||
|
||
.header-position { | ||
position: absolute; | ||
left: 0; | ||
top: 0; | ||
right: 0; | ||
} | ||
|
||
.footer { | ||
height: 96px; | ||
box-shadow: 0px -1px 0px 0px #E2E6E9; | ||
background: #FFFFFF; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding: 0 90px; | ||
|
||
&__FirstChild { | ||
display: flex; | ||
align-items: center; | ||
gap: 64px; | ||
|
||
} | ||
|
||
&__FirstChild-nav { | ||
&-list { | ||
margin: 0; | ||
padding: 0; | ||
display: flex; | ||
list-style: none; | ||
font-size: 12px; | ||
font-family: "Mont-Regular", sans-serif; | ||
font-weight: 700; | ||
text-transform: uppercase; | ||
line-height: 5.5; | ||
letter-spacing: 0.48; | ||
word-wrap: break-word; | ||
overflow: hidden; | ||
} | ||
|
||
&-link { | ||
display: flex; | ||
position: relative; | ||
text-decoration: none; | ||
color: #89939A; | ||
transition: .3s; | ||
|
||
&:hover { | ||
color: #313237; | ||
} | ||
} | ||
} | ||
|
||
&__FirstChild-nav-item:not(:last-child) { | ||
|
||
margin-right: 64px; | ||
} | ||
|
||
&__LastChild-arrow { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
width: 32px; | ||
height: 32px; | ||
flex-shrink: 0; | ||
background: #FFF; | ||
border: 1px solid #B4BDC3; | ||
transition: .3s; | ||
|
||
&:hover { | ||
box-shadow: 1px 0px 0px 0px #b7bcc0; | ||
box-shadow: -1px 0px 0px 0px #b7bcc0; | ||
} | ||
|
||
&:focus { | ||
box-shadow: 1px 0px 0px 0px #747779; | ||
box-shadow: -1px 0px 0px 0px #747779; | ||
|
||
} | ||
|
||
&:active { | ||
box-shadow: 1px 0px 0px 0px #000000; | ||
box-shadow: -1px 0px 0px 0px #000000; | ||
|
||
|
||
} | ||
|
||
} | ||
} | ||
|
||
.arrow-svg { | ||
cursor: pointer; | ||
background-size: cover; | ||
background-repeat: no-repeat; | ||
height: 20px; | ||
width: 23px; | ||
} | ||
|
||
.arrow-button { | ||
border: none; | ||
background-color: transparent; | ||
padding: 0; | ||
cursor: pointer; | ||
} | ||
|
||
.logoImage { | ||
height: 24px; | ||
width: 40px; | ||
background-repeat: no-repeat; | ||
transition: .3s; | ||
|
||
&:hover { | ||
height: 32px; | ||
width: 48px; | ||
cursor: pointer; | ||
} | ||
} | ||
|
||
.footer__ThridChild { | ||
display: flex; | ||
align-items: center; | ||
gap: 16px; | ||
} | ||
|
||
.footer-p { | ||
color: #89939A; | ||
text-align: right; | ||
font-size: 12px; | ||
font-family: "Mont-Regular", sans-serif; | ||
font-weight: 600; | ||
} | ||
|
||
.is-activ { | ||
display: flex; | ||
position: relative; | ||
text-decoration: none; | ||
color: #313237; | ||
transition: .3s; | ||
} |
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,84 @@ | ||
import './Footer.scss'; | ||
import { Link, useLocation } from 'react-router-dom'; | ||
import { FC } from 'react'; | ||
import ArrowImage from './Footer-images/Arrow.svg'; | ||
import LogoImage from './Footer-images/LOGO.svg'; | ||
|
||
// import { Header } from '../Header/Header'; | ||
|
||
export const Footer: FC = () => { | ||
const location = useLocation(); | ||
|
||
const handleScrollToTop = () => { | ||
window.scrollTo({ | ||
top: 0, | ||
behavior: 'smooth', | ||
}); | ||
}; | ||
|
||
return ( | ||
<> | ||
|
||
<footer className="footer"> | ||
<div className="footer__FirstChild"> | ||
<div className="footer__FirstChild-logo"> | ||
<Link to="/"> | ||
<img className="logoImage" src={LogoImage} alt="Logo" /> | ||
</Link> | ||
</div> | ||
</div> | ||
|
||
<div className="footer__TwoChild"> | ||
<nav className="footer__FirstChild-nav"> | ||
<ul className="footer__FirstChild-nav-list"> | ||
<li className="footer__FirstChild-nav-item"> | ||
<Link | ||
to="https://github.com/nazar-medushevskyi?tab=repositories" | ||
className="footer__FirstChild-nav-link" | ||
> | ||
Github | ||
</Link> | ||
</li> | ||
<li className="footer__FirstChild-nav-item"> | ||
<Link | ||
to="/contacts" | ||
className={`footer__FirstChild-nav-link ${location.pathname === '/contacts' ? 'is-activ' : ''}`} | ||
> | ||
Contacts | ||
</Link> | ||
</li> | ||
<li className="footer__FirstChild-nav-item"> | ||
<Link | ||
to="/rights" | ||
className={`footer__FirstChild-nav-link ${location.pathname === '/rights' ? 'is-activ' : ''}`} | ||
> | ||
rights | ||
</Link> | ||
</li> | ||
</ul> | ||
</nav> | ||
</div> | ||
|
||
<div className="footer__ThridChild"> | ||
<p className="footer-p">Back to top</p> | ||
<div className="footer__LastChild-arrow"> | ||
|
||
<button | ||
type="button" | ||
className="arrow-button" | ||
onClick={handleScrollToTop} | ||
> | ||
<img | ||
className="arrow-svg" | ||
src={ArrowImage} | ||
alt="basket" | ||
/> | ||
</button> | ||
|
||
</div> | ||
</div> | ||
|
||
</footer> | ||
</> | ||
); | ||
}; |
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 @@ | ||
export { Footer } from './Footer'; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant fragment