generated from goitacademy/react-homework-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added statistics and navigation layout
- Loading branch information
1 parent
8f8ab9b
commit 9531f92
Showing
13 changed files
with
342 additions
and
40 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#root { | ||
max-width: 1280px; | ||
margin: 0 auto; | ||
text-align: center; | ||
} | ||
|
||
.logo { | ||
height: 6em; | ||
padding: 1.5em; | ||
will-change: filter; | ||
transition: filter 300ms; | ||
} | ||
|
||
.logo:hover { | ||
filter: drop-shadow(0 0 2em #646cffaa); | ||
} | ||
|
||
.logo.react:hover { | ||
filter: drop-shadow(0 0 2em #61dafbaa); | ||
} | ||
|
||
@keyframes logo-spin { | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
|
||
to { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
|
||
@media (prefers-reduced-motion: no-preference) { | ||
a:nth-of-type(2) .logo { | ||
animation: logo-spin infinite 20s linear; | ||
} | ||
} | ||
|
||
.card { | ||
padding: 2em; | ||
} | ||
|
||
.read-the-docs { | ||
color: #888; | ||
} |
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,11 +1,14 @@ | ||
// import TweetsPage from 'pages/TweetsPage'; | ||
import './App.css'; | ||
import Tweet from './Tweet/Tweet'; | ||
|
||
export const App = () => { | ||
const App = () => { | ||
return ( | ||
<div> | ||
{/* <TweetsPage /> */} | ||
<Tweet /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default App; |
Empty file.
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,31 @@ | ||
import { NavLink } from 'react-router-dom'; | ||
import styled from '@emotion/styled'; | ||
|
||
export const AppNav = styled.nav` | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
background-color: #333; | ||
color: #fff; | ||
padding: 10px 20px; | ||
width: 1280px; | ||
`; | ||
|
||
export const NavLinks = styled.ul` | ||
display: flex; | ||
list-style: none; | ||
margin: 0; | ||
padding: 0; | ||
`; | ||
|
||
export const NavItem = styled.li` | ||
margin-right: 20px; | ||
`; | ||
|
||
export const NavLinkStyled = styled(NavLink)` | ||
color: #fff; | ||
text-decoration: none; | ||
&:hover { | ||
text-decoration: underline; | ||
} | ||
`; |
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,13 @@ | ||
import { List, ListItem } from './StatisticsList.styled'; | ||
import numeral from 'numeral'; | ||
|
||
const StatisticsList = ({ tweets, followers }) => { | ||
return ( | ||
<List> | ||
<ListItem>{numeral(tweets).format('0, 0')} tweets</ListItem> | ||
<ListItem>{numeral(followers).format('0, 0')} followers</ListItem> | ||
</List> | ||
); | ||
}; | ||
|
||
export default StatisticsList; |
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,25 @@ | ||
import styled from "@emotion/styled"; | ||
|
||
export const List = styled.ul` | ||
margin: 0; | ||
padding: 0; | ||
position: absolute; | ||
list-style: none; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
top: 284px; | ||
width: 100%; | ||
gap: 16px; | ||
`; | ||
|
||
export const ListItem = styled.li` | ||
font-family: "Montserrat", sans-serif; | ||
font-style: normal; | ||
font-weight: 500; | ||
font-size: 20px; | ||
line-height: 24px; | ||
text-transform: uppercase; | ||
color: #ebd8ff; | ||
`; |
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
Oops, something went wrong.