-
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.
- Loading branch information
Ahmed-osama
committed
Jul 30, 2019
1 parent
6afeb3e
commit a0c691c
Showing
15 changed files
with
254 additions
and
103 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
2 changes: 1 addition & 1 deletion
2
...autodll-webpack-plugin/development_instance_0_3014baded4b68fbce8c2b900032db124/stats.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"name":"ASOIAF","version":"1.0.0","description":"","main":"index.js","dependencies":{"isomorphic-unfetch":"^3.0.0","lodash":"^4.17.15","next":"^9.0.2","now":"^15.8.7","react":"^16.8.6","react-dom":"^16.8.6","styled-components":"^4.3.2"},"devDependencies":{"babel-plugin-styled-components":"^1.10.6"},"scripts":{"dev":"next","build":"next build","start":"next start"},"keywords":[],"author":"","license":"ISC","readme":"ERROR: No README data found!","_id":"ASOIAF@1.0.0"} | ||
{"name":"ASOIAF","version":"1.0.0","description":"","main":"index.js","dependencies":{"isomorphic-unfetch":"^3.0.0","lodash":"^4.17.15","next":"^9.0.2","now":"^15.8.7","polished":"^3.4.1","react":"^16.8.6","react-dom":"^16.8.6","styled-components":"^4.3.2"},"devDependencies":{"babel-plugin-styled-components":"^1.10.6"},"scripts":{"dev":"next","build":"next build","start":"next start"},"keywords":[],"author":"","license":"ISC","readme":"ERROR: No README data found!","_id":"ASOIAF@1.0.0"} |
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 @@ | ||
{"/_app":"static/development/pages/_app.js","/_document":"static/development/pages/_document.js","/_error":"static/development/pages/_error.js","/character/[slug]":"static/development/pages/character/[slug].js","/house/[name]":"static/development/pages/house/[name].js","/index":"static/development/pages/index.js","/next/dist/pages/_error":"static/development/pages/next/dist/pages/_error.js","/":"static/development/pages/index.js"} | ||
{"/_app":"static/development/pages/_app.js","/_document":"static/development/pages/_document.js","/_error":"static/development/pages/_error.js","/house/[name]":"static/development/pages/house/[name].js","/index":"static/development/pages/index.js","/":"static/development/pages/index.js"} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
components/Character/index.jsx → components/CharacterLink/index.jsx
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,9 @@ | ||
import Link from "next/link"; | ||
|
||
export const Character = ({ slug, name }) => ( | ||
export const CharacterLink = ({ slug, children }) => ( | ||
<> | ||
<Link href="/character/[slug]" as={`/character/${slug}`}> | ||
<a>{name}</a> | ||
{children} | ||
</Link> | ||
</> | ||
); |
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,71 @@ | ||
import styled from "styled-components"; | ||
import { Card } from "."; | ||
import { CharacterLink } from "../components/CharacterLink"; | ||
const anonymous = `https://themerkle.com/wp-content/uploads/2017/02/shutterstock_153830195.jpg`; | ||
const CharName = styled.h4` | ||
font-size: 16px; | ||
text-align: center; | ||
margin-top: 10px; | ||
margin-bottom: 10px; | ||
font-weight: 700; | ||
padding: 0 10px; | ||
a { | ||
display: block; | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
overflow: hidden; | ||
text-decoration: none; | ||
} | ||
`; | ||
|
||
const Avatar = styled.img.attrs(props => ({ | ||
src: props.src | ||
}))` | ||
min-width: 100%; | ||
min-height: 100%; | ||
min-width: 100px; | ||
max-height: 100px; | ||
marginautoborder-raius: 50%; | ||
margin: auto; | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
margin: auto; | ||
`; | ||
const AvatarContainer = styled.div` | ||
position: relative; | ||
margin: auto; | ||
margin-top: 10px; | ||
width: 100px; | ||
height: 100px; | ||
border-radius: 50%; | ||
overflow: hidden; | ||
`; | ||
|
||
const ColumnFlex = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
`; | ||
const Pointer = styled.a` | ||
cursor: pointer; | ||
`; | ||
|
||
const NormalCard = Card("div"); | ||
export default props => { | ||
return ( | ||
<NormalCard mb={30}> | ||
<CharacterLink {...props}> | ||
<Pointer> | ||
<ColumnFlex> | ||
<AvatarContainer> | ||
<Avatar src={props.image || anonymous} /> | ||
</AvatarContainer> | ||
<CharName>{props.name}</CharName> | ||
</ColumnFlex> | ||
</Pointer> | ||
</CharacterLink> | ||
</NormalCard> | ||
); | ||
}; |
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
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
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
Oops, something went wrong.