From 3b532124c2222dc7f05a53d84a6c929cc96581ca Mon Sep 17 00:00:00 2001 From: jdelasoie Date: Wed, 21 Nov 2018 14:18:57 +0100 Subject: [PATCH] Header + Footer update for translations (#349) --- .../atoms/nav-lang/nav-lang-short.twig | 12 + .../social-icon/social-icon-link-group.twig | 12 +- .../social-icon/social-icon-single-link.twig | 3 +- .../atoms/social-icon/social-icon.scss | 4 + .../organisms/footer/footer-buttons.twig | 17 +- .../organisms/footer/footer-col.twig | 16 +- .../organisms/footer/footer-dark-en.twig | 1 + .../organisms/footer/footer-en.twig | 21 + .../organisms/footer/footer-faculties.twig | 34 +- .../organisms/footer/footer-legal.twig | 21 +- .../footer/footer-light-dark-en.twig | 1 + .../organisms/footer/footer-light-dark.twig | 13 +- .../organisms/footer/footer-light-en.twig | 1 + .../organisms/footer/footer-light.twig | 13 +- .../organisms/footer/footer-socials.twig | 10 +- .../components/organisms/footer/footer.twig | 10 +- assets/components/organisms/footer/footer.yml | 18 +- .../organisms/header/header-en.twig | 1 + .../organisms/header/header-fr.twig | 1 + .../organisms/header/header-light-en.twig | 1 + .../organisms/header/header-light-fr.twig | 1 + .../organisms/header/header-light.twig | 18 +- .../components/organisms/header/header.twig | 11 +- assets/components/organisms/header/header.yml | 8 +- assets/config/data.json | 435 ++++++++++++++++-- assets/icons/youtube.svg | 4 + 26 files changed, 581 insertions(+), 106 deletions(-) create mode 100644 assets/components/organisms/footer/footer-dark-en.twig create mode 100644 assets/components/organisms/footer/footer-en.twig create mode 100644 assets/components/organisms/footer/footer-light-dark-en.twig create mode 100644 assets/components/organisms/footer/footer-light-en.twig create mode 100644 assets/components/organisms/header/header-en.twig create mode 100644 assets/components/organisms/header/header-fr.twig create mode 100644 assets/components/organisms/header/header-light-en.twig create mode 100644 assets/components/organisms/header/header-light-fr.twig create mode 100644 assets/icons/youtube.svg diff --git a/assets/components/atoms/nav-lang/nav-lang-short.twig b/assets/components/atoms/nav-lang/nav-lang-short.twig index 044492ce1..94accc1d2 100644 --- a/assets/components/atoms/nav-lang/nav-lang-short.twig +++ b/assets/components/atoms/nav-lang/nav-lang-short.twig @@ -1,10 +1,22 @@ +{% if language is not defined %}{% set language = 'fr' %}{% endif %} + diff --git a/assets/components/atoms/social-icon/social-icon-link-group.twig b/assets/components/atoms/social-icon/social-icon-link-group.twig index 285dedeee..349f5ea0f 100644 --- a/assets/components/atoms/social-icon/social-icon-link-group.twig +++ b/assets/components/atoms/social-icon/social-icon-link-group.twig @@ -1,10 +1,8 @@ {% set round = round ? round : false %} {% set discrete = discrete ? discrete : false %} {% set negative = negative ? negative : false %} -{% include '@atoms/social-icon/social-icon-single-link.twig' with { pretty_name: 'Facebook', icon: 'icon-facebook', round: round, discrete: discrete, negative: negative } %} -{% include '@atoms/social-icon/social-icon-single-link.twig' with { pretty_name: 'Twitter', icon: 'icon-twitter', round: round, discrete: discrete, negative: negative } %} -{% include '@atoms/social-icon/social-icon-single-link.twig' with { pretty_name: 'Instagram', icon: 'icon-instagram', round: round, discrete: discrete, negative: negative } %} -{% include '@atoms/social-icon/social-icon-single-link.twig' with { pretty_name: 'Mailplane', icon: 'icon-mail-plane', round: round, discrete: discrete, negative: negative } %} -{% include '@atoms/social-icon/social-icon-single-link.twig' with { pretty_name: 'WhatsApp', icon: 'icon-whatsapp', round: round, discrete: discrete, negative: negative } %} -{% include '@atoms/social-icon/social-icon-single-link.twig' with { pretty_name: 'GooglePlus', icon: 'icon-googleplus', round: round, discrete: discrete, negative: negative } %} -{% include '@atoms/social-icon/social-icon-single-link.twig' with { pretty_name: 'LinkedIn', icon: 'icon-linkedin', round: round, discrete: discrete, negative: negative } %} +{% include '@atoms/social-icon/social-icon-single-link.twig' with { pretty_name: 'Facebook', icon: 'icon-facebook', round: round, discrete: discrete, negative: negative, url: 'https://www.facebook.com/epflcampus' } %} +{% include '@atoms/social-icon/social-icon-single-link.twig' with { pretty_name: 'Twitter', icon: 'icon-twitter', round: round, discrete: discrete, negative: negative, url: 'https://twitter.com/epfl' } %} +{% include '@atoms/social-icon/social-icon-single-link.twig' with { pretty_name: 'Instagram', icon: 'icon-instagram', round: round, discrete: discrete, negative: negative, url: 'http://instagram.com/epflcampus' } %} +{% include '@atoms/social-icon/social-icon-single-link.twig' with { pretty_name: 'Youtube', icon: 'icon-youtube', round: round, discrete: discrete, negative: negative, url: 'https://www.youtube.com/user/epflnews' } %} +{% include '@atoms/social-icon/social-icon-single-link.twig' with { pretty_name: 'LinkedIn', icon: 'icon-linkedin', round: round, discrete: discrete, negative: negative, url: 'https://www.linkedin.com/school/epfl/' } %} diff --git a/assets/components/atoms/social-icon/social-icon-single-link.twig b/assets/components/atoms/social-icon/social-icon-single-link.twig index 539cc0e70..4b27a01bd 100644 --- a/assets/components/atoms/social-icon/social-icon-single-link.twig +++ b/assets/components/atoms/social-icon/social-icon-single-link.twig @@ -3,7 +3,8 @@ {% set round = round ? ' social-icon-round' : '' %} {% set discrete = discrete ? ' social-icon-discrete' : '' %} {% set negative = negative ? ' social-icon-negative' : '' %} - +{% set url = url or '#' %} + {% include '@atoms/icon/icon.twig' with { icon: icon } %} Follow us on {{ pretty_name }}. diff --git a/assets/components/atoms/social-icon/social-icon.scss b/assets/components/atoms/social-icon/social-icon.scss index f81fa30a6..ddc471afc 100644 --- a/assets/components/atoms/social-icon/social-icon.scss +++ b/assets/components/atoms/social-icon/social-icon.scss @@ -52,6 +52,10 @@ a.social-icon { background-color: $linkedin; } +.social-icon-youtube { + background-color: $youtube; +} + // From https://codepen.io/katydecorah/pen/PNLePj %instagradient { background: diff --git a/assets/components/organisms/footer/footer-buttons.twig b/assets/components/organisms/footer/footer-buttons.twig index 74b12004e..2facf1578 100644 --- a/assets/components/organisms/footer/footer-buttons.twig +++ b/assets/components/organisms/footer/footer-buttons.twig @@ -1,4 +1,13 @@ - -Enseignants et chercheurs -Étudiants -Collaborateurs \ No newline at end of file +{% if language is not defined %}{% set language = 'fr' %}{% endif %} + +{% if language == 'fr' %} + +Services et ressources +Urgences : +41 21 693 3000 +{% endif %} + +{% if language == 'en' %} + +Services and ressources +Emergencies: +41 21 693 3000 +{% endif %} diff --git a/assets/components/organisms/footer/footer-col.twig b/assets/components/organisms/footer/footer-col.twig index c73d9bb74..6a3011fe8 100644 --- a/assets/components/organisms/footer/footer-col.twig +++ b/assets/components/organisms/footer/footer-col.twig @@ -1,13 +1,25 @@ +{% if language is not defined %}{% set language = 'fr' %}{% endif %} + {% for col in footer %} diff --git a/assets/components/organisms/footer/footer-light-en.twig b/assets/components/organisms/footer/footer-light-en.twig new file mode 100644 index 000000000..50b66f865 --- /dev/null +++ b/assets/components/organisms/footer/footer-light-en.twig @@ -0,0 +1 @@ +{% include '@organisms/footer/footer-light.twig' with { 'language': 'en' } %} diff --git a/assets/components/organisms/footer/footer-light.twig b/assets/components/organisms/footer/footer-light.twig index 2370a0f03..3ee9edc41 100644 --- a/assets/components/organisms/footer/footer-light.twig +++ b/assets/components/organisms/footer/footer-light.twig @@ -1,3 +1,5 @@ +{% if language is not defined %}{% set language = 'fr' %}{% endif %} +