From 2a1f5f888929ca803ca92d4d8ded1918d645261c Mon Sep 17 00:00:00 2001 From: Joe LaChance Date: Fri, 6 Dec 2019 15:06:34 -0600 Subject: [PATCH 1/4] updates footer config --- config.yaml | 187 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 111 insertions(+), 76 deletions(-) diff --git a/config.yaml b/config.yaml index 3bc55056b7..772e3effac 100644 --- a/config.yaml +++ b/config.yaml @@ -62,19 +62,6 @@ params: url: / buttonText: Get started section5: false - footer: - # Logo (from /images/logos/___) - logo: numpy.svg - # Social media links (GitHub, Twitter, etc.). All are optional. - socialmedia: - - link: https://github.com/numpy - # Icons are from Font Awesome - icon: github - - link: https://twitter.com/lucperkins - icon: twitter - # TODO: not yet organized well (footer links need to differ from header - # links) - bulmalogo: false languages: en: @@ -97,32 +84,48 @@ languages: url: /aboutus - title: Contribute url: /contribute - footerLinks: + footer: + logo: numpy.svg + socialmediatitle: "" + socialmedia: + - link: https://github.com/numpy/numpy + icon: github + - link: https://twitter.com/lucperkins + icon: twitter quicklinks: column1: - title: "Pages" + title: "" links: - - text: About us - link: /about - - text: Community - link: /community - - text: Install - link: /install - - text: Learning - link: /learning - - text: Documentation - link: /doc - - text: Array computing - link: /arraycomputing + - text: Install + link: /install + - text: Documentation + link: /docs + - text: Release notes + link: /release-notes + - text: Roadmap + link: /roadmap column2: - title: "Docs" + title: "" links: - - text: Getting started - link: / - - text: User guide - link: / - - text: Reference guide - link: / + - text: About us + link: /about + - text: Code of conduct + link: /code-of-conduct + - text: Get help + link: /help + - text: Contribute + link: /contribute + column3: + title: "" + links: + - text: Terms of use + link: /terms + - text: Privacy + link: /privacy + - text: Trademarks + link: /trademarks + - text: Press kit + link: /press-kit nl: title: NumPy languageName: Dutch @@ -143,32 +146,48 @@ languages: url: /nl/aboutus - title: Contribute url: /nl/contribute - footerLinks: + footer: + logo: numpy.svg + socialmediatitle: "" + socialmedia: + - link: https://github.com/numpy/numpy + icon: github + - link: https://twitter.com/lucperkins + icon: twitter quicklinks: column1: - title: "Pages" + title: "" links: - - text: About us - link: /nl/about - - text: Community - link: /nl/community - - text: Install - link: /nl/install - - text: Learning - link: /nl/learning - - text: Documentation - link: /nl/doc - - text: Array computing - link: /nl/arraycomputing + - text: Install + link: /nl/install + - text: Documentation + link: /nl/docs + - text: Release notes + link: /nl/release-notes + - text: Roadmap + link: /nl/roadmap column2: - title: "Docs" + title: "" + links: + - text: About us + link: /nl/about + - text: Code of conduct + link: /nl/code-of-conduct + - text: Get help + link: /nl/help + - text: Contribute + link: /nl/contribute + column3: + title: "" links: - - text: Getting started - link: /nl/ - - text: User guide - link: /nl/ - - text: Reference guide - link: /nl/ + - text: Terms of use + link: /nl/terms + - text: Privacy + link: /nl/privacy + - text: Trademarks + link: /nl/trademarks + - text: Press kit + link: /nl/press-kit hi: title: NumPy languageName: Hindi @@ -189,29 +208,45 @@ languages: url: /hi/aboutus - title: Contribute url: /hi/contribute - footerLinks: + footer: + logo: numpy.svg + socialmediatitle: "" + socialmedia: + - link: https://github.com/numpy/numpy + icon: github + - link: https://twitter.com/numpy + icon: twitter quicklinks: column1: - title: "Pages" + title: "" links: - - text: About us - link: /hi/about - - text: Community - link: /hi/community - - text: Install - link: /hi/install - - text: Learning - link: /hi/learning - - text: Documentation - link: /hi/doc - - text: Array computing - link: /hi/arraycomputing + - text: Install + link: /hi/install + - text: Documentation + link: /hi/docs + - text: Release notes + link: /hi/release-notes + - text: Roadmap + link: /hi/roadmap column2: - title: "Docs" + title: "" + links: + - text: About us + link: /hi/about + - text: Code of conduct + link: /hi/code-of-conduct + - text: Get help + link: /hi/help + - text: Contribute + link: /hi/contribute + column3: + title: "" links: - - text: Getting started - link: /hi/ - - text: User guide - link: /hi/ - - text: Reference guide - link: /hi/ + - text: Terms of use + link: /hi/terms + - text: Privacy + link: /hi/privacy + - text: Trademarks + link: /hi/trademarks + - text: Press kit + link: /hi/press-kit From 05f6642bbb41d88eda276903d6333e47492aca53 Mon Sep 17 00:00:00 2001 From: Joe LaChance Date: Fri, 6 Dec 2019 15:06:48 -0600 Subject: [PATCH 2/4] adds footer styling --- static/css/styles.css | 124 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) diff --git a/static/css/styles.css b/static/css/styles.css index 1c3512635c..579af0c665 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -257,4 +257,128 @@ p { .hero-logo { max-height: 40px; } +} + + +/* Footer */ +.footer-logo-column { + display: flex; + justify-content: center; + padding: 5vw; + font-size: 1rem; +} + +#footer-logo { + height: 75px; +} + +.link-column { + display: block; + flex-basis: 0; + flex-grow: 1; + flex-shrink: 1; +} + +.footer-link { + font-size: 1rem; +} + +.footer-actions { + max-width: 25vw; + margin: 25px; +} + +.sign-up-container { + display: flex; + flex-direction: row; + align-items: center; + position: relative; + margin: 15px 0 25px 0; +} + +.sign-up-image { + z-index: 2; + color: #2e3131; + padding: 9px 10px 10px 10px; + border-right: 1px solid #ececec; + background-color: #ececec; + border-radius: 5px 0 0 5px; +} + +.sign-up-input { + background-color: white; + border-radius: 0 5px 5px 0; + border: none; + width: 75%; + height: 35px; + padding-left: 5px; + font-size: 14px; + color: #2e3131; +} + +.submission-instructions { + display: none; + position: absolute; + right: 18%; + font-size: 10px; + color: #6c7a89; +} + +.signup-button { + display: none; +} + +.thank-you { + display: none; + height: 75px; + color: #ececec; + align-items: center; +} + +.social-media-icons { + display: flex; +} + +.copyright { + font-size: 12px; +} + +@media only screen and (max-width: 1150px) { + .sign-up-input { + font-size: 12px; + } +} + +@media only screen and (max-width: 850px) { + #footer-columns { + display: flex; + flex-direction: column; + align-items: center; + text-align: center; + } + + .footer-actions { + max-width: 50vw; + } + + .sign-up-input { + width: 100%; + } + + .thank-you { + justify-content: center; + } + + .social-media-icons { + width: 100%; + } + + .signup-button { + display: block; + height: 35px; + border-radius: 5px; + margin-left: 5px; + width: 60px; + color: black; + } } \ No newline at end of file From a04ecd61a78dd688cbf69149ec1f1f33b81eaa33 Mon Sep 17 00:00:00 2001 From: Joe LaChance Date: Fri, 6 Dec 2019 15:07:02 -0600 Subject: [PATCH 3/4] adds javascript for footer sign up functionality --- static/js/app.js | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/static/js/app.js b/static/js/app.js index 941d1857f3..a6088fd9ad 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -21,4 +21,34 @@ $(function () { } }, 250); } -}); \ No newline at end of file + + // Email Form + $('.sign-up-input').focus(function(e) { + if ($(window).width() > 850) { + $('.submission-instructions').css('display', 'block'); + } + }).blur(function(e) { + if ($(window).width() > 850) { + $('.submission-instructions').css('display', 'none'); + } + }); +}); + + +function sendThankYou() { + $('.sign-up-container').css('display', 'none'); + $('.thank-you').css('display', 'flex'); + + setTimeout(() => { + $('#email').val(''); + $('.thank-you').css('display', 'none'); + $( ".sign-up-container" ).fadeIn( "slow"); + }, 3000); +} + + // Mailchimp + function enterEmail() { + sendThankYou(); + const email = $('#email').val(); + // Mailchimp integration goes here + } \ No newline at end of file From d3b35370a5fae638c9efbb37fd8de06810b70896 Mon Sep 17 00:00:00 2001 From: Joe LaChance Date: Fri, 6 Dec 2019 15:07:20 -0600 Subject: [PATCH 4/4] adds html for new footer --- layouts/partials/footer.html | 53 ++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 layouts/partials/footer.html diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000000..a4defe9852 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,53 @@ +{{- $footer := .Site.Params.footer }} +{{- $logo := index $footer "logo" }} +{{- $quickLinks := index $footer "quicklinks" }} +{{- $socialMedia := index $footer "socialmedia" }} +