Fix styles for responsive footer
This commit is contained in:
@@ -1,12 +1,13 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import Branding from './Branding';
|
import Branding from './Branding';
|
||||||
import { getItemPageNames } from '../../common/config';
|
import { getItemPageNames, isMobileViewport } from '../../common/config';
|
||||||
|
|
||||||
export default function Footer({ items, pageName }) {
|
export default function Footer({ items, pageName }) {
|
||||||
return (
|
return (
|
||||||
<div className={classNames('footer', {'is-hidden': getItemPageNames(items).includes(pageName)})}>
|
<div className={classNames('footer', {'is-hidden': !isMobileViewport() && getItemPageNames(items).includes(pageName)})}>
|
||||||
<Branding
|
<Branding
|
||||||
|
modifier="footer"
|
||||||
logoContent={<img src="/assets/logo.svg" width="150px" height="60px" />}
|
logoContent={<img src="/assets/logo.svg" width="150px" height="60px" />}
|
||||||
>
|
>
|
||||||
<span className="footnote">
|
<span className="footnote">
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { getItemPageNames } from '../../common/config';
|
import { getItemPageNames, isMobileViewport } from '../../common/config';
|
||||||
|
|
||||||
export default function FooterEnd({ items, pageName }) {
|
export default function FooterEnd({ items, pageName }) {
|
||||||
return (
|
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">
|
||||||
<div className="footer-social-label">
|
<div className="footer-social__label">
|
||||||
<p>Follow us:</p>
|
<p>Follow us:</p>
|
||||||
</div>
|
</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://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://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>
|
<a className="social-links-icon" href="https://www.linkedin.com/company/aoe" target="_blank"><i className="socicon-linkedin social-icon"></i></a>
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
@custom-media --until-sm (max-width: 30em);
|
@custom-media --until-sm (max-width: 30em);
|
||||||
@custom-media --until-md (max-width: 48em);
|
@custom-media --until-md (max-width: 48em);
|
||||||
@custom-media --until-lg (max-width: 61.875em);
|
@custom-media --until-lg (max-width: 61.875em);
|
||||||
|
@custom-media --until-xl (max-width: 75em);
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'DIN';
|
font-family: 'DIN';
|
||||||
|
|||||||
@@ -25,4 +25,15 @@
|
|||||||
&.is-hidden {
|
&.is-hidden {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (--until-sm) {
|
||||||
|
&--footer {
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (--until-xl) {
|
||||||
|
margin: 15px 0 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,20 +11,25 @@
|
|||||||
color: var(--color-gray-normal);
|
color: var(--color-gray-normal);
|
||||||
}
|
}
|
||||||
|
|
||||||
& .footer-social {
|
@media (--until-sm) {
|
||||||
display: flex;
|
flex-direction: column;
|
||||||
flex-direction: row;
|
|
||||||
justify-content: flex-end;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
margin: 20px 0 0;
|
||||||
& .footer-social-label {
|
|
||||||
margin: 0 10px 0 0;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer-end-left {
|
.footer-end-left {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.footer-social {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: flex-end;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
&__label {
|
||||||
|
margin: 0 10px 0 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user