Skip to content

Commit

Permalink
Fix styles for responsive footer
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasschopmans committed Apr 3, 2017
1 parent b5b2058 commit 6c2efdd
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 16 deletions.
5 changes: 3 additions & 2 deletions js/components/Footer.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import React from 'react';
import classNames from 'classnames';
import Branding from './Branding';
import { getItemPageNames } from '../../common/config';
import { getItemPageNames, isMobileViewport } from '../../common/config';

export default function Footer({ items, pageName }) {
return (
<div className={classNames('footer', {'is-hidden': getItemPageNames(items).includes(pageName)})}>
<div className={classNames('footer', {'is-hidden': !isMobileViewport() && getItemPageNames(items).includes(pageName)})}>
<Branding
modifier="footer"
logoContent={<img src="/assets/logo.svg" width="150px" height="60px" />}
>
<span className="footnote">
Expand Down
8 changes: 4 additions & 4 deletions js/components/FooterEnd.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import React from 'react';
import classNames from 'classnames';
import { getItemPageNames } from '../../common/config';
import { getItemPageNames, isMobileViewport } from '../../common/config';

export default function FooterEnd({ items, pageName }) {
return (
<div className={classNames('footer-end', {'footer-end-left': getItemPageNames(items).includes(pageName)})} >
<div className={classNames('footer-end', {'footer-end-left': !isMobileViewport() && getItemPageNames(items).includes(pageName)})} >
<div className="footer-social">
<div className="footer-social-label">
<div className="footer-social__label">
<p>Follow us:</p>
</div>
<div className="footer-social-links">
<div className="footer-social__links">
<a className="social-links-icon" href="https://www.facebook.com/aoepeople" target="_blank"><i className="socicon-facebook social-icon"></i></a>
<a className="social-links-icon" href="https://twitter.com/aoepeople" target="_blank"><i className="socicon-twitter social-icon"></i></a>
<a className="social-links-icon" href="https://www.linkedin.com/company/aoe" target="_blank"><i className="socicon-linkedin social-icon"></i></a>
Expand Down
1 change: 1 addition & 0 deletions styles/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
@custom-media --until-sm (max-width: 30em);
@custom-media --until-md (max-width: 48em);
@custom-media --until-lg (max-width: 61.875em);
@custom-media --until-xl (max-width: 75em);

@font-face {
font-family: 'DIN';
Expand Down
11 changes: 11 additions & 0 deletions styles/components/branding.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,15 @@
&.is-hidden {
opacity: 0;
}

@media (--until-sm) {
&--footer {
display: block;
text-align: center;
}
}

@media (--until-xl) {
margin: 15px 0 0;
}
}
25 changes: 15 additions & 10 deletions styles/components/footerend.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,25 @@
color: var(--color-gray-normal);
}

& .footer-social {
display: flex;
flex-direction: row;
justify-content: flex-end;
@media (--until-sm) {
flex-direction: column;
align-items: center;

& .footer-social-label {
margin: 0 10px 0 0;
}
margin: 20px 0 0;
}

}

.footer-end-left {
flex-direction: column;
align-items: flex-start;
}
}

.footer-social {
display: flex;
flex-direction: row;
justify-content: flex-end;
align-items: center;

&__label {
margin: 0 10px 0 0;
}
}

0 comments on commit 6c2efdd

Please sign in to comment.