fix: align sponsors and give background

This commit is contained in:
Ahmad Abdolsaheb
2019-03-04 13:00:35 +03:00
committed by mrugesh mohapatra
parent 7d18cd8de6
commit 4046bb3a0d
2 changed files with 122 additions and 50 deletions

View File

@ -2,6 +2,8 @@
display: block; display: block;
max-width: 100%; max-width: 100%;
height: auto; height: auto;
padding: 0;
margin: 0;
} }
.sls { .sls {
@ -12,4 +14,13 @@
.sl { .sl {
max-height: 80px; max-height: 80px;
background-color: white;
padding: 5px;
border-radius: 10px;
width: 150px;
height: 100px;
margin-bottom: 50px;
display: flex;
align-items: center;
justify-content: center;
} }

View File

@ -1,6 +1,7 @@
import React, { Fragment } from 'react'; import React, { Fragment } from 'react';
import Helmet from 'react-helmet'; import Helmet from 'react-helmet';
import { Grid, Col, Row } from '@freecodecamp/react-bootstrap'; import { Grid, Col, Row } from '@freecodecamp/react-bootstrap';
import Media from 'react-media';
import { Link, Spacer } from '../components/helpers'; import { Link, Spacer } from '../components/helpers';
@ -25,17 +26,17 @@ const SponsorsPage = () => {
</h3> </h3>
<hr /> <hr />
<Row className='sls'> <Row className='sls'>
<Link to='https://www.class-central.com'> <Link className='sl' to='https://www.class-central.com'>
<img <img
alt="Class Central's logo" alt="Class Central's logo"
className='img-responsive sl' className='img-responsive'
src='https://s3.amazonaws.com/freecodecamp/class-central-logo.jpg' src='https://s3.amazonaws.com/freecodecamp/class-central-logo.jpg'
/> />
</Link> </Link>
<Link to='https://www.tsugicloud.org'> <Link className='sl' to='https://www.tsugicloud.org'>
<img <img
alt="TsugiCloud's logo" alt="TsugiCloud's logo"
className='img-responsive sl' className='img-responsive'
src='https://s3.amazonaws.com/freecodecamp/tsugicloud-logo.png' src='https://s3.amazonaws.com/freecodecamp/tsugicloud-logo.png'
/> />
</Link> </Link>
@ -43,52 +44,112 @@ const SponsorsPage = () => {
<h2>In-kind sponsors</h2> <h2>In-kind sponsors</h2>
<h3>These companies donate their services to freeCodeCamp.org</h3> <h3>These companies donate their services to freeCodeCamp.org</h3>
<hr /> <hr />
<Row className='sls'>
<Link to='https://netlify.com'> <Media query='(min-width: 500px)'>
<img {matches =>
alt="Netlify's logo" matches ? (
className='img-responsive sl' <Fragment>
src='https://s3.amazonaws.com/freecodecamp/netlify-logo.jpg' <Row className='sls'>
/> <Link className='sl' to='https://netlify.com'>
</Link> <img
<Link to='https://www.mlab.com/'> alt="Netlify's logo"
<img className='img-responsive'
alt="mLab's logo" src='https://s3.amazonaws.com/freecodecamp/netlify-logo.jpg'
className='img-responsive sl' />
src='https://s3.amazonaws.com/freecodecamp/mLab-logo.png' </Link>
/> <Link className='sl' to='https://www.mlab.com/'>
</Link> <img
<Link to='https://auth0.com'> alt="mLab's logo"
<img className='img-responsive'
alt="Auth0's logo" src='https://s3.amazonaws.com/freecodecamp/mLab-logo.png'
className='img-responsive sl' />
src='https://s3.amazonaws.com/freecodecamp/auth0-logo.png' </Link>
/> <Link className='sl' to='https://auth0.com'>
</Link> <img
</Row> alt="Auth0's logo"
<Row className='sls'> className='img-responsive'
<Link to='https://www.discourse.org/'> src='https://s3.amazonaws.com/freecodecamp/auth0-logo.png'
<img />
alt="Discourse's logo" </Link>
className='img-responsive sl' </Row>
src='https://s3.amazonaws.com/freecodecamp/discourse-logo.png' <Row className='sls'>
/> <Link className='sl' to='https://www.discourse.org/'>
</Link> <img
<Link to='https://algolia.com'> alt="Discourse's logo"
<img className='img-responsive'
alt="Algolia's logo" src='https://s3.amazonaws.com/freecodecamp/discourse-logo.png'
className='img-responsive sl' />
src='https://s3.amazonaws.com/freecodecamp/algolia-logo.jpg' </Link>
/> <Link className='sl' to='https://algolia.com'>
</Link> <img
<Link to='https://cloudflare.com'> alt="Algolia's logo"
<img className='img-responsive'
alt="Cloudflare's logo" src='https://s3.amazonaws.com/freecodecamp/algolia-logo.jpg'
className='img-responsive sl' />
src='https://s3.amazonaws.com/freecodecamp/cloudflare-logo.jpg' </Link>
/> <Link className='sl' to='https://cloudflare.com'>
</Link> <img
</Row> alt="Cloudflare's logo"
className='img-responsive'
src='https://s3.amazonaws.com/freecodecamp/cloudflare-logo.jpg'
/>
</Link>
</Row>
</Fragment>
) : (
<Fragment>
<Row className='sls'>
<Link className='sl' to='https://netlify.com'>
<img
alt="Netlify's logo"
className='img-responsive'
src='https://s3.amazonaws.com/freecodecamp/netlify-logo.jpg'
/>
</Link>
<Link className='sl' to='https://www.mlab.com/'>
<img
alt="mLab's logo"
className='img-responsive'
src='https://s3.amazonaws.com/freecodecamp/mLab-logo.png'
/>
</Link>
</Row>
<Row className='sls'>
<Link className='sl' to='https://auth0.com'>
<img
alt="Auth0's logo"
className='img-responsive'
src='https://s3.amazonaws.com/freecodecamp/auth0-logo.png'
/>
</Link>
<Link className='sl' to='https://www.discourse.org/'>
<img
alt="Discourse's logo"
className='img-responsive'
src='https://s3.amazonaws.com/freecodecamp/discourse-logo.png'
/>
</Link>
</Row>
<Row className='sls'>
<Link className='sl' to='https://algolia.com'>
<img
alt="Algolia's logo"
className='img-responsive'
src='https://s3.amazonaws.com/freecodecamp/algolia-logo.jpg'
/>
</Link>
<Link className='sl' to='https://cloudflare.com'>
<img
alt="Cloudflare's logo"
className='img-responsive'
src='https://s3.amazonaws.com/freecodecamp/cloudflare-logo.jpg'
/>
</Link>
</Row>
</Fragment>
)
}
</Media>
</Col> </Col>
</Row> </Row>
</Grid> </Grid>