Skip to content

Commit

Permalink
Merge branch 'master' into django-2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
SmileyChris committed May 31, 2019
2 parents b2eddfc + 78ae58b commit 33e85cf
Show file tree
Hide file tree
Showing 108 changed files with 2,868 additions and 698 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ <h4 class="mzp-c-menu-item-title">{{ _('Developer Innovations') }}</h4>
<ul class="mzp-c-menu-item-list">
<li><a href="https://research.mozilla.org/webassembly/?utm_source=www.mozilla.org&amp;utm_medium=referral&amp;utm_campaign=nav&amp;utm_content=developers" data-link-name="Web Assembly" data-link-type="nav" data-link-position="subnav" data-link-group="developers">{{ _('Web Assembly') }}</a></li>
<li><a href="https://research.mozilla.org/rust/?utm_source=www.mozilla.org&amp;utm_medium=referral&amp;utm_campaign=nav&amp;utm_content=developers" data-link-name="Rust" data-link-type="nav" data-link-position="subnav" data-link-group="developers">{{ _('Rust') }}</a></li>
<li><a href="https://games.mozilla.org/?utm_source=www.mozilla.org&amp;utm_medium=referral&amp;utm_campaign=nav&amp;utm_content=developers" data-link-name="Gaming" data-link-type="nav" data-link-position="subnav" data-link-group="developers">{{ _('Gaming') }}</a></li>
<li><a href="https://mixedreality.mozilla.org/?utm_source=www.mozilla.org&amp;utm_medium=referral&amp;utm_campaign=nav&amp;utm_content=developers" data-link-name="Mixed Reality" data-link-type="nav" data-link-position="subnav" data-link-group="developers">{{ _('Mixed Reality') }}</a></li>
</ul>
</section>
Expand Down
25 changes: 23 additions & 2 deletions bedrock/base/templates/macros.html
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ <h3>{{ _('Your download link was sent.') }}</h3>

{% if action == 'signup' %}
{% set fxa_path = 'signup' %}
{% elif action == 'signin' %}
{% set fxa_path = 'signin' %}
{% else %}
{% do fxa_queries.insert(0, 'action=email') %}
{% endif %}
Expand Down Expand Up @@ -327,15 +329,27 @@ <h3>{{ _('Your download link was sent.') }}</h3>
</div>
{%- endmacro %}

{% macro monitor_button(entrypoint='', utm_source='', utm_campaign='', button_text='', button_class='mzp-c-button mzp-t-product') -%}
<a data-action="{{ settings.FXA_ENDPOINT }}" href="https://monitor.firefox.com/oauth/init?utm_source={{ utm_source }}&utm_campaign={{ utm_campaign }}&form_type=email&entrypoint={{ entrypoint }}" class="{{ button_class }}" id="fxa-monitor-submit" data-button-name="Continue">
{% if button_text %}
{{ button_text }}
{% else %}
{{ _('Sign In to Monitor') }}
{% endif %}
</a>
{%- endmacro %}

{#
This macro is intended to be shown only to users on Firefox 48 and up.
This macro is typically shown only to users on Firefox 48 and up.
If you intend to show it to non-Firefox browsers, set all_browsers=True.

entrypoint: used to tag a given "page type" and remains the same across all
pages of the class, e.g., no matter URL of the firstrun page, entrypoint is
always `firstrun`. must validate against [\w.:-]+
REQUIRED
utm_source: used for analytics
REQUIRED
style: an optional param to invoke an alternatively styled page at accounts.firefox.com
class_name: applies a class to the form. default: 'fxa-email-form'
utm_params: dictionary of utm_* params to include. 'utm_' will automatically
be prepended to all keys. example:
Expand All @@ -352,7 +366,7 @@ <h3>{{ _('Your download link was sent.') }}</h3>

DO NOT include utm_source in this dictionary! (It's already a required param.)
#}
{% macro fxa_email_form(entrypoint, utm_source, class_name='fxa-email-form', utm_params={}, intro_text='', button_text='', button_class='js-fxa-cta-link button button-blue') -%}
{% macro fxa_email_form(entrypoint, utm_source, style, class_name='fxa-email-form', utm_params={}, form_title='', intro_text='', button_text='', button_class='js-fxa-cta-link button button-blue') -%}
<form action="{{ settings.FXA_ENDPOINT }}" data-mozillaonline-action="{{ settings.FXA_ENDPOINT_MOZILLAONLINE }}" id="fxa-email-form" class="{{ class_name }}">
<input type="hidden" name="action" value="email" />
<input type="hidden" name="context" value="fx_desktop_v3" />
Expand All @@ -368,6 +382,13 @@ <h3>{{ _('Your download link was sent.') }}</h3>
{% for attr, val in utm_params.items() %}
<input type="hidden" name="utm_{{ attr }}" value="{{ val }}" id="fxa-email-form-utm-{{ attr }}" />
{% endfor %}
{% if style %}
<input type="hidden" name="style" value="{{ style }}" />
{% endif %}

{% if form_title %}
<h2 class="fxa-email-form-title">{{ form_title }}</h2>
{% endif %}

<p class="fxa-email-form-intro">
{% if intro_text %}
Expand Down
16 changes: 2 additions & 14 deletions bedrock/firefox/firefox_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ class FirefoxAndroid(_ProductDetails):

# Product names defined in bouncer
product_map = {
'nightly': 'fennec-nightly-latest',
'beta': 'fennec-beta-latest',
'release': 'fennec-latest',
}
Expand Down Expand Up @@ -465,20 +466,7 @@ def get_download_url(self, channel='release', arch='arm', locale='multi',
:return: string url
"""
if force_direct:
# Use a direct archive link for Nightly
if channel == 'nightly':
if arch == 'x86':
api_version = 'x86'
elif self.latest_major_version(channel) < 56:
api_version = 'api-15'
else:
api_version = 'api-16'

return self.archive_urls[arch] % (self.archive_repo[channel],
api_version,
self.latest_version(channel))

# Use a bouncer link for Beta/Release
# Use a bouncer link
return '?'.join([self.bouncer_url, urlencode([
('product', self.product_map.get(channel, 'fennec-latest')),
('os', self.platform_map[arch]),
Expand Down
3 changes: 3 additions & 0 deletions bedrock/firefox/redirects.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,4 +603,7 @@ def firefox_channel(*args, **kwargs):

# issue 6979
redirect(r'^firefoxfightsforyou/?', 'firefox.fights-for-you'),

# issue 7210
redirect(r'^firefox/account/?$', 'firefox.accounts'),
)
2 changes: 1 addition & 1 deletion bedrock/firefox/templates/firefox/accounts-2018.html
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ <h2>{{ _('You deserve peace of mind everywhere.') }}</h2>
button_text=_('Create an Account'))
}}

<p class="fxa-signin">{{ _('Already have an account?') }} <a {{ fxa_link_fragment(entrypoint='mozzila.org-accounts_page', utm_params={'campaign': 'fxa-embedded-form', 'content': '/firefox/accounts/', 'source': 'accounts-page'}) }}>{{ _('Sign In') }}</a></p>
<p class="fxa-signin">{{ _('Already have an account?') }} <a {{ fxa_link_fragment(entrypoint='mozzila.org-accounts_page', action='signin', utm_params={'campaign': 'fxa-embedded-form', 'content': '/firefox/accounts/', 'source': 'accounts-page'}) }}>{{ _('Sign In') }}</a></p>
</div>
</div>

Expand Down
153 changes: 153 additions & 0 deletions bedrock/firefox/templates/firefox/accounts-2019.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
{# 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 http://mozilla.org/MPL/2.0/. #}

{% from "macros-protocol.html" import feature_card with context %}
{% from "macros.html" import fxa_email_form, fxa_link_fragment with context %}

{% extends "firefox/base-protocol.html" %}

{%- block page_title -%}
{# L10n: HTML page title #}
{{ _('Get a Firefox Account – Keep your data private, safe and synced') }}
{%- endblock -%}
{%- block page_desc -%}
{# L10n: HTML page description #}
{{ _('Securely sync your passwords, bookmarks and tabs across all your devices. Get a Firefox Account now – One login – Power and privacy everywhere.') }}
{%- endblock -%}

{% block page_css %}
{{ css_bundle('firefox_accounts_2019') }}
{% endblock %}

{% block body_class %}firefox-accounts mzp-t-firefox state-fxa-default {% endblock %}

{% block site_header %}
{% with hide_nav_download_button=True %}
{% include 'includes/protocol/navigation/index.html' %}
{% endwith %}
{% endblock %}

{% block content %}


<section class="c-accounts-hero">
<div class="mzp-l-content">
<div class="c-accounts-hero-body">
{# L10n: the span here is for visual formatting to display the phrase "Join Firefox" in a different color. #}
<h1 class="c-accounts-hero-title">{{ _('There is a way to protect your privacy. <span>Join Firefox.</span>') }}</h1>

{# L10n: This refers to the way some tech companies treat personal information as a commodity, as if their users are the product they're selling to their advertisers. #}
<p class="c-accounts-hero-desc">{{ _('Take your stand against an industry that’s making you the product.') }}</p>
</div>

<div class="c-accounts-form">
{{ fxa_email_form(
entrypoint='mozilla.org-accounts_page',
utm_source='accounts_page',
form_title=_('Join Firefox'),
intro_text=_('Enter your email address to get started.'),
button_class='mzp-c-button mzp-t-primary mzp-t-product',
style='trailhead',
utm_params={'campaign': 'accounts-trailhead', 'content': 'form-upper', 'medium': 'referral'})
}}

<p class="fxa-signin">{{ _('Already have an account?') }} <a {{ fxa_link_fragment(entrypoint='mozilla.org-accounts_page', action='signin', utm_params={'campaign': 'accounts-trailhead', 'content': 'form-upper', 'source': 'accounts_page'}) }}>{{ _('Sign In') }}</a></p>
</div>
</div>
</section>

<section class="c-accounts-products">
<div class="mzp-l-content">
<h2 class="c-section-title">{{ _('Get technology that fights for you.') }}</h2>

<ul class="c-product-list">
<li class="c-product-list-item t-product-firefox">
<a href="{{ url('firefox') }}">
{# L10n: This is not a complete proper name; "Firefox" is a proper name that shouldn't be translated, but you can choose to translate "browser". Span for formatting. #}
<h3 class="c-product-list-title">{{ _('Firefox <span>browser</span>') }}</h3>
<p class="c-product-list-desc">{{ _('Travel the internet with protection, on every device.') }}</p>
</a>
</li>
<li class="c-product-list-item t-product-lockwise">
<a href="https://lockwise.firefox.com?utm_source=www.mozilla.org&amp;utm_medium=referral&amp;utm_campaign=accounts-trailhead&amp;utm_content=product-list-item&amp;entrypoint=mozilla.org-accounts_page" data-link-name="Firefox Lockwise" data-link-type="link">
<h3 class="c-product-list-title">Firefox <span>Lockwise</span></h3>
<p class="c-product-list-desc">{{ _('Keep your passwords protected and portable.') }}</p>
</a>
</li>
<li class="c-product-list-item t-product-monitor">
<a href="https://monitor.firefox.com?utm_source=www.mozilla.org&amp;utm_medium=referral&amp;utm_campaign=accounts-trailhead&amp;utm_content=product-list-item&amp;entrypoint=mozilla.org-accounts_page" data-link-name="Firefox Monitor" data-link-type="link">
<h3 class="c-product-list-title">Firefox <span>Monitor</span></h3>
<p class="c-product-list-desc">{{ _('Get a lookout for data breaches.') }}</p>
</a>
</li>
<li class="c-product-list-item t-product-send">
<a href="https://send.firefox.com?utm_source=www.mozilla.org&amp;utm_medium=referral&amp;utm_campaign=accounts-trailhead&amp;utm_content=product-list-item&amp;entrypoint=mozilla.org-accounts_page" data-link-name="Firefox Send" data-link-type="link">
<h3 class="c-product-list-title">Firefox <span>Send</span></h3>
<p class="c-product-list-desc">{{ _('Share large files without prying eyes.') }}</p>
</a>
</li>
</ul>

<p class="c-accounts-products-tagline">{{ _('And get it all on every device, without feeling trapped in a single operating system.') }}</p>
</div>
</section>


<section class="c-accounts-value t-value-respect l-media-left">
<div class="c-accounts-value-container">
<div class="c-accounts-value-media">
{{ high_res_img('firefox/accounts/trailhead/value-respect.jpg', {'alt': '', 'width': '800', 'height': '600'}) }}
</div>

<div class="c-accounts-value-content">
<h3 class="c-accounts-value-title">{{ _('Get the respect you deserve.') }}</h3>

<p>
{% trans promise='https://blog.mozilla.org/firefox/firefox-data-privacy-promise/?utm_source=www.mozilla.org&amp;utm_medium=referral&amp;utm_campaign=accounts-trailhead&amp;utm_content=accounts-value&amp;utm_term=respect-you-deserve'|safe %}
You’ll always get the truth from us. Everything we make and do honors our <a href="{{ promise }}">Personal Data Promise</a>:
{% endtrans %}
</p>

{# L10n: Line breaks for formatting. #}
<p><strong>{{ _('Take less.<br> Keep it safe.<br> No secrets.') }}</strong></p>
</div>
</div>
</section>

<section class="c-accounts-value t-value-knowledge l-media-right">
<div class="c-accounts-value-container">
<div class="c-accounts-value-media">
{{ high_res_img('firefox/accounts/trailhead/value-knowledge.jpg', {'alt': '', 'width': '800', 'height': '600'}) }}
</div>

<div class="c-accounts-value-content">
<h3 class="c-accounts-value-title">{{ _('Get the knowledge to keep you safe.') }}</h3>
<p class="c-accounts-value-desc">{{ _('Learn everything you need to know (but don’t yet) about staying smart and safe online, from some of the world’s foremost experts.') }}</p>
</div>
</div>
</section>

<section class="c-accounts-movement">
<div class="mzp-l-content">
<h2 class="c-section-title">{{ _('And be part of protecting the internet for future generations.') }}</h2>

<div class="c-accounts-movement-container">
<div class="c-accounts-movement-item t-movement-build">
<h3 class="c-accounts-movement-title">{{ _('Help us build a better Firefox for all.') }}</h3>
<p class="c-accounts-movement-desc">{{ _('Get into the open source spirit by test-driving upcoming products.') }}</p>
</div>

<div class="c-accounts-movement-item t-movement-bigtech">
{# L10n: "Big Tech" refers to large technology companies that dominate the web, such as Google and Facebook. Mozilla helps to keep these companies "in check" by challenging their dominance so they can't completely take over. #}
<h3 class="c-accounts-movement-title">{{ _('Help us keep Big Tech in check.') }}</h3>
<p class="c-accounts-movement-desc">{{ _('We support communities all over the world standing up for a healthier internet. Add your voice to the fight.') }}</p>
</div>
</div>
</div>
</section>
{% endblock %}

{% block js %}
{{ js_bundle('firefox_accounts_2019') }}
{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{# 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 http://mozilla.org/MPL/2.0/. -#}

{% add_lang_files "firefox/whatsnew_67.0.5" %}

{% extends "firefox/whatsnew/whatsnew-fx67.0.5.html" %}

{% block fxa_form %}
{{ fxa_email_form(
entrypoint='mozilla.org-whatsnew68a2',
button_class='mzp-c-button mzp-t-product mzp-t-small',
utm_source='whatsnew68a2',
style='trailhead',
utm_params={'campaign': 'fxa-embedded-form', 'content': 'whatsnew', 'medium': 'referral'})
}}
{% endblock %}

{% block monitor_button %}
{{ monitor_button(
entrypoint='mozilla.org-whatsnew68a2',
utm_source='whatsnew68a2',
utm_campaign='whatsnew68a2'
) }}
{% endblock %}
Loading

0 comments on commit 33e85cf

Please sign in to comment.