Skip to content
This repository was archived by the owner on Mar 7, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions src/components/AboutCard/MainCard.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Typography, makeStyles, Container, Hidden } from '@material-ui/core';
import { Typography, makeStyles, Container } from '@material-ui/core';
import SubCard from './SubCard';

const useStyles = makeStyles(theme => ({
Expand All @@ -25,11 +25,11 @@ function MainCard({ content, ...props }) {
<Typography variant="subtitle1" className={classes.content}>
{content.about}
</Typography>
<Hidden smDown>
<>
{content.points.map(point => (
<SubCard key={point.id} point={point} />
))}
</Hidden>
</>
</Container>
);
}
Expand Down
45 changes: 34 additions & 11 deletions src/components/AboutCard/SubCard.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,37 @@
import React from 'react';
import { Grid, Typography, makeStyles, Box } from '@material-ui/core';
import { Grid, Typography, makeStyles, Box, Hidden } from '@material-ui/core';

const useStyles = makeStyles(theme => ({
const useStyles = makeStyles((theme) => ({
root: {
padding: 0,
paddingTop: '40px'
paddingTop: '40px',
textAlign: 'center'
},

extraMargin: {
title: {
marginLeft: 15,
float: 'right',
[theme.breakpoints.down('md')]: {
marginLeft: 25
},
[theme.breakpoints.down('xs')]: {
margin: '0 auto',
float: 'none',
textAlign: 'center',
}
},
contentTitle: {
fontWeight: 'bold',
[theme.breakpoints.down('xs')]: {
fontWeight: 'normal'
}
},
image: {
margin: '10px auto',
display: 'inline-block',
float: 'left',
[theme.breakpoints.down('xs')]: {
float: 'none',
}
}
}));
Expand All @@ -19,18 +40,20 @@ const SubCard = ({ point }) => {
const classes = useStyles();
return (
<Grid container className={classes.root}>
<Grid item md={2}>
<Grid className={classes.image} item sm={2} xs={12}>
<img alt="title-img" style={{ marginTop: '6px' }} height="55px" src={point.img} />
</Grid>
<Grid item md={10}>

<Grid item sm={10} xs={12}>
<Typography
className={classes.extraMargin}
className={classes.title}
align="justify"
variant="subtitle1"
>
<Box component="span" style={{ fontWeight: 'bold' }} display="inline-block">{`${point.contentTitle} :`}</Box>
{` `}
{point.content}
<Box component="span" className={classes.contentTitle} display="inline-block">{`${ point.contentTitle }`}</Box>

<Hidden xsDown>
<strong> : </strong>{ point.content }
</Hidden>
</Typography>
</Grid>
</Grid>
Expand Down
4 changes: 2 additions & 2 deletions src/views/pages/HomeView/MainCards.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ function MainCards({ className, ...rest }) {
return (
<Container className={clsx(classes.root, className)} {...rest}>
<Grid alignItems="center" container justify="center" spacing={8}>
<Grid item md={6} sm={6} xs={12}>
<Grid item md={6} xs={12}>
<MainCard content={openKnowledgeContent} />
</Grid>
<Grid item md={6} sm={6} xs={12}>
<Grid item md={6} xs={12}>
<MainCard content={openSourceContent} />
</Grid>
</Grid>
Expand Down