Commit de109603 authored by lic's avatar lic
Browse files

Move social media to footer

parent 73cb3b81
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path style="fill:#FFFFFF;" d="M22.675 0h-21.35c-.732 0-1.325.593-1.325 1.325v21.351c0 .731.593 1.324 1.325 1.324h11.495v-9.294h-3.128v-3.622h3.128v-2.671c0-3.1 1.893-4.788 4.659-4.788 1.325 0 2.463.099 2.795.143v3.24l-1.918.001c-1.504 0-1.795.715-1.795 1.763v2.313h3.587l-.467 3.622h-3.12v9.293h6.116c.73 0 1.323-.593 1.323-1.325v-21.35c0-.732-.593-1.325-1.325-1.325z"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path style="fill:#FFFFFF;" d="M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path style="fill:#FFFFFF;" d="M24 4.557c-.883.392-1.832.656-2.828.775 1.017-.609 1.798-1.574 2.165-2.724-.951.564-2.005.974-3.127 1.195-.897-.957-2.178-1.555-3.594-1.555-3.179 0-5.515 2.966-4.797 6.045-4.091-.205-7.719-2.165-10.148-5.144-1.29 2.213-.669 5.108 1.523 6.574-.806-.026-1.566-.247-2.229-.616-.054 2.281 1.581 4.415 3.949 4.89-.693.188-1.452.232-2.224.084.626 1.956 2.444 3.379 4.6 3.419-2.07 1.623-4.678 2.348-7.29 2.04 2.179 1.397 4.768 2.212 7.548 2.212 9.142 0 14.307-7.721 13.995-14.646.962-.695 1.797-1.562 2.457-2.549z"/></svg>
\ No newline at end of file
......@@ -11,22 +11,23 @@ footer {
margin: 0 auto;
@media @wide, @desktop {
grid-template-columns: 1fr auto auto;
grid-template-areas: 'copyright eth-logo vseth-logo';
grid-template-columns: 1fr auto 1fr;
grid-template-areas: 'social-media-logos copyright institution-logos';
max-width: @dimension-max-content-width;
}
@media @tablet {
grid-template-columns: 1fr auto auto;
grid-template-areas: 'copyright eth-logo vseth-logo';
grid-template-columns: 1fr auto 1fr;
grid-template-areas: 'social-media-logos copyright institution-logos';
font-size: .7em;
}
@media @mobile {
grid-template-columns: 1fr 1fr;
grid-template-columns: 1fr;
grid-template-areas:
'copyright copyright'
'eth-logo vseth-logo';
'copyright'
'social-media-logos'
'institution-logos';
}
}
}
......@@ -34,7 +35,7 @@ footer {
footer div.copyright {
display: flex;
align-items: center;
justify-content: left;
justify-content: center;
grid-area: copyright;
padding: 2.5em 0;
......@@ -49,19 +50,37 @@ footer div.copyright {
}
}
footer .vseth {
grid-area: vseth-logo;
}
footer div.social-media-logos {
width: 100%;
display: flex;
justify-content: left;
align-items: center;
grid-area: social-media-logos;
@media @mobile {
justify-content: center;
}
footer .eth {
grid-area: eth-logo;
a {
position: relative;
img {
height: 2em;
padding: 0 .8em;
}
}
}
footer div.footer-logo {
footer div.institution-logos {
width: 100%;
display: flex;
justify-content: center;
justify-content: right;
align-items: center;
grid-area: institution-logos;
@media @mobile {
justify-content: center;
}
a {
position: relative;
......
......@@ -2,6 +2,9 @@ import m from 'mithril';
import { currentLanguage, i18n } from '../models/language';
import EthLogo from '../images/eth.svg';
import VsethLogo from '../images/vseth.svg';
import FacebookLogo from '../images/facebook_white.svg';
import InstagramLogo from '../images/instagram_white.svg';
import TwitterLogo from '../images/twitter_white.svg';
const renderVseth = coord => {
const style = `
......@@ -37,6 +40,12 @@ export default class Footer {
return m(
'footer',
m('div', [
m(
'div.social-media-logos',
m('a', { href: `https://www.facebook.com/AMIV.ETHZ/` }, m('img', { src: FacebookLogo })),
m('a', { href: `https://www.instagram.com/amiv_eth/` }, m('img', { src: InstagramLogo })),
m('a', { href: `https://twitter.com/amiv_ethz` }, m('img', { src: TwitterLogo }))
),
m('div.copyright', [
m('span', `© 1893 - ${new Date().getFullYear()} AMIV an der ETH`),
m(
......@@ -48,14 +57,16 @@ export default class Footer {
`${i18n('contact')} / ${i18n('legal-notice')}`
),
]),
m('div.footer-logo', m('a', { href: `https://www.ethz.ch/` }, m('img', { src: EthLogo }))),
m(
'div.footer-logo',
{
onclick: () => this.handleClick(),
},
renderVseth(this.coord)
),
m('div.institution-logos', [
m('a', { href: `https://www.ethz.ch/` }, m('img', { src: EthLogo })),
m(
'div',
{
onclick: () => this.handleClick(),
},
renderVseth(this.coord)
),
]),
])
);
}
......
......@@ -72,28 +72,6 @@ export default class Frontpage {
imageurl: 'https://bit.ly/2OUjN5w',
},
];
// Social Media Attributes, with their different APIs
this.socialmedia = [
{
title: 'Facebook',
href: 'https://www.facebook.com/AMIV.ETHZ/',
imageurl:
'http://www.fub.se/sites/www.fub.se/files/styles/artikelbild_full/public/facebook-logotyp.jpg?itok=e244p_Sa',
},
{
title: 'Instagram',
href: 'https://www.instagram.com/amiv_eth/?hl=de',
imageurl:
'https://i2.wp.com/www.newscouch.de/wp-content/uploads/2017/11/insta-logo.jpg?fit=2569%2C1761&ssl=1',
},
{
title: 'Twitter',
href: 'https://twitter.com/amiv_ethz',
imageurl: 'https://rngeternal.com/wp-content/uploads/2017/12/twitter-logo.png',
},
];
}
view() {
......@@ -199,23 +177,4 @@ export default class Frontpage {
content: cardContent,
});
}
static _renderSocialMediaCard(item) {
return m(Card, {
url: {
href: item.href,
},
content: [
{
media: {
origin: 'center',
ratio: 'landscape',
content: m('img', {
src: item.imageurl ? item.imageurl : icons.logoWheel,
}),
},
},
],
});
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment