Skip to content
This repository was archived by the owner on Mar 9, 2021. It is now read-only.

New design and migration to emotion(css-in-js) #107

Merged
merged 43 commits into from
Nov 19, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
e1eadc3
modify landingpage according to mockup
vinaypuppal Nov 13, 2017
e0aebcb
test netlify deploys
vinaypuppal Nov 13, 2017
3d4dd9a
Merge branch 'devlop' into landing-page
vinaypuppal Nov 13, 2017
3b495f9
few suggestion from #41 (comment)
vinaypuppal Nov 13, 2017
662e283
Merge branch 'landing-page' of github.com:coderplex/coderplex into la…
vinaypuppal Nov 13, 2017
5932611
migrated header and footer to emotion
vinaypuppal Nov 14, 2017
ad9270c
migrated hero and learn section to emotion
vinaypuppal Nov 14, 2017
cf2e306
use preact in production
vinaypuppal Nov 14, 2017
614a3fd
fix some responsive issues
vinaypuppal Nov 14, 2017
ee96945
add vscode support css autocomplete for emotion
vinaypuppal Nov 15, 2017
6502c94
fix responsive padding issues
vinaypuppal Nov 15, 2017
ca6c04a
change export routes
vinaypuppal Nov 15, 2017
6c147a9
disable eslint and add editorconfig
vinaypuppal Nov 15, 2017
a8f2e4d
make breakpoints consistent
vinaypuppal Nov 15, 2017
51ee1b6
move images to cloudinary
vinaypuppal Nov 15, 2017
d70ac70
few improvements from lighthouse
vinaypuppal Nov 16, 2017
52ada79
fix test and lint issues
vinaypuppal Nov 16, 2017
2a93040
update readme
vinaypuppal Nov 16, 2017
3d2501a
extract subject card to file
vinaypuppal Nov 16, 2017
57802a4
migrate space page to emotion
vinaypuppal Nov 16, 2017
5873897
migrate learn index page to emotion
vinaypuppal Nov 16, 2017
f1f4180
trim subtitle text
vinaypuppal Nov 16, 2017
b698493
change webp to png as most browser doesnt support it
vinaypuppal Nov 16, 2017
90265b4
wip events page
vinaypuppal Nov 16, 2017
b495b7c
wip subject page
vinaypuppal Nov 16, 2017
3883e03
update text and youtube link
vinaypuppal Nov 16, 2017
cfab820
change white button hover color
vinaypuppal Nov 16, 2017
c12dcd6
disable emotion cache
vinaypuppal Nov 16, 2017
95e8603
fix padding issue in learn section
vinaypuppal Nov 16, 2017
5b849a4
disable preact due to hydrate bug
vinaypuppal Nov 16, 2017
bf3a31b
revert hover color on buttons
vinaypuppal Nov 16, 2017
6391b26
reduce timeline icons size
vinaypuppal Nov 16, 2017
cdd8960
Merge branch 'develop' into emotion
vinaypuppal Nov 16, 2017
6910dc9
shadow for buttons removed
Nov 17, 2017
15e9241
fixed on hover of menu bar items
Nov 17, 2017
4e5c2b1
transform on card of learn removed,this might change later
Nov 17, 2017
d414d63
remove semantic-ui-react and ignore .vscode
vinaypuppal Nov 18, 2017
3d7559a
Merge branch 'emotion' of github.com:coderplex/coderplex into emotion
vinaypuppal Nov 18, 2017
996547c
remove .vscode/* and jsconfig.json from git cache
vinaypuppal Nov 18, 2017
686abb9
extract prettier config to .prettierrc file
vinaypuppal Nov 18, 2017
5539cf5
fix link in discord btn
vinaypuppal Nov 18, 2017
491320c
disable user-select and add login page
vinaypuppal Nov 19, 2017
1bc13cc
configure yarnclean
vinaypuppal Nov 19, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix responsive padding issues
  • Loading branch information
vinaypuppal committed Nov 15, 2017
commit 6502c94b2a37a6b5d241b9d48271121d195b5adb
1 change: 1 addition & 0 deletions components/common/footer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ export default class FooterBar extends React.Component {
justify="center"
width={[1, 1, 1 / 2]}
p={[2, 1]}
px={[2, 3]}
>
<Title>
We are constanly updating our platform. If you would like to
Expand Down
47 changes: 34 additions & 13 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import take from 'lodash.take';
import Link from 'next/link';

import { Container, baseButton } from '../utils/base.styles';
import Hide from '../utils/hide';
import { listOfSubjects } from '../utils/mock-data';
import Layout from '../components/common/layout';

Expand Down Expand Up @@ -79,7 +80,7 @@ const SpaceSection = styled.section`
& .box {
position: relative;
z-index: 2;
@media (max-width: 1000px) {
@media (max-width: 831px) {
text-align: center;
}
}
Expand All @@ -96,7 +97,16 @@ const EventsSection = styled.section`
& .box {
position: relative;
z-index: 2;
@media (max-width: 1000px) {
& img {
width: 100%;
@media (max-width: 831px) {
width: 50%;
}
@media (max-width: 600px) {
width: 100%;
}
}
@media (max-width: 831px) {
text-align: center;
}
}
Expand All @@ -118,7 +128,7 @@ const Title = styled.h2`
font-size: 2rem;
font-weight: 400;
color: ${props => (props.inverted ? '#7657fb' : '#fff')};
@media (max-width: 1000px) {
@media (max-width: 831px) {
font-size: 1.8rem;
text-align: center;
}
Expand All @@ -132,7 +142,7 @@ const SubTitle = styled.h3`
font-size: ${props => (props.small ? '1rem' : '1.2rem')};
font-weight: 400;
color: ${props => (props.inverted ? '#222' : '#fff')};
@media (max-width: 1000px) {
@media (max-width: 831px) {
font-size: 1rem;
text-align: center;
}
Expand All @@ -144,13 +154,13 @@ const SubTitle = styled.h3`

const SpaceOverlay = styled.div`
background: #6f19ed;
height: 220px;
height: 200px;
width: 100%;
position: absolute;
z-index: 1;
bottom: 0;
left: 0;
@media (max-width: 832px) {
@media (max-width: 831px) {
display: none;
}
`;
Expand All @@ -170,14 +180,14 @@ export default () => (
<LearnSection>
<Container>
<Flex justify="center" align="center" direction="column">
<Box width={1} pb={[1, 2]} pt={[2, 3]} px={[2, 0]}>
<Box width={1} pb={[1, 2]} pt={[2, 3]} px={[2, 3]}>
<Title inverted>Open Source Learning Guides</Title>
<SubTitle inverted>
Our guides are crowd-sourced recommendations of free online
resources to learn any technology
</SubTitle>
</Box>
<Box width={1} pb={[2, 3]} pt={[1]} px={[3, 2, 0]}>
<Box width={1} pb={[2, 3]} pt={[1]} px={[2, 0]}>
<Flex justify="center" align="center" wrap>
{take(listOfSubjects, 6).map(subject => {
return (
Expand Down Expand Up @@ -221,7 +231,7 @@ export default () => (
className="box"
width={[1, 1, 1 / 2]}
py={[0, 2, 3]}
px={[2, 4, 2]}
px={[2, 4, 3]}
>
<Title>Offline Co-Learning Spaces</Title>
<SubTitle small>
Expand Down Expand Up @@ -252,7 +262,7 @@ export default () => (
width={[1, 1, 1 / 2]}
pt={4}
pb={[0, 1, 4]}
px={[3, 4, 2]}
px={[3, 4, 3]}
>
<img className="space__img" src="/static/space.svg" />
</Box>
Expand All @@ -264,9 +274,17 @@ export default () => (
<Container>
<Flex align="center" justify="center" wrap>
<Box order={[2, 2, 1]} width={[1, 1, 1 / 2]} px={[4, 4, 3]}>
<img src="/static/events.png" alt="events__pic" />
<Hide sm xs>
<img src="/static/events.png" alt="events__pic" />
</Hide>
</Box>
<Box order={1} width={[1, 1, 1 / 2]} px={[1, 3]} pt={[3, 4, 0]}>
<Box
order={1}
width={[1, 1, 1 / 2]}
px={[2, 3]}
pt={[3, 4, 0]}
pb={[4, 4, 0]}
>
<Title>Online & Offline Events</Title>
<SubTitle small>
We do frequent online and offline events, covering broad range of
Expand All @@ -275,7 +293,10 @@ export default () => (
collaboration. We also partner with local comunities to help them
reach a wider audience.
</SubTitle>
<Box className="box" width={[1]} pt={[2]}>
<Box className="box" width={[1]} pt={[2]} px={[3, 0]}>
<Hide md lg>
<img src="/static/events.png" alt="events__pic" />
</Hide>
<Link href={'/events'}>
<Button>VIEW ALL EVENTS</Button>
</Link>
Expand Down
26 changes: 26 additions & 0 deletions utils/hide.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import styled from 'react-emotion';

export const breakpoints = {
xs: '@media screen and (max-width: 40em)',
sm: '@media screen and (min-width: 40em) and (max-width: 52em)',
md: '@media screen and (min-width: 52em) and (max-width: 64em)',
lg: '@media screen and (min-width: 64em)',
};

export const hidden = key => props =>
props[key]
? {
[breakpoints[key]]: {
display: 'none',
},
}
: null;

export const xs = hidden('xs');
export const sm = hidden('sm');
export const md = hidden('md');
export const lg = hidden('lg');

const Hide = styled.div([], xs, sm, md, lg);

export default Hide;