Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #18 from You-J/master
Browse files Browse the repository at this point in the history
Add responsive design sections
  • Loading branch information
softmarshmallow committed Nov 5, 2020
2 parents dbc951e + 1163c10 commit 39f9110
Show file tree
Hide file tree
Showing 13 changed files with 166 additions and 33 deletions.
82 changes: 75 additions & 7 deletions common/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,26 @@ const theme = createMuiTheme({

theme.typography.h1 = {
fontWeight: 900,
fontSize: '7rem',
fontSize: '112px',
lineHeight: '100%',
// fontFamily: 'Roboto',

[theme.breakpoints.down('md')]: {
fontWeight: 900,
fontSize: '76px',
lineHeight: '100%',
},
[theme.breakpoints.down('xs')]: {
[theme.breakpoints.down('sm')]: {
fontWeight: 900,
fontSize: '64px',
lineHeight: '100%',
},
[theme.breakpoints.down('xs')]: {
fontWeight: 900,
fontSize: '36px',
lineHeight: '100%',

letterSpacing: '0.01em',
},
};

theme.typography.h2 = {
Expand All @@ -44,11 +50,16 @@ theme.typography.h2 = {
fontSize: '64px',
lineHeight: '100%',
},
[theme.breakpoints.down('xs')]: {
[theme.breakpoints.down('sm')]: {
fontWeight: 'bold',
fontSize: '48px',
lineHeight: '100%',
},
[theme.breakpoints.down('xs')]: {
fontWeight: 'bold',
fontSize: '36px',
lineHeight: '100%',
},
};

theme.typography.h3 = {
Expand All @@ -60,11 +71,16 @@ theme.typography.h3 = {
fontSize: '48px',
lineHeight: '56px',
},
[theme.breakpoints.down('xs')]: {
[theme.breakpoints.down('sm')]: {
fontWeight: 500,
fontSize: '36px',
lineHeight: '42px',
},
[theme.breakpoints.down('xs')]: {
fontWeight: 500,
fontSize: '32px',
lineHeight: '37px',
},
};

theme.typography.h4 = {
Expand All @@ -76,11 +92,16 @@ theme.typography.h4 = {
fontSize: '48px',
lineHeight: '56px',
},
[theme.breakpoints.down('xs')]: {
[theme.breakpoints.down('sm')]: {
fontWeight: 900,
fontSize: '36px',
lineHeight: '42px',
},
[theme.breakpoints.down('xs')]: {
fontWeight: 900,
fontSize: '32px',
lineHeight: '37px',
},
};

theme.typography.h5 = {
Expand All @@ -92,6 +113,11 @@ theme.typography.h5 = {
fontSize: '36px',
lineHeight: '42px',
},
[theme.breakpoints.down('sm')]: {
fontWeight: 900,
fontSize: '24px',
lineHeight: '28px',
},
[theme.breakpoints.down('xs')]: {
fontWeight: 900,
fontSize: '24px',
Expand All @@ -108,6 +134,11 @@ theme.typography.h6 = {
fontSize: '36px',
lineHeight: '135%',
},
[theme.breakpoints.down('sm')]: {
fontWeight: 500,
fontSize: '24px',
lineHeight: '135%',
},
[theme.breakpoints.down('xs')]: {
fontWeight: 500,
fontSize: '24px',
Expand All @@ -124,6 +155,11 @@ theme.typography.subtitle1 = {
fontSize: '21px',
lineHeight: '25px',
},
[theme.breakpoints.down('sm')]: {
fontWeight: 'bold',
fontSize: '18px',
lineHeight: '21px',
},
[theme.breakpoints.down('xs')]: {
fontWeight: 'bold',
fontSize: '18px',
Expand All @@ -140,11 +176,16 @@ theme.typography.subtitle2 = {
fontSize: '18px',
lineHeight: '21px',
},
[theme.breakpoints.down('xs')]: {
[theme.breakpoints.down('sm')]: {
fontWeight: 'bold',
fontSize: '21px',
lineHeight: '25px',
},
[theme.breakpoints.down('xs')]: {
fontWeight: 'bold',
fontSize: '14px',
lineHeight: '16px',
},
};

theme.typography.body1 = {
Expand All @@ -156,6 +197,11 @@ theme.typography.body1 = {
fontSize: '18px',
lineHeight: '21px',
},
[theme.breakpoints.down('sm')]: {
fontWeight: 500,
fontSize: '12px',
lineHeight: '14px',
},
[theme.breakpoints.down('xs')]: {
fontWeight: 500,
fontSize: '12px',
Expand All @@ -172,6 +218,11 @@ theme.typography.body2 = {
fontSize: '18px',
lineHeight: '21px',
},
[theme.breakpoints.down('sm')]: {
fontWeight: 'normal',
fontSize: '11px',
lineHeight: '13px',
},
[theme.breakpoints.down('xs')]: {
fontWeight: 'normal',
fontSize: '11px',
Expand All @@ -190,6 +241,12 @@ theme.typography.button = {
lineHeight: '28px',
fontVariant: 'small-caps',
},
[theme.breakpoints.down('sm')]: {
fontWeight: 500,
fontSize: '14px',
lineHeight: '16px',
fontVariant: 'small-caps',
},
[theme.breakpoints.down('xs')]: {
fontWeight: 500,
fontSize: '14px',
Expand All @@ -207,6 +264,11 @@ theme.typography.caption = {
fontSize: '12px',
lineHeight: '14px',
},
[theme.breakpoints.down('sm')]: {
fontWeight: 'normal',
fontSize: '10px',
lineHeight: '12px',
},
[theme.breakpoints.down('xs')]: {
fontWeight: 'normal',
fontSize: '10px',
Expand All @@ -225,6 +287,12 @@ theme.typography.overline = {
lineHeight: '13px',
fontVariant: 'small-caps',
},
[theme.breakpoints.down('sm')]: {
fontWeight: 500,
fontSize: '10px',
lineHeight: '12px',
fontVariant: 'small-caps',
},
[theme.breakpoints.down('xs')]: {
fontWeight: 500,
fontSize: '10px',
Expand Down
21 changes: 11 additions & 10 deletions images/code_background.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion sections/FeatureCodegen/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const FeatureCodegen = () => {
<div className={styles.sub_title_box}>
<Text
algin="left"
variant="h5"
variant="h6"
className={styles.sub_title_first}
value={featureCodegenContents.subTitleFirst()}
/>
Expand Down
4 changes: 2 additions & 2 deletions sections/FeatureLint/index.module.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@import '../../styles/variables.scss';

.title {
color: $light-indigo;
color: $background-indigo;

em {
font-style: normal;
color: $light-point-pink;
color: $vivid-pink2;
}
}

Expand Down
4 changes: 1 addition & 3 deletions sections/FeatureLint/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ const FeatureLint = () => {
value={featureLintContents.title()}
/>
<Text
variant="h4"
variant="h6"
className={styles.sub_title}
value={featureLintContents.subTitle()}
/>
</div>
<div>
<img style={{ width: '100vw' }} src={videoTestImage} />
</div>
</>
);
};
Expand Down
6 changes: 3 additions & 3 deletions sections/FeatureOverview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import { featureOverviewContents } from './toolkit';
const FeatureOverview = () => {
return (
<>
<div className={styles.code_background}>
{/* <div style={{ width: '100vw' }}>
<img src={codeBg} />
</div>
</div> */}

<div className={styles.grid_container}></div>
{/* <div className={styles.grid_container}></div> */}

<div className={home.inner_container}>
<Text
Expand Down
18 changes: 18 additions & 0 deletions sections/FooterPunchline/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@
width: 768px;
}

@include md {
.title_box {
width: 657px;
}
}

@include sm {
.title_box {
width: 540px;
}
}

@include xs {
.title_box {
width: 252px;
}
}

.title {
color: $light-grey-pink;

Expand Down
6 changes: 6 additions & 0 deletions sections/Header/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
border-bottom: 1px solid rgba($color: #3A3390, $alpha: 0.2);
backdrop-filter: blur(64px);
z-index: 999;
overflow-x: scroll;
}

.header {
width: $inner-container-widescreen;
margin: 0 auto;
}


.nav {
float: left;
// width: 422px;
Expand Down Expand Up @@ -61,6 +63,10 @@
}
}

@include xs {

}



.logo {
Expand Down
26 changes: 24 additions & 2 deletions sections/Hero/index.module.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
@import '../../styles/variables.scss';

.title_box {
margin: 0 240px;
}

@include md {
.title_box {
margin: 0 74px;
}
}

@include sm {
.title_box {
margin: 0 24px;
}
}

@include xs {
.title_box {
margin: 0 24px;
}
}

.sub_title {
color: #A0BBFF;
margin-top: 36px;
}


4 changes: 1 addition & 3 deletions sections/Hero/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { heroContents } from './toolkit';
const Hero = () => {
return (
<>
<div style={{ margin: '0 240px' }}>
<div className={styles.title_box}>
<Text
algin="center"
variant="h1"
Expand All @@ -34,8 +34,6 @@ const Hero = () => {
/>
</div>
</div>

<img src="" />
</>
);
};
Expand Down
16 changes: 14 additions & 2 deletions styles/Home.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}

.inner_container {
width: 1024px;
width: $inner-container-widescreen;
margin: 0 auto;
}

Expand All @@ -37,6 +37,18 @@

@include md {
.inner_container {
width: 876px;
width: $inner-container-desktop;
}
}

@include sm {
.inner_container {
width: $inner-container-mobile;
}
}

@include xs {
.inner_container {
width: $inner-container-small-mobile;
}
}
1 change: 1 addition & 0 deletions styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

body {
font-family: 'Roboto', sans-serif;
background-color: #0B0645;
}

html,
Expand Down

0 comments on commit 39f9110

Please sign in to comment.