Skip to content

Commit

Permalink
refactor: change layout
Browse files Browse the repository at this point in the history
  • Loading branch information
uhmtoto committed Dec 28, 2019
1 parent 3aa8ddb commit fcc132a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 6 deletions.
18 changes: 16 additions & 2 deletions src/components/Navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ class Navbar extends React.Component {
<Nav>
<Brand>JnJ Communications</Brand>
<div>
<ul>
<ItemWrapper>
<Item>Introduce</Item>
<Link to="/stacks">
<Item>What we used</Item>
</Link>
<Link to="/products">
<Item>What we made</Item>
</Link>
</ul>
</ItemWrapper>
</div>
</Nav>
)
Expand All @@ -32,6 +32,10 @@ const Nav = styled.nav`
display: flex;
justify-content: flex-end;
align-items: center;
@media (max-width: 1100px) {
justify-content: center;
}
`

const Brand = styled.h1`
Expand All @@ -43,6 +47,16 @@ const Brand = styled.h1`
letter-spacing: -1px;
margin: 0;
cursor: default;
@media (max-width: 1100px) {
position: unset;
}
`

const ItemWrapper = styled.ul`
@media (max-width: 1100px) {
display: none;
}
`

const Item = styled.span`
Expand Down
9 changes: 7 additions & 2 deletions src/pages/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Home extends React.Component {
</Button>
</ButtonWrapper>
</IdentityWrapper>
<Illust
<IllustBox
src={DeveloperIllust}
alt="Thingking Code"
/>
Expand All @@ -48,8 +48,13 @@ const Container = styled.div`
flex-wrap: wrap;
`

const Illust = styled.img`
const IllustBox = styled.img`
height: 37rem;
@media (max-width: 900px) {
width: 100%;
height: auto;
}
`

const IdentityWrapper = styled.div`
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Products.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const Container = styled.div`
`

const Image = styled.img`
width: 25rem;
width: 50vw;
@media (max-width: 805px) {
display: none;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Stacks.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const Container = styled.div`
`

const Image = styled.img`
width: 25rem;
width: 30rem;
@media (max-width: 690px) {
display: none;
Expand Down

0 comments on commit fcc132a

Please sign in to comment.