Skip to content

Commit

Permalink
footer refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
wen-2018 committed Aug 27, 2024
1 parent ee46865 commit 9f8a232
Show file tree
Hide file tree
Showing 11 changed files with 543 additions and 0 deletions.
142 changes: 142 additions & 0 deletions bedrock/base/templates/includes/protocol/footer/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,147 @@

{% set utm_params = 'utm_source=www.mozilla.org&utm_medium=referral&utm_campaign=footer' %}

{% if switch('brand-refresh') %}
{% block page_css %}
{{ css_bundle('footer-refresh') }}
{% endblock %}
<footer class="mzp-c-footer moz24-footer {% if theme_class %}{{ theme_class }}{% endif %}" id="colophon">
<div class="mzp-l-content c-newsletter">
<div class="moz24-newsletter-wrapper c-newsletter-wrapper mzp-l-content mzp-t-content-lg">
<div class="c-newsletter-info">
<img class="moz24-footer-image c-footer-logo-image" src="{{ static('img/logos/mozilla/footer-refresh/symbol.svg') }}" alt="mozilla symbol" width="40" height="48">
<p>{{ ftl('footer-refresh-find-out-about') }}</p>
</div>

<div class="c-newsletter-content moz24-newsletter">
{{ email_newsletter_form(
newsletters='knowledge-is-power',
title=None,
include_country=False,
include_language=False,
)}}
</div>
</div>
</div>
<div class="mzp-l-content">
<nav class="moz24-footer-primary mzp-c-footer-primary">
<div class="mzp-c-footer-sections-wrapper">
<div class="mzp-c-footer-section-wrapper">
<section class="mzp-c-footer-refresh-section">
<div class="moz-24-mzp-c-footer-refresh-social-wrapper">
<h5 class="mzp-c-footer-heading-social">{{ ftl('footer-follow-mozilla') }}</h5>
<ul class="mzp-c-footer-links-social">
<li><a class="twitter" href="{{ mozilla_twitter_url() }}" data-link-type="footer" data-link-text="Twitter (@mozilla)">{{ ftl('footer-x-formerly-twitter', fallback='footer-twitter') }}<span> (@mozilla)</span></a></li>
<li><a class="mastodon" href="https://mozilla.social/@Mozilla" rel="me" data-link-type="footer" data-link-text="Mastodon (@mozilla)">{{ ftl('footer-mastodon') }}<span> (@mozilla)</span></a></li>
<li><a class="instagram" href="{{ mozilla_instagram_url() }}" data-link-type="footer" data-link-text="Instagram (@mozilla)">{{ ftl('footer-instagram') }}<span> (@mozilla)</span></a></li>
<li><a class="linkedin" href="https://www.linkedin.com/company/mozilla-corporation/" data-link-type="footer" data-link-text="LinkedIn (@mozilla)">{{ ftl('footer-linkedin') }}<span> (@mozilla)</span></a></li>
<li><a class="tiktok" href="https://www.tiktok.com/@mozilla" data-link-type="footer" data-link-text="TikTok (@mozilla)">{{ ftl('footer-tiktok') }}<span> (@mozilla)</span></a></li>
<li><a class="spotify" href="https://open.spotify.com/show/0vT7LJMeVDxyQ2ZamHKu08?si=_uDRD6bRR_6M5YZyISGXgA" data-link-type="footer" data-link-text="Spotify (@mozilla)">{{ ftl('footer-spotify') }}<span> (@mozilla)</span></a></li>
</ul>
</div>
<div class="moz24-mzp-c-footer-refresh-social-wrapper">
<h5 class="mzp-c-footer-heading-social">{{ ftl('footer-follow-firefox') }}</h5>
<ul class="mzp-c-footer-links-social">
<li><a class="twitter" href="{{ firefox_twitter_url() }}" data-link-type="footer" data-link-text="Twitter (@firefox)">{{ ftl('footer-x-formerly-twitter', fallback='footer-twitter') }}<span> (@firefox)</span></a></li>
<li><a class="instagram" href="https://www.instagram.com/firefox/" data-link-type="footer" data-link-text="Instagram (@firefox)">{{ ftl('footer-instagram') }}<span> (@firefox)</span></a></li>
<li><a class="youtube" href="https://www.youtube.com/user/firefoxchannel" data-link-type="footer" data-link-text="YouTube (@firefoxchannel)">{{ ftl('footer-youtube') }}<span> (@firefoxchannel)</span></a></li>
</ul>
</div>
</section>
</div>
<div class="mzp-c-footer-section-wrapper links-section">
<section class="mzp-c-footer-refresh-section">
<h5 class="mzp-c-footer-label" data-testid="footer-heading-company">
{{ ftl('footer-company') }}
</h5>
<ul class="mzp-c-footer-primary-list" data-testid="footer-list-company">
<li><a href="{{ url('mozorg.about.leadership.index') }}" data-link-type="footer" data-link-text="footer-refresh-leadership = Leadership">{{ ftl('footer-refresh-leadership') }}</a></li>
<li><a href="https://blog.mozilla.org/category/mozilla/news/?{{ utm_params }}&utm_content=company" data-link-type="footer" data-link-text="Press Center">{{ ftl('footer-press-center') }}</a></li>
<li><a href="{{ url('careers.home') }}" data-link-type="footer" data-link-text="Careers">{{ ftl('footer-careers') }}</a></li>
<li><a href="{{ url('mozorg.contact.contact-landing') }}" data-link-type="footer" data-link-text="Contact">{{ ftl('footer-contact') }}</a></li>
<li>

</li>
{% if LANG == "de" %}
{# Legal requirement in Germany see issue #14240 #}
<li><a href="{{ url('legal.impressum') }}" data-link-type="footer" data-link-text="Impressum">Impressum</a></li>
{% endif %}
</ul>
</section>

<section class="mzp-c-footer-refresh-section">
<h5 class="mzp-c-footer-label" data-testid="footer-heading-support">
{{ ftl('footer-support') }}
</h5>
<ul class="mzp-c-footer-primary-list" data-testid="footer-list-support">
<li><a href="https://support.mozilla.org/?{{ utm_params }}&utm_content=support" data-link-type="footer" data-link-text="Product Help">{{ ftl('footer-product-help', fallback='footer-support') }}</a></li>
<li><a href="https://bugzilla.mozilla.org/?{{ utm_params }}&utm_content=support" data-link-type="footer" data-link-text="File a Bug">{{ ftl('footer-file-a-bug') }}</a></li>
<li><a href="https://pontoon.mozilla.org/?{{ utm_params }}&utm_content=support" data-link-type="footer" data-link-text="Localise Mozilla">{{ ftl('footer-localize-mozilla') }}</a></li>
</ul>
</section>

<section class="mzp-c-footer-refresh-section">
<h5 class="mzp-c-footer-label" data-testid="footer-heading-resources">
{{ ftl('footer-resources') }}
</h5>
<ul class="mzp-c-footer-primary-list" data-testid="footer-list-resources">
<li><a href="https://www.mozilla.org/advertising/" data-link-type="footer" data-link-text="Advertise with Mozilla">{{ ftl('footer-refresh-advertise') }}</a></li>
<li><a href="https://mozilla.design/?{{ utm_params }}&utm_content=resources" data-link-type="footer" data-link-text="Brand Standards">{{ ftl('footer-brand-standards') }}</a></li>
<li><a href="/firefox/{{ latest_firefox_version }}/releasenotes/" data-link-type="footer" data-link-text="Firefox Release Notes">{{ ftl('footer-refresh-firefox-release-notes') }}</a></li>
</ul>
</section>

<section class="mzp-c-footer-refresh-section">
<h5 class="mzp-c-footer-label" data-testid="footer-heading-developers">
{{ ftl('footer-developers') }}
</h5>
<ul class="mzp-c-footer-primary-list" data-testid="footer-list-developers">
<li><a href="{{ url('firefox.developer.index') }}" data-link-type="footer" data-link-text="Firefox Developer Edition">{{ ftl('footer-developer-edition') }}</a></li>
<li><a href="{{ url('firefox.enterprise.index') }}" data-link-type="footer" data-link-text="Firefox for Enterprise">{{ ftl('footer-enterprise') }}</a></li>
<li><a href="https://firefox-source-docs.mozilla.org/devtools-user/?{{ utm_params }}&utm_content=developers" rel="external" data-link-type="footer" data-link-text="Tools">{{ ftl('footer-tools') }}</a></li>
<li><a href="https://developer.mozilla.org/?{{ utm_params }}" data-link-type="footer" data-link-text="MDN">{{ ftl('footer-refresh-mdn') }}</a></li>
</ul>
</section>
</div>
</div>
</nav>
<div class="mzp-c-footer-actions">
<a class="mzp-c-button mzp-t-dark mzp-t-secondary footer-donate" href="{{ donate_url(location='moco-donate-footer') }}" data-link-type="button" data-link-text="Donate">
<span class="mzp-c-button-icon-start">
<svg height="640" viewBox="0 0 896.173 896.173" width="640" xmlns="http://www.w3.org/2000/svg"><switch><path d="m415.586 381.044v-65.006h65.001v65.006zm151.61-179.868c-34.105 0-63.39 12.422-86.609 27.824v87.038c4.788-5.861 12.53-14.509 22.611-22.98 21.228-17.838 42.76-26.882 63.998-26.882 47.765 0 86.625 40.383 86.625 90.02 0 72.488-58.765 143.314-108.062 189.965-37.953 35.915-76.426 63.436-97.672 77.68-21.246-14.244-59.72-41.765-97.673-77.68-49.297-46.651-108.062-117.477-108.062-189.964 0-49.638 38.86-90.021 86.625-90.021 21.239 0 42.77 9.044 63.998 26.882 10.082 8.472 17.823 17.119 22.611 22.98v-87.038c-23.218-15.402-52.503-27.824-86.609-27.824-83.606 0-151.625 69.542-151.625 155.02 0 43.355 14.14 88.366 42.027 133.784 21.258 34.62 50.627 69.704 87.29 104.273 61.41 57.902 122.133 94.58 124.688 96.112l7.735 4.632h17.989l7.735-4.632c2.555-1.533 63.278-38.21 124.687-96.112 36.664-34.57 66.033-69.652 87.29-104.273 27.888-45.418 42.028-90.429 42.028-133.783 0-85.479-68.019-155.021-151.625-155.021"/></switch></svg>
</span>
<span class="mzp-c-button-icon-text">{{ ftl('footer-donate') }}</span>
</a>
<div class="mzp-c-footer-language">
{% include 'includes/protocol/lang-switcher-refresh.html' %}
</div>
</div>
<nav class="mzp-c-footer-secondary">
<div class="mzp-c-footer-legal">
<p class="mzp-c-footer-license" rel="license">
{% set moco_link = 'href="%s" data-link-type="footer" data-link-text="Mozilla Corporation"'|safe|format(url('mozorg.home')) %}
{% set mofo_link = 'href="https://foundation.mozilla.org/?utm_source=www.mozilla.org&utm_medium=referral&utm_campaign=footer" rel="external noopener" data-link-type="footer" data-link-text="Mozilla Foundation"'|safe %}
{{ ftl('footer-visit-mozilla-corporations', moco_link=moco_link, mofo_link=mofo_link) }}<br>
{{ ftl('footer-portions-of-this-content', url=url('foundation.licensing.website-content'), current_year=current_year|string) }}
</p>
<ul class="mzp-c-footer-terms">
<li><a href="{{ url('privacy.notices.websites') }}" data-link-type="footer" data-link-text="Privacy">{{ ftl('footer-websites-privacy-notice') }}</a></li>
<li>
{# Link to /privacy/websites/cookie-settings/ is a legal requirement and should not be removed. It must be present on every page (Issue 14213). #}
<a href="{{ url('privacy.cookie-settings') }}" data-link-type="footer" data-link-text="Cookies">{{ ftl('footer-websites-cookies') }}</a>
</li>
<li><a href="{{ url('legal.index') }}" data-link-type="footer" data-link-text="Legal">{{ ftl('footer-websites-legal') }}</a></li>
<li><a href="{{ url('mozorg.about.governance.policies.participation') }}" data-link-type="footer" data-link-text="Community Participation Guidelines">{{ ftl('footer-community-participation-guidelines') }}</a></li>
{% if ftl_has_messages('footer-about-this-site') %}
<li><a href="{{ url('mozorg.about.this-site') }}" data-link-type="footer" data-link-text="About this site">{{ ftl('footer-about-this-site') }}</a></li>
{% endif %}
</ul>
</div>
</nav>
<img class="c-footer-logo-image-bottom" src="{{ static('img/logos/mozilla/footer-refresh/mozilla.png') }}" alt="mozilla" width="1376" height="285">
</div>
</footer>
{% else %}
<footer class="mzp-c-footer {% if theme_class %}{{ theme_class }}{% endif %}" id="colophon">
<div class="mzp-l-content">
<nav class="mzp-c-footer-primary">
Expand Down Expand Up @@ -123,3 +264,4 @@ <h5 class="mzp-c-footer-heading-social">{{ ftl('footer-follow-firefox') }}</h5>
</nav>
</div>
</footer>
{% endif %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{#
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.
#}

{% if translations|length > 1 %}
<form id="lang_form" class="moz24-c-language-switcher" method="get" action="#">
<select id="page-language-select" class="mzp-js-language-switcher-select" name="lang" dir="ltr" data-testid="footer-language-select">
{% for code, label in translations|dictsort -%}
{# Don't escape the label as it may include entity references
# like "Português (do&nbsp;Brasil)" (Bug 861149) #}
<option lang="{{ code }}" value="{{ code }}"{{ code|ifeq(LANG, " selected") }}>{{ label|safe|replace('English (US)', 'English') }}</option>
{% endfor %}
</select>
</form>
{% endif %}
1 change: 1 addition & 0 deletions bedrock/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ def _put_default_lang_first(langs, default_lang=LANGUAGE_CODE):
"brands",
"download_button",
"footer",
"footer-refresh",
"fxa_form",
"mozorg/about/shared",
"navigation",
Expand Down
10 changes: 10 additions & 0 deletions l10n/en/footer-refresh.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.

footer-refresh-find-out-about = Find out about { -brand-name-mozilla } products, initiatives, and more. We’ll never sell your email, even if presented with free pizza for life.
footer-refresh-leadership = Leadership
footer-refresh-press-center = Press Center
footer-refresh-advertise = Advertise with { -brand-name-mozilla }
footer-refresh-firefox-release-notes = { -brand-name-firefox } Release Notes
footer-refresh-mdn = MDN
Loading

0 comments on commit 9f8a232

Please sign in to comment.