Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WNP128 for Firefox #14720

Merged
merged 8 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{#
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 LANG.startswith('en-') %}
{% set donate_cta = "Donate to the Mozilla Foundation" %}
{% elif LANG == 'fr' %}
craigcook marked this conversation as resolved.
Show resolved Hide resolved
{% set donate_cta = "Faire un don à la Fondation Mozilla" %}
{% elif LANG == 'de' %}
{% set donate_cta = "Spende an die Mozilla Foundation" %}
{% elif LANG == 'es-ES' %}
{% set donate_cta = "Donar a la Fundación Mozilla" %}
{% elif LANG == 'it' %}
{% set donate_cta = "Dona alla Mozilla Foundation" %}
{% elif LANG == 'pl' %}
{% set donate_cta = "Wesprzyj Fundację Mozilli darowizną" %}
{% endif %}
reemhamz marked this conversation as resolved.
Show resolved Hide resolved

<div class="wnp-donate-wrapper mzp-u-centered">
<a class="mzp-c-button mzp-t-secondary mzp-t-md wnp-footer-donate" href="{{ donate_url(location='whats-new-product') }}" data-link-type="button" data-link-text="Donate">
<span class="mzp-c-button-icon-start">
<svg width="16" height="16" viewBox="0 0 16 16">
Comment on lines +23 to +24
Copy link
Contributor

@janbrasna janbrasna Jul 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW I'm not sure how well the image+text renders for you, I'm having better results with additional e.g. line-height: 2 aligning it better inside the button.

<path fill="#ff0000" d="M1.2,2.2c-1.5,1.5-1.5,4.2,0,5.7L8,15c2.3-2.4,4.5-4.7,6.9-7c1.5-1.5,1.5-4.2,0-5.7c-1.5-1.5-4-1.5-5.6,0L8,3.5 L6.7,2.3C5.1,0.6,2.7,0.6,1.2,2.2"/>
</svg>
</span>
{{ donate_cta }}
</a>
</div>
39 changes: 39 additions & 0 deletions bedrock/firefox/templates/firefox/whatsnew/index-thanks.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{#
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/.
#}

{% extends "firefox/whatsnew/base.html" %}

{% block page_title %}{{ ftl('whatsnew-page-title') }}{% endblock %}
{% block page_desc %}{{ ftl('whatsnew-page-description') }}{% endblock %}

{#- This will appear as <meta property="og:description"> which can be used for social share -#}
{% block page_og_desc %}{{ ftl('whatsnew-page-description') }}{% endblock %}

{% block body_id %}firefox-whatsnew{% endblock %}
{% block body_class %}{% endblock %}

{% block site_header %}{% endblock %}

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

{% block wnp_content %}
<section class="wnp-content-main">
<div class="mzp-l-content mzp-t-content-md">
<h1 class="wnp-main-title c-nimbus-128-title">{{ ftl('whatsnew-thanks-for-choosing') }}</h1>
reemhamz marked this conversation as resolved.
Show resolved Hide resolved
</div>
</section>

<div class="wnp-footer">
<p class="wnp-sign-off">{{ ftl('whatsnew-signoff') }}</p>
{% include "firefox/whatsnew/includes/mofo-donate-cta.html" %}
</div>
{% endblock %}

{% block js %}
{{ js_bundle('firefox_whatsnew') }}
{% endblock %}
5 changes: 5 additions & 0 deletions bedrock/firefox/templates/firefox/whatsnew/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ <h1 class="wnp-main-title">{{ ftl('whatsnew-s2d-download-firefox-for-your') }}</
</ul>
</div>
</section>

<div class="wnp-footer">
<p class="wnp-sign-off">{{ ftl('whatsnew-signoff') }}</p>
{% include "firefox/whatsnew/includes/mofo-donate-cta.html" %}
reemhamz marked this conversation as resolved.
Show resolved Hide resolved
</div>
{% endblock %}

{% block js %}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{#
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 %}

{% extends "firefox/whatsnew/base.html" %}

{% block page_title %}{{ ftl('whatsnew-page-title') }}{% endblock %}

{#- This will appear as <meta property="og:description"> which can be used for social share -#}
{% block page_og_desc %}{{ ftl('whatsnew-page-description') }}{% endblock %}

{% block body_id %}firefox-whatsnew{% endblock %}

{% block site_header %}{% endblock %}

{% block page_css %}
{{ css_bundle('protocol-split') }}
{{ css_bundle('firefox_whatsnew_128_eu') }}
{% endblock %}

{% if LANG == 'fr' %}
{% set main_title = "Un navigateur qui vous ressemble" %}
{% set image_alt_text = "Mon Firefox: Plus de vitesse. Plus de sécurité. Plus de fun." %}
{% set main_tagline = "Découvrez des extensions qui rendent votre navigation encore plus rapide, plus sûre et plus fun." %}
{% set page_cta = "Personnaliser mon Firefox" %}
{% set cta_link = "https://addons.mozilla.org/fr/firefox/" %}

{% elif LANG == 'de' %}
{% set main_title = "Ein wirklich persönlicher Browser" %}
{% set image_alt_text = "Mein Firefox: Schneller. Sicherer. Persönlicher." %}
{% set main_tagline = "Entdecke Erweiterungen, die dein Browsing schneller, sicherer und persönlicher machen." %}
{% set page_cta = "Personalisiere deinen Firefox" %}
{% set cta_link = "https://addons.mozilla.org/de/firefox/" %}

{% elif LANG == 'es-ES' %}
{% set main_title = "Un navegador que se adapta a ti" %}
{% set image_alt_text = "Mi Firefox: Más velocidad. Más seguridad. Más diversión." %}
{% set main_tagline = "Descubre las extensiones que hacen tu navegación aún más rápida, segura y divertida." %}
{% set page_cta = "Personaliza tu Firefox" %}
{% set cta_link = "https://addons.mozilla.org/es/firefox/" %}

{% elif LANG == 'it' %}
{% set main_title = "Un browser che si adatta a te" %}
{% set image_alt_text = "Il mio Firefox: Più veloce. Più sicuro. Più divertente." %}
{% set main_tagline = "Scopri tutte le estensioni che rendono la tua navigazione ancora più veloce, sicura e divertente." %}
{% set page_cta = "Personalizza il tuo Firefox" %}
{% set cta_link = "https://addons.mozilla.org/it/firefox/" %}

{% elif LANG == 'pl' %}
{% set main_title = "Przeglądarka na miarę twoich potrzeb" %}
{% set image_alt_text = "Mój Firefox: Szybciej. Bezpieczniej. Ciekawiej." %}
{% set main_tagline = "Odkryj rozszerzenia, z którymi przeglądanie będzie jeszcze szybsze, jeszcze bezpieczniejsze i jeszcze fajniejsze" %}
{% set page_cta = "Spersonalizuj swojego Firefoksa" %}
{% set cta_link = "https://addons.mozilla.org/pl/firefox/" %}

{% else %}
{% set main_title = "A browser that’s truly yours" %}
{% set image_alt_text = "My Firefox: More Speed. More Security. More Fun." %}
{% set main_tagline = "Discover extensions that make your browsing even faster, safer and more fun." %}
{% set page_cta = "Personalise your Firefox" %}
{% set cta_link = "https://addons.mozilla.org/en-GB/firefox/" %}
{% endif %}

{% block wnp_content %}
<section class="wnp-content-main wnp-content-addons">
<div class="mzp-l-content mzp-t-content-md">
<h1 class="wnp-main-title">{{ main_title }}</h1>

{{ picture(
url='img/firefox/wnp-128/addon.svg',
optional_attributes={
'class': 'wnp-main-image',
'alt': image_alt_text,
'width': '554',
'height': '300',
'l10n': True,
}
) }}

<p class="wnp-main-tagline">
{{ main_tagline }}
</p>

<p class="wnp-main-cta">
<a class="mzp-c-button mzp-t-product" href="{{ cta_link }}?{{ utm_params }}" data-cta-type="button" data-cta-text="Personalise your Firefox" target="_blank" rel="noopener">
{{ page_cta }}
</a>
</p>
</div>
</section>
reemhamz marked this conversation as resolved.
Show resolved Hide resolved

<section class="wnp-footer">
<p class="wnp-sign-off">{{ ftl('whatsnew-signoff') }}</p>
{% include "firefox/whatsnew/includes/mofo-donate-cta.html" %}
</section>
{% endblock %}

{% block js %}
{{ js_bundle('firefox_whatsnew_128_eu') }}
{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
{#
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/.
#}

{% extends "firefox/whatsnew/base.html" %}

{% block page_title %}{{ ftl('whatsnew-page-title') }}{% endblock %}

{#- This will appear as <meta property="og:description"> which can be used for social share -#}
{% block page_og_desc %}{{ ftl('whatsnew-page-description') }}{% endblock %}

{% block body_id %}firefox-whatsnew{% endblock %}

{% block site_header %}{% endblock %}

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

{% block experiments %}
{% if switch('experiment-firefox-whatsnew-128-eu') %}
{{ js_bundle('firefox_whatsnew_128_eu') }}
{% endif %}
{% endblock %}

{% if LANG == 'fr' %}
{% set main_title = "Faites un don à la Fondation Mozilla, l'organisme à but non lucratif derrière Firefox" %}

{% if variant == '2' %}
{% set main_tagline = "Firefox est un navigateur rapide comme l'éclair qui ne sacrifie pas votre vie privée avec des politiques de confidentialité douteuses. Ce navigateur est soutenu par la Fondation Mozilla - un mouvement mondial de gens qui travaillent à garder l'Internet ouvert et accessible à tous." %}
{% set secondary_tagline = "Vous avez choisi Firefox comme navigateur Internet, et maintenant nous espérons que vous ferez le prochain pas pour reprendre le contrôle d’Internet. Faites un don aujourd'hui à la Fondation Mozilla." %}
{% set donate_link = "https://foundation.mozilla.org/?form=Firefox-FR-B" %}
{% elif variant == '3' %}
{% set main_tagline = "Merci d'utiliser Firefox, le navigateur soutenu par la Fondation Mozilla. Rejoignez maintenant l'organisation qui mobilise les gens dans le monde entier pour protéger notre vie privée en ligne, exiger des grandes entreprises technologiques qu’elles rendent des comptes, et établir une IA digne de confiance. Ensemble, nous pouvons construire le mouvement qui garantira que l'avenir de l'Internet place les individus au centre." %}
{% set secondary_tagline = "Si vous êtes prêt à reprendre le contrôle d'Internet avec nous, pouvez-vous faire un don à la Fondation Mozilla dès aujourd'hui ?" %}
{% set donate_link = "https://foundation.mozilla.org/?form=Firefox-FR-C" %}
{% endif %}

{% set page_cta = "Faire un don" %}
{% set cta_link = "https://addons.mozilla.org/fr/firefox/" %}

{% elif LANG == 'de' %}
{% set main_title = "Spende der Mozilla Foundation, der Non-Profit-Organisation hinter Firefox" %}

{% if variant == '2' %}
{% set main_tagline = "Firefox ist ein blitzschneller Browser, der dich nicht mit fragwürdigen Datenschutzrichtlinien oder Hintertürchen für Werbetreibende hintergeht. Dieser Browser wird von der Mozilla Foundation unterstützt – eine globale Bewegung von Menschen, die daran arbeiten, das Internet offen und allen zugänglich zu machen." %}
{% set secondary_tagline = "Du hast Firefox als Browser gewählt – jetzt würden wir uns freuen, wenn du den nächsten Schritt machst, das Internet zurückzuerobern. Spende noch heute an die Mozilla Foundation." %}
{% set donate_link = "https://foundation.mozilla.org/?form=Firefox-DE-B" %}
{% elif variant == '3' %}
{% set main_tagline = "Vielen Dank, dass du Firefox nutzt – der Browser, der von der Non-Profit-Organisation Mozilla Foundation unterstützt wird. Werde jetzt Teil der Organisation, die weltweit Menschen vereint, um gemeinsam online die Privatsphäre zu schützen, große Tech-Unternehmen verantwortlich zu machen und vertrauenswürdige KI zu etablieren. Gemeinsam müssen wir dafür sorgen, dass das Internet der Zukunft den Menschen über alles stellt." %}
{% set secondary_tagline = "Wenn du bereit bist, dir das Internet zurückzuholen, kannst du noch heute der Mozilla Foundation etwas spenden?" %}
{% set donate_link = "https://foundation.mozilla.org/?form=Firefox-DE-C" %}
{% endif %}

{% set page_cta = "Spenden" %}
{% set cta_link = "https://addons.mozilla.org/de/firefox/" %}

{% else %}
{% set main_title = "Donate to the Mozilla Foundation, the non-profit behind Firefox" %}

{% if variant == '2' %}
{% set main_tagline = "Firefox is a lightning-fast browser that doesn't sell you out with shady privacy policies or back doors for advertisers. This browser is backed by the Mozilla Foundation – a global movement of people working to keep the internet open and accessible to all." %}
{% set secondary_tagline = "You chose Firefox as your internet browser, and now we hope you’ll take the next step to reclaim the internet. Make a donation today to the Mozilla Foundation." %}
{% set donate_link = "https://foundation.mozilla.org/?form=Firefox-UK-B" %}
{% elif variant == '3' %}
{% set main_tagline = "Thanks for using Firefox, which is backed by the non-profit Mozilla Foundation. Now join the organization that mobilizes people worldwide to protect our privacy online, hold big tech companies accountable, and establish trustworthy AI. Together we must build the movement to ensure the future of the internet puts people first." %}
{% set secondary_tagline = "If you are ready to reclaim the internet, can you make a donation to the Mozilla Foundation today?" %}
{% set donate_link = "https://foundation.mozilla.org/?form=Firefox-UK-C" %}
{% endif %}

{% set page_cta = "Donate" %}
{% set cta_link = "https://addons.mozilla.org/en-GB/firefox/" %}
{% endif %}

{% block wnp_content %}
<section class="wnp-content-main wnp-content-donate">
<div class="mzp-l-content mzp-t-content-md">
{{ picture(
url='img/firefox/whatsnew/whatsnew128-eu/firefox-and-mozilla.png',
optional_attributes={
'class': 'wnp-main-image',
'width': '554',
'height': '300'
}
) }}

<h1 class="wnp-main-title">{{ main_title }}</h1>

<div class="tagline-wrapper">
{% if variant == '2' %}
<p class="wnp-main-tagline">{{ main_tagline }}</p>
<p class="wnp-main-tagline"><strong>{{ secondary_tagline }}</strong></p>
{% elif variant == '3' %}
<p class="wnp-main-tagline">{{ main_tagline }}</p>
<p class="wnp-main-tagline"><strong>{{ secondary_tagline }}</strong></p>
{% endif %}
</div>

<p class="wnp-main-cta">
<a class="mzp-c-button mzp-t-product mzp-t-xl" href="{{ donate_link }}" data-cta-type="button" data-cta-text="Personalize your Firefox" target="_blank" rel="noopener">
{{ page_cta }}
<span class="mzp-c-button-icon-end">❤️</span>
</a>
</p>
</div>
</section>

<section class="wnp-footer">
<p class="wnp-sign-off">{{ ftl('whatsnew-signoff') }}</p>
</section>

{% endblock %}

Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{#
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.html" import video_inline_embed with context %}
{% from "macros-protocol.html" import picto with context %}

{% extends "firefox/whatsnew/base.html" %}

{% block page_title %}{{ ftl('whatsnew-page-title') }}{% endblock %}

{#- This will appear as <meta property="og:description"> which can be used for social share -#}
{% block page_og_desc %}{{ ftl('whatsnew-page-description') }}{% endblock %}
Comment on lines +14 to +15
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: Would this be better in whatsnew/base to just set and forget?

(or another base template for that matter — i silently expected the og:description being set to the same as meta description tbh…)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, og sets self.page_desc():

<meta property="og:description" content="{% filter striptags %}{% block page_og_desc %}{{ self.page_desc() }}{% endblock %}{% endfilter %}">

& meta leaves to the page_desc block:

<meta name="description" content="{% filter striptags %}{% block page_desc %}{% endblock %}{% endfilter %}">

that is never set further (firefox/base or whatsnew/base) so that means empty description in this case.

Which leads me to adding {% block page_desc %}{{ ftl('whatsnew-page-description') }}{% endblock %} to the whatsnew/base should actually fix both the meta and og descriptions for all WNPs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good suggestion. I think initially when these templates were started we had a different description for each page but somewhere along the way stopped doing that and it's been the same ever since. I'll do a follow-up PR to update the base template(s).


{% block body_id %}firefox-whatsnew{% endblock %}

{% block site_header %}{% endblock %}

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

{% block wnp_content %}
<section class="wnp-content-main mzp-l-content">
<div class="mzp-l-content mzp-t-content-md mzp-t-content-nospace c-video-wrapper">
{{ video_inline_embed(
id='lCWS8n7Gp2c',
title='Stick the landing with Firefox',
image=resp_img(
url='img/firefox/whatsnew/whatsnew128-na/gymnast.png',
optional_attributes={
'width': '1024',
'height': '576'
}
),
) }}
<h1 class="wnp-main-title">World-class multitasking</h1>

<p class="wnp-main-tagline has-pip-icon">Picture-In-Picture lets you watch every cartwheel and handspring without putting your life on pause. Just click <strong>the Picture-in-Picture button</strong> to pop out any video.</p>

<p class="wnp-main-cta">
<a class="mzp-c-button mzp-t-product" href="{{ url('firefox.features.picture-in-picture') }}" data-cta-type="button" data-cta-text="Learn more">
Learn more
</a>
</p>
</div>
</section>

<section class="wnp-footer">
<p class="wnp-sign-off">{{ ftl('whatsnew-signoff') }}</p>
{% include "firefox/whatsnew/includes/mofo-donate-cta.html" %}
</section>
{% endblock %}

{% block js %}
{{ js_bundle('video-inline-embed') }}
{{ js_bundle('firefox_whatsnew_128_na') }}
{% endblock %}
Loading