Skip to content

Commit

Permalink
Firefox 106 MR: add home promo, update /new features [fix mozilla#12225
Browse files Browse the repository at this point in the history
  • Loading branch information
craigcook authored Oct 19, 2022
1 parent 77520d6 commit db36bc9
Show file tree
Hide file tree
Showing 13 changed files with 439 additions and 11 deletions.
61 changes: 58 additions & 3 deletions bedrock/firefox/templates/firefox/new/desktop/download.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
{% block content %}

{% set show_mr2_browser_promo = switch("browser-mr2-promo") and variant == 'fx94' and ftl_has_messages('firefox-desktop-love-your-life', 'firefox-desktop-its-your-internet') %}
{% set show_mr106_browser_promo = switch('download-firefox-mr106-promo', ['en-US', 'en-CA', 'en-GB', 'fr', 'de']) %}

<main role="main" class="main-download" {% if v %}data-variant="{{ v }}"{% endif %}>

Expand Down Expand Up @@ -115,7 +116,62 @@ <h2 class="mzp-has-zap-7">{{ ftl('firefox-desktop-download-get-the-browser') }}<
</div>
</section>

{% if LANG.startswith('en') %}
{% if show_mr106_browser_promo %}
{% if LANG == 'fr' %}
{% set features_section_title = 'Les <strong>dernières</strong> fonctionnalités de Firefox' %}
{% set feature1_title = 'Reprenez où vous en étiez' %}
{% set feature1_body = 'Firefox View vous permet de voir vos onglets ouverts sur d’autres appareils et votre historique récent.' %}
{% set feature2_title = 'Éditez vos PDFs dans Firefox' %}
{% set feature2_body = 'Finie l’impression des PDF. Modifiez vos formulaires directement dans Firefox.' %}
{% set feature3_title = 'Naviguez en toute sécurité' %}
{% set feature3_body = 'La protection totale contre les cookies de Firefox vous offre une confidentialité hors pair par défaut.' %}
{% elif LANG == 'de' %}
{% set features_section_title = 'Die <strong>neuesten</strong> Firefox Funktionen' %}
{% set feature1_title = 'Mach da weiter, wo du aufgehört hast' %}
{% set feature1_body = 'Firefox View zeigt dir deine offenen Tabs von anderen Geräten und den aktuellen Verlauf.' %}
{% set feature2_title = 'PDFs direkt bearbeiten' %}
{% set feature2_body = 'Nie wieder ein PDF ausdrucken. Bearbeite jetzt Dokumente direkt in Firefox.' %}
{% set feature3_title = 'Spürbar geschützt Browsen' %}
{% set feature3_body = 'Der vollständige Cookie-Schutz von Firefox gibt dir standardmäßig höchste Privatsphäre.' %}
{% else %}
{% set features_section_title = '<strong>Latest</strong> Firefox features' %}
{% set feature1_title = 'Pick up where you left off' %}
{% set feature1_body = 'Firefox View lets you see your tabs open on other devices and recent history.' %}
{% set feature2_title = 'Edit your PDFs directly' %}
{% set feature2_body = 'Forget printing a PDF ever again. Start editing forms in Firefox directly.' %}
{% set feature3_title = 'Browse knowing you’re protected' %}
{% set feature3_body = 'Firefox’s Total cookie protection gives you outstanding privacy by default.' %}
{% endif %}

<section class="mzp-l-content t-releases">
<div class="mzp-c-emphasis-box js-animate">
<h2 class="mzp-c-section-heading mzp-has-zap-8">{{ features_section_title|safe }}</h2>

<ul class="c-trio">
<li>
{{ download_picture('feature-fxview', 84, 64) }}
<h3 class="mzp-u-title-xs">{{ feature1_title }}</h3>
<p>{{ feature1_body }}</p>
</li>
<li>
{{ download_picture('feature-pdf-edit', 68, 64) }}
<h3 class="mzp-u-title-xs">{{ feature2_title }}</h3>
<p>{{ feature2_body }}</p>
</li>

<li>
{{ download_picture('feature-tracking-protection-shield', 64, 64) }}
<h3 class="mzp-u-title-xs">{{ feature3_title }}</h3>
<p>{{ feature3_body }}</p>
</li>
</ul>

{% if LANG.startswith('en') %}
<p class="c-notes"><a class="mzp-c-cta-link" href="{{ url('firefox.notes') }}" data-cta-type="link" data-cta-text="See Release Notes">See Release Notes</a></p>
{% endif %}
</div>
</section>
{% elif LANG.startswith('en') %}
<section class="mzp-l-content t-releases">
<div class="mzp-c-emphasis-box js-animate">
<h2 class="mzp-c-section-heading mzp-has-zap-8"><strong>Latest</strong> Firefox features</h2>
Expand All @@ -137,7 +193,6 @@ <h3 class="mzp-u-title-xs">Expanded Dark Mode</h3>
<p>Take it easy on your eyes every time you go online.</p>
{% endif %}
</li>

<li>
{{ download_picture('lock', 64, 64) }}
<h3 class="mzp-u-title-xs">An extra layer of protection</h3>
Expand All @@ -148,7 +203,7 @@ <h3 class="mzp-u-title-xs">An extra layer of protection</h3>
<p class="c-notes"><a class="mzp-c-cta-link" href="{{ url('firefox.notes') }}" data-cta-type="link" data-cta-text="See Release Notes">See Release Notes</a></p>
</div>
</section>
{% endif %}
{% endif %}

<section class="t-highlights">
<h2 class="mzp-c-section-heading mzp-has-zap-11">{{ ftl('firefox-desktop-download-do-what-you-do') }}</h2>
Expand Down
12 changes: 8 additions & 4 deletions bedrock/mozorg/templates/mozorg/home/home-contentful.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@
{{ css_bundle('firefox-app-store-banner') }}
{% endif %}

{% if switch('homepage-firefox-family-promo') %}
{{ css_bundle('home-firefox-family-promo')}}
{% if switch('homepage-firefox-mr106-promo') %}
{{ css_bundle('home-firefox-mr106-promo') }}
{% elif switch('homepage-firefox-family-promo') %}
{{ css_bundle('home-firefox-family-promo') }}
{% elif switch('homepage-pocket-10-years-promo') %}
{{ css_bundle('home-pocket-10-years-promo')}}
{{ css_bundle('home-pocket-10-years-promo') }}
{% else %}
{{ css_bundle('home-mr2-promo') }}
{% endif %}
Expand Down Expand Up @@ -79,7 +81,9 @@
<h1>{{ self.page_title() }}</h1>
</header>

{% if switch("homepage-firefox-family-promo") %}
{% if switch('homepage-firefox-mr106-promo') %}
{% include 'mozorg/home/includes/firefox-mr106-promo.html'%}
{% elif switch("homepage-firefox-family-promo") %}
{% include 'mozorg/home/includes/firefox-family-promo.html'%}
{% elif switch('homepage-pocket-10-years-promo') %}
{% include 'mozorg/home/includes/pocket-10-years-promo.html' %}
Expand Down
8 changes: 6 additions & 2 deletions bedrock/mozorg/templates/mozorg/home/home-de.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
{{ css_bundle('protocol-call-out') }}
{{ css_bundle('home-eu') }}

{% if switch('homepage-mr2-promo-eu') %}
{% if switch('homepage-firefox-mr106-promo') %}
{{ css_bundle('home-firefox-mr106-promo') }}
{% elif switch('homepage-mr2-promo-eu') %}
{{ css_bundle('home-mr2-promo') }}
{% endif %}

Expand Down Expand Up @@ -58,7 +60,9 @@
<h1>{{ self.page_title() }}</h1>
</header>

{% if switch('homepage-mr2-promo-eu')%}
{% if switch('homepage-firefox-mr106-promo') %}
{% include 'mozorg/home/includes/firefox-mr106-promo.html'%}
{% elif switch('homepage-mr2-promo-eu')%}
{% include 'mozorg/home/includes/mr2-promo-eu.html' %}
{% else %}
{% call download_banner(
Expand Down
8 changes: 6 additions & 2 deletions bedrock/mozorg/templates/mozorg/home/home-fr.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
{{ css_bundle('protocol-call-out') }}
{{ css_bundle('home-eu') }}

{% if switch('homepage-mr2-promo-eu') %}
{% if switch('homepage-firefox-mr106-promo') %}
{{ css_bundle('home-firefox-mr106-promo') }}
{% elif switch('homepage-mr2-promo-eu') %}
{{ css_bundle('home-mr2-promo') }}
{% endif %}

Expand Down Expand Up @@ -58,7 +60,9 @@
<h1>{{ self.page_title() }}</h1>
</header>

{% if switch('homepage-mr2-promo-eu')%}
{% if switch('homepage-firefox-mr106-promo') %}
{% include 'mozorg/home/includes/firefox-mr106-promo.html'%}
{% elif switch('homepage-mr2-promo-eu')%}
{% include 'mozorg/home/includes/mr2-promo-eu.html' %}
{% else %}
{% call download_banner(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{#
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/.
#}

{% from "macros-protocol.html" import split with context %}

{% if LANG == 'fr' %}
{% set mr_promo_title_nonfx = 'Sentez-vous bien en ligne' %}
{% set mr_promo_title_fx = 'Naviguez en toute fluidité' %}
{% set mr_promo_body_nonfx = 'Le nouveau Firefox est riche en fonctionnalités conçues pour vous. Naviguez intuitivement d’un appareil à l’autre, choisissez une couleur exclusive, modifiez vos PDFs directement dans votre navigateur et bénéficiez du niveau de confidentialité que vous méritez.' %}
{% set mr_promo_body_fx = 'Le nouveau Firefox est riche en fonctionnalités conçues pour vous. Passez d’un appareil à l’autre et ne perdez jamais le fil de ce qui vous importe en ligne.' %}
{% set mr_promo_cta_nonfx_desktop = 'Installer Firefox' %}
{% set mr_promo_cta_fx_desktop = 'Télécharger Firefox mobile' %}
{% set mr_promo_cta_nonfx_mobile = 'Télécharger Firefox mobile' %}
{% set mr_promo_cta_fx_mobile = 'Faire de Firefox votre navigateur par défaut' %}
{% elif LANG == 'de' %}
{% set mr_promo_title_nonfx = 'Mach Firefox zu deinem Browser' %}
{% set mr_promo_title_fx = 'Browse einfach weiter' %}
{% set mr_promo_body_nonfx = 'Der neue Firefox steckt voller Funktionen, die für dich gemacht sind. Wechsle nahtlos von einem Gerät zum anderen, wähle exklusive Farben und bearbeite PDFs direkt im Browser – alles mit dem Level an Privatsphäre, das du verdienst.' %}
{% set mr_promo_body_fx = 'Der neue Firefox ist voller Features, die für dich gemacht sind. Wechsle nahtlos zwischen deinen Geräten und behalte im Blick, was dir wichtig ist.' %}
{% set mr_promo_cta_nonfx_desktop = 'Jetzt installieren' %}
{% set mr_promo_cta_fx_desktop = 'Hol dir Firefox fürs Handy' %}
{% set mr_promo_cta_fx_mobile = 'Mach Firefox zu deinem Standardbrowser' %}
{% set mr_promo_cta_nonfx_mobile = 'Hol dir Firefox fürs Handy' %}
{% else %}
{% set mr_promo_title_nonfx = 'Make Firefox yours' %}
{% set mr_promo_title_fx = 'Browsing has never been so seamless' %}
{% if LANG in ['en-CA', 'en-GB'] %}
{% set mr_promo_body_nonfx = 'The new Firefox is full of features designed with just you in mind. Browse seamlessly between devices, choose among exclusive colours, edit PDFs directly in your browser and get the level of privacy you deserve.' %}
{% else %}
{% set mr_promo_body_nonfx = 'The new Firefox is full of features designed with just you in mind. Browse seamlessly between devices, choose among exclusive colors, edit PDFs directly in your browser and get the level of privacy you deserve.' %}
{% endif %}
{% set mr_promo_body_fx = 'The new Firefox is full of features designed with just you in mind. Jump from one device to another and never lose track of what matters to you online.' %}
{% set mr_promo_cta_nonfx_desktop = 'Install now' %}
{% set mr_promo_cta_fx_desktop = 'Get Firefox mobile' %}
{% set mr_promo_cta_nonfx_mobile = 'Get Firefox mobile' %}
{% set mr_promo_cta_fx_mobile = 'Make Firefox your default browser' %}
{% endif %}

{% call split(
image_url='img/home/2022/mr-hero-custom.svg',
include_highres_image=False,
block_class='mr106-home-hero show-not-firefox mzp-t-split-nospace mzp-l-split-center-on-sm-md',
theme_class='mzp-t-dark',
body_class=None,
media_class='mzp-l-split-h-center mzp-l-split-v-center',
) %}
<div class="mzp-c-wordmark mzp-t-wordmark-lg mzp-t-product-firefox"></div>
<h2 class="c-mr106-title">{{ mr_promo_title_nonfx }}</h2>
<p class="c-mr106-body">{{ mr_promo_body_nonfx }}</p>
<div class="c-mr106-cta">
<div class="show-mobile">
<a class="mzp-c-button mzp-t-product mzp-t-dark mzp-t-xl" href="{{ url('firefox.browsers.mobile.index') }}" data-cta-type="link" data-cta-text="Get Firefox mobile" data-cta-position="MR Promo">{{ mr_promo_cta_nonfx_mobile }}</a>
</div>
<div class="show-desktop">
{{ download_firefox_thanks(alt_copy=mr_promo_cta_nonfx_desktop, dom_id='mr106-download-firefox', button_class='mzp-t-dark mzp-t-xl', download_location='MR Promo') }}
</div>
</div>
{% endcall %}

{% call split(
image_url='img/home/2022/mr-hero-sync.svg',
include_highres_image=False,
block_class='mr106-home-hero show-firefox mzp-t-split-nospace mzp-l-split-center-on-sm-md',
theme_class='mzp-t-dark',
body_class=None,
media_class='mzp-l-split-h-center mzp-l-split-v-center',
) %}
<div class="mzp-c-wordmark mzp-t-wordmark-lg mzp-t-product-firefox"></div>
<h2 class="c-mr106-title">{{ mr_promo_title_fx }}</h2>
<p class="c-mr106-body">{{ mr_promo_body_fx }}</p>
<div class="c-mr106-cta">
<div class="show-mobile">
<a class="mzp-c-button mzp-t-product mzp-t-dark mzp-t-xl" href="{{ url('firefox.set-as-default') }}" data-cta-text="Make Firefox your default browser" data-cta-type="button">{{ mr_promo_cta_fx_mobile }}</a>
</div>
<div class="show-desktop">
<a class="mzp-c-button mzp-t-product mzp-t-dark mzp-t-xl" href="{{ url('firefox.browsers.mobile.index') }}" data-cta-type="link" data-cta-text="Get Firefox mobile" data-cta-position="MR Promo">{{ mr_promo_cta_fx_desktop }}</a>
</div>
</div>
{% endcall %}
100 changes: 100 additions & 0 deletions media/css/mozorg/home/home-firefox-mr106-promo.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// 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/.

$image-path: '/media/protocol/img';

@import '~@mozilla-protocol/core/protocol/css/includes/lib';
@import '~@mozilla-protocol/core/protocol/css/components/logos/wordmark';
@import '~@mozilla-protocol/core/protocol/css/components/logos/wordmark-product-firefox';

.mr106-home-hero {
.mzp-c-split-bg {
background-color: $color-violet-60;
}

// Override Protocol spacing
&.mzp-t-split-nospace {
padding-top: 0;
padding-bottom: 0;
}

// Override Protocol wordmark
.mzp-c-wordmark.mzp-t-wordmark-lg.mzp-t-product-firefox {
background-image: url('/media/img/home/2022/logo-word-hor-white.svg');
background-position: center top;
margin-left: auto;
margin-right: auto;

@media #{$mq-md} {
background-position: left top;
margin-left: 0;
margin-right: 0;
}
}

// Override Protocol button
.mzp-c-button.mzp-t-product {
background-color: $color-white;
border-color: $color-white;
color: $color-black;
text-align: center;

&:hover,
&:focus {
background-color: $color-violet-50;
border-color: $color-white;
color: $color-white;
}
}
}

.c-mr106-title {
@include font-firefox;
@include text-title-sm;

@media #{$mq-lg} {
@include font-size(48px);
}

@media #{$mq-xl} {
@include font-size(64px);
}
}

.c-mr106-body {
@include text-body-lg;
}

// Hide mobile content by default
.show-mobile {
display: none;
}

// Hide Firefox content by default
.show-firefox {
display: none;
}

// Show mobile content on mobile, hide desktop content
.ios,
.android {
.show-desktop {
display: none;
}

.show-mobile {
display: block;
}
}

// Show Firefox content in Firefox, hide non-Firefox content
.is-firefox {
.show-firefox {
display: block;
}

.show-not-firefox {
display: none;
}
}
18 changes: 18 additions & 0 deletions media/img/firefox/new/desktop/feature-fxview.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions media/img/firefox/new/desktop/feature-pdf-edit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit db36bc9

Please sign in to comment.