Skip to content

Commit

Permalink
Merge pull request #170 from daritelska-platforma/redesign-homepage
Browse files Browse the repository at this point in the history
Redesign homepage
  • Loading branch information
kachar authored Apr 17, 2021
2 parents 0dcaba1 + 029f206 commit 0398544
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 28 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
- [.Net C#](https://docs.microsoft.com/en-us/dotnet/csharp/)
- DevOps
- [Docker Compose](https://docs.docker.com/compose/) / [Github Actions](https://docs.github.com/en/free-pro-team@latest/actions/reference)

## Initial setup

```shell
Expand Down
Binary file added public/img/header-image-mobile.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/header-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/img/jumbotron-background-image-desktop.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/img/jumbotron-background-image-mobile.jpg
Binary file not shown.
2 changes: 1 addition & 1 deletion public/locales/bg/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
"labour-support": "- с труд",
"media-support": "- медийно",
"become-a-partner": "- стани партньор",
"click-here-button": "Натисни тук"
"click-here-button": "Включи се"
}
}
2 changes: 1 addition & 1 deletion public/locales/en/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
"labour-support": "- with labour",
"media-support": "- with media",
"become-a-partner": "- become a partner",
"click-here-button": "Click here"
"click-here-button": "Join us"
}
}
27 changes: 14 additions & 13 deletions src/components/index/sections/Jumbotron.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { RefObject } from 'react'
import { useTranslation } from 'next-i18next'
import { Grid, Typography } from '@material-ui/core'
import { makeStyles, createStyles } from '@material-ui/core/styles'
import { makeStyles, createStyles, darken } from '@material-ui/core/styles'
import KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown'
import { Favorite } from '@material-ui/icons'

Expand All @@ -22,8 +22,9 @@ const useStyles = makeStyles((theme) =>
backgroundPosition: 'center',
backgroundSize: 'cover',
color: theme.palette.common.white,
[theme.breakpoints.down(380)]: {
backgroundImage: 'url(/img/jumbotron-background-image-mobile.jpg)',
[theme.breakpoints.down('sm')]: {
backgroundImage: 'url(/img/header-image-mobile.jpg)',
backgroundSize: 'cover',
},
[theme.breakpoints.up(1600)]: {
height: '950px',
Expand All @@ -42,9 +43,9 @@ const useStyles = makeStyles((theme) =>
fontWeight: 400,
},
aboutProjectButton: {
color: theme.palette.common.white,
border: `2px solid ${theme.palette.primary.main}`,
borderRadius: theme.spacing(3),
color: darken(theme.palette.secondary.main, 0.8),
border: `none`,
borderRadius: '500px',
padding: theme.spacing(1.5, 4),
fontWeight: 500,
fontSize: theme.typography.pxToRem(15),
Expand All @@ -56,10 +57,8 @@ const useStyles = makeStyles((theme) =>
},
},
podkrepiButton: {
color: theme.palette.common.white,
backgroundColor: theme.palette.primary.main,
border: `2px solid ${theme.palette.primary.main}`,
borderRadius: theme.spacing(3),
border: `none`,
borderRadius: '500px',
fontWeight: 500,
fontSize: theme.typography.pxToRem(15),
minWidth: theme.spacing(27),
Expand All @@ -82,7 +81,7 @@ const useStyles = makeStyles((theme) =>
height: theme.spacing(5),
'&:hover': {
cursor: 'pointer',
backgroundColor: theme.palette.primary.dark,
color: theme.palette.secondary.main,
},
},
}),
Expand Down Expand Up @@ -119,13 +118,15 @@ export default function Jumbotron({ scrollTo }: JumbotronProps) {
<Grid item>
<LinkButton
href={routes.aboutProject}
variant="outlined"
variant="contained"
color="secondary"
className={classes.aboutProjectButton}>
{t('index:jumbotron.about-project-button')}
</LinkButton>
<LinkButton
href={routes.support}
variant="outlined"
variant="contained"
color="primary"
className={classes.podkrepiButton}
endIcon={<Favorite />}>
{t('index:jumbotron.support-us-button')}
Expand Down
19 changes: 6 additions & 13 deletions src/components/index/sections/SupportUsSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@ const useStyles = makeStyles((theme) =>
},
},
supportImageWrapper: {
minHeight: '20rem',
textAlign: 'center',
},
supportImage: {
maxWidth: '60%',
[theme.breakpoints.down('sm')]: {
marginBottom: theme.spacing(3),
},
backgroundSize: 'contain',
backgroundRepeat: 'no-repeat',
backgroundPosition: 'bottom center',
backgroundImage: 'url(/img/support-us-image.png)',
},
supportOptionsWrapper: {
[theme.breakpoints.down('sm')]: {
Expand Down Expand Up @@ -66,13 +65,7 @@ export default function SupportUsSection() {

return (
<Grid container component="section" className={classes.container}>
<Grid item xs={12} md={6} className={classes.supportImageWrapper}>
<img
src="/img/support-us-image.png"
className={classes.supportImage}
alt="Support us image"
/>
</Grid>
<Grid item xs={12} md={6} className={classes.supportImageWrapper}></Grid>
<Grid item xs={12} md={6} className={classes.supportOptionsWrapper}>
<Typography variant="h5" component="h2" className={classes.heading}>
{t('index:support-us-section.heading')}
Expand Down

0 comments on commit 0398544

Please sign in to comment.