This commit is contained in:
Craig Cook 2020-03-03 13:00:06 -08:00 коммит произвёл GitHub
Родитель 239077f749
Коммит f6abea0b66
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
12 изменённых файлов: 486 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,150 @@
{# 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_74" %}
{% extends "firefox/whatsnew/base.html" %}
{% block page_title %}{{ _('Whats new with Firefox - Make it harder for Facebook to track you') }}{% endblock %}
{% block page_css %}
{{ css_bundle('firefox_whatsnew_74') }}
{% endblock %}
{% block site_header %}{% endblock %}
{% block content %}
<main class="content-wrapper mzp-t-firefox mzp-t-dark">
<header class="c-page-header">
<div class="mzp-l-content c-page-header-inner">
{{ high_res_img('protocol/img/logos/firefox/browser/logo-word-hor-white-sm.png', {'alt': 'Firefox', 'width': '216', 'height': '40', 'class': 'c-page-header-logo-fx'}) }}
<div class="mzp-c-notification-bar mzp-t-success">
<p>{{ _('Congrats! Youre using the latest version of Firefox.') }}</p>
</div>
</div>
</header>
<section class="content-main">
<div class="mzp-l-content">
<div class="mzp-c-emphasis-box">
<img class="c-emphasis-box-logo" src="{{ static('img/logos/fbcontainer/logo-fbcontainer.svg') }}" alt="">
<h2 class="c-emphasis-box-title">
{{ _('Its okay to like Facebook') }}
</h2>
{# L10n: "Facebook Container" is a product name and shouldn't be translated. #}
<p>{{ _('If you still kinda like Facebook but dont trust them, then try the Facebook Container extension by Firefox and make it harder for them to track you around the web.') }}</p>
<div>
{# L10n: "Facebook Container" is a product name and shouldn't be translated. #}
<a href="https://addons.mozilla.org/firefox/addon/facebook-container/?src=external-www.mozilla.org-whatsnew74&utm_source=www.mozilla.org-whatsnew74&utm_medium=referral&utm_campaign=feb2020" class="mzp-c-button mzp-t-product" id="facebook-container-button" rel="external">{{ _('Get Facebook Container') }}</a>
</div>
</div>
</div>
</section>
<section class="content-extra">
<div class="mzp-l-content">
<div class="l-columns-three">
<div class="c-picto-block">
<div class="c-picto-block-image">
<img src="{{ static('img/icons/photo-orange.svg') }}" alt="">
</div>
{# L10n: "Do it for the 'Gram" is a slang phrase used when people do things in life just so they can take pictures to post on Instagram. Alternative: "It works on Instagram" #}
<h3 class="c-picto-block-title">{{ _('Do it for the Gram') }}</h3>
<div class="c-picto-block-body">
{# L10n: "Facebook Container", "Instagram", "Facebook Messenger" and "Workplace" are proper names that shouldn't be translated. #}
<p>
{{ _('Facebook Container also works on other Facebook owned sites like Instagram, Facebook Messenger and Workplace.') }}
<br>
<a href="https://addons.mozilla.org/firefox/addon/facebook-container/?src=external-www.mozilla.org-whatsnew74&utm_source=www.mozilla.org-whatsnew74&utm_medium=referral&utm_campaign=feb2020" rel="external"><strong>{{ _('Make them unfollow you') }}</strong></a>
</p>
</div>
</div>
{% if LANG.startswith('en-') %}
<div class="c-picto-block">
<div class="c-picto-block-image">
<img src="{{ static('img/icons/audio-pink.svg') }}" alt="">
</div>
<h3 class="c-picto-block-title">{{ _('Listen to this') }}</h3>
<div class="c-picto-block-body">
<p>
{{ _('Why are companies like Google and Facebook doing everything they can to predict your behavior?') }}
<br>
<a href="https://irlpodcast.org/season4/episode5/?utm_source=www.mozilla.org-whatsnew74&utm_medium=referral&utm_campaign=feb2020" rel="external"><strong>{{ _('Listen to our IRL podcast') }}</strong></a>
</p>
</div>
</div>
{% elif LANG == 'de' %}
<div class="c-picto-block">
<div class="c-picto-block-image">
<img src="{{ static('img/icons/audio-pink.svg') }}" alt="">
</div>
<h3 class="c-picto-block-title">Hörs dir rein</h3>
<div class="c-picto-block-body">
<p>
Im Netz der Tracker: Niemand sollte ohne Zustimmung online verfolgt werden dürfen. Warum Online-Tracking problematisch ist und was es für unsere Gesellschaft bedeutet?
<br>
<a href="https://awebpodcast.org/staffel1/folge7/?utm_source=www.mozilla.org-whatsnew74&utm_medium=referral&utm_campaign=feb2020" rel="external"><strong>Jetzt im aweb Podcast</strong></a>
</p>
</div>
</div>
{% elif LANG == 'fr' %}
<div class="c-picto-block">
<div class="c-picto-block-image">
<img src="{{ static('img/icons/blog-pink.svg') }}" alt="">
</div>
<h3 class="c-picto-block-title">Les traqueurs de réseaux sociaux, cest quoi exactement ?</h3>
<div class="c-picto-block-body">
<p>
Les platformes de réseaux sociaux déposent des traqueurs sur d'autres sites afin de suivre ce que vous faites en ligne.
<br>
<a href="https://blog.mozilla.org/firefox/fr/que-sont-les-traqueurs-de-reseaux-sociaux/?utm_source=www.mozilla.org-whatsnew74&utm_medium=referral&utm_campaign=feb2020"><strong>Apprenez à les contourner</strong></a>
</p>
</div>
</div>
{% else %}
<div class="c-picto-block">
<div class="c-picto-block-image">
<img src="{{ static('img/icons/facebook-button.svg') }}" alt="">
</div>
<h3 class="c-picto-block-title">{{ _('That sneaky little button') }}</h3>
<div class="c-picto-block-body">
<p>{{ _('Those innocent-looking F buttons from Facebook track your web activity, even if you dont have an account. Facebook Container blocks them.') }}</p>
</div>
</div>
{% endif %}
<div class="c-picto-block">
<div class="c-picto-block-image">
<img src="{{ static('protocol/img/logos/firefox/monitor/logo.svg') }}" width="48" height="48" alt="">
</div>
<h3 class="c-picto-block-title">{{ _('Stay ahead of hackers') }}</h3>
<div class="c-picto-block-body">
<p>
{# L10n: "Firefox Monitor" is a product name that shouldn't be translated. #}
{{ _('Firefox Monitor lets you find out what hackers might already know about you and helps you stay a step ahead of them. (And its free.)') }}
<br>
<a href="https://monitor.firefox.com/?utm_source=www.mozilla.org-whatsnew74&utm_medium=referral&utm_campaign=feb2020"><strong>{{ _('Get Firefox Monitor') }}</strong></a>
</p>
</div>
</div>
</div>
</div>
</section>
<aside class="mzp-l-content c-utilities">
<p>
{% trans notes=url('firefox.notes') %}
Read the <a href="{{ notes }}">Release Notes</a> to know more about whats new in your Firefox Browser.
{% endtrans %}
</p>
</aside>
</main>
{% endblock %}
{% block js %}
{{ js_bundle('firefox_whatsnew_74') }}
{% endblock %}

Просмотреть файл

@ -427,6 +427,19 @@ class TestWhatsNew(TestCase):
# end 73.0 whatsnew tests
# begin 74.0 whatsnew tests
@patch.object(fx_views, 'lang_file_is_active', lambda *x: True)
def test_fx_74_0_0(self, render_mock):
"""Should use whatsnew-fx74 template for 74.0"""
req = self.rf.get('/firefox/whatsnew/')
req.locale = 'en-US'
self.view(req, version='74.0')
template = render_mock.call_args[0][1]
assert template == ['firefox/whatsnew/whatsnew-fx74.html']
# end 74.0 whatsnew tests
@patch('bedrock.firefox.views.l10n_utils.render', return_value=HttpResponse())
class TestWhatsNewIndia(TestCase):

Просмотреть файл

@ -569,6 +569,13 @@ class WhatsnewView(L10nTemplateView):
template = 'firefox/whatsnew/index.html'
elif locale == 'id':
template = 'firefox/whatsnew/index-lite.id.html'
elif version.startswith('74.'):
if lang_file_is_active('firefox/whatsnew_74', locale):
template = 'firefox/whatsnew/whatsnew-fx74.html'
elif lang_file_is_active('firefox/whatsnew_73', locale):
template = 'firefox/whatsnew/whatsnew-fx73.html'
else:
template = 'firefox/whatsnew/index.html'
elif version.startswith('73.') and lang_file_is_active('firefox/whatsnew_73', locale):
template = 'firefox/whatsnew/whatsnew-fx73.html'
elif version.startswith('72.') and lang_file_is_active('firefox/whatsnew_71', locale):

Просмотреть файл

@ -0,0 +1,195 @@
// 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/.
$font-path: '/media/fonts';
$image-path: '/media/protocol/img';
@import '../../../protocol/css/includes/lib';
@import '../../../protocol/css/components/emphasis-box';
@import '../../../protocol/css/components/notification-bar';
.content-main {
padding: 0;
@media #{$mq-md} {
padding-top: $spacing-2xl;
}
}
.content-wrapper {
background: $color-ink-80 url('/media/img/firefox/whatsnew/whatsnew_background.svg') no-repeat;
@include background-size(100%);
color: $color-white;
}
.c-utilities {
@include text-body-sm;
max-width: $content-md;
text-align: center;
}
//* -------------------------------------------------------------------------- */
// Up-to-date page header
.c-page-header {
background: transparent;
}
.mzp-c-notification-bar {
color: $color-ink-80;
display: none;
margin: $layout-xs;
.is-up-to-date & {
display: block;
}
}
.c-page-header-inner {
align-items: center;
display: grid;
grid-template-columns: 1fr;
}
.c-page-header-up-to-date {
margin: 0 $layout-sm;
}
.c-page-header-logo-fx {
min-width: 216px;
}
@media #{$mq-md} {
.c-page-header-inner {
align-items: center;
display: grid;
grid-template-columns: 1fr max-content 1fr;
}
}
//* -------------------------------------------------------------------------- */
// Emphasis box
.mzp-c-emphasis-box {
@include border-box;
color: $color-ink-80;
margin: 0 auto $layout-sm;
max-width: $content-md - ($layout-md * 2);
padding: $spacing-xl;
text-align: center;
:link {
color: $color-ink-80;
}
abbr {
text-decoration: none;
}
.c-emphasis-box-logo {
display: block;
margin: 0 auto $spacing-lg;
width: 50px;
}
.c-emphasis-box-title {
@include text-display-sm;
}
.c-emphasis-box-tagline {
@include text-display-xs;
}
.cta {
margin: $spacing-xl 0 $spacing-sm;
}
@media #{$mq-md} {
padding: $spacing-xl $layout-md;
.c-emphasis-box-title br {
display: block;
}
}
}
//* -------------------------------------------------------------------------- */
// Conditional CTA
.state-is-default {
display: none;
}
.is-firefox-default {
.state-is-default {
display: inline-block;
}
.state-not-default {
display: none;
}
}
// no-JS
.no-js {
.content-main {
padding: 0;
}
.mzp-c-emphasis-box {
display: none;
}
}
//* -------------------------------------------------------------------------- */
// Extra content
// To be replaced by revamped picto card. See https://github.com/mozilla/protocol/issues/382
.c-picto-block {
@include border-box;
margin: 0 auto $spacing-2xl;
max-width: $content-md - ($layout-md * 2);
padding: 0 $layout-md;
.c-picto-block-title {
@include text-display-xs;
}
.c-picto-block-image {
align-items: center;
display: flex;
margin-bottom: $spacing-md;
min-height: $layout-md;
}
}
@media #{$mq-md} {
.l-columns-two,
.l-columns-three {
display: flex;
margin: 0 auto;
max-width: $content-md - ($layout-md * 2);
padding: 0 $layout-md;
flex-wrap: wrap;
.c-picto-block {
flex: 1 1 50%;
padding: 0 $spacing-lg;
}
}
}
@media #{$mq-lg} {
.l-columns-three {
display: flex;
margin: 0 auto;
max-width: $content-lg;
.c-picto-block {
flex: 1 1 33.3%;
padding: 0 $spacing-lg;
}
}
}

Просмотреть файл

@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 43" width="48" height="43">
<style>
.st0{fill:#ff8ac5}.st1{fill:#ff298a}.st2{fill:#e31587}
</style>
<path d="M30.3 29c-.6 0-1.1-.5-1.1-1.1s.5-1.1 1.1-1.1c2.7-.2 4.7-2.5 4.5-5.1-.2-2.4-2.1-4.3-4.5-4.5-.6 0-1.1-.5-1.1-1.1 0-.6.5-1.1 1.1-1.1 3.9 0 7 3.1 7 7s-3.1 7-7 7z" class="st0"/>
<path d="M32.4 33.5c-.5 0-.8-.4-.8-.8 0-.5.4-.8.8-.8 4.2 0 7.6-4.5 7.6-10s-3.4-10-7.6-10c-.5 0-.8-.4-.8-.8 0-.5.4-.8.8-.8 5.1 0 9.3 5.2 9.3 11.7s-4.1 11.5-9.3 11.5z" class="st1"/>
<path d="M34.3 38.6c-.3 0-.6-.2-.6-.6 0-.3.3-.5.6-.6 6.5 0 11.7-6.8 11.7-15.2S40.6 7.1 34.3 7.1c-.3 0-.6-.2-.6-.6s.2-.5.6-.5c7 0 12.7 7.3 12.7 16.3s-5.7 16.3-12.7 16.3z" class="st0"/>
<path d="M1 21v3.4c-.1 4.3 3.3 7.9 7.7 8h4.6V29H8.7C4.3 28.9.9 25.3 1 21z" class="st2"/>
<path d="M8.7 10.4c-4.3.1-7.8 3.7-7.7 8V21c-.1 4.3 3.3 7.9 7.7 8h4.6V10.4H8.7z" class="st1"/>
<path d="M24.4 32.2l-11.1-10v10.1l11.1 10c.3.2.7.2 1-.2.1-.1.1-.3.1-.4v-10c0 .4-.3.7-.7.7-.1 0-.3-.1-.4-.2z" class="st2"/>
<path d="M24.1.7l-10.8 9.8v11.8l11.1 10c.3.2.7.2 1-.2.1-.1.1-.3.1-.4V1.4c0-.5-.4-.9-.9-.9-.2 0-.3.1-.5.2z" class="st1"/>
</svg>

После

Ширина:  |  Высота:  |  Размер: 1.1 KiB

Просмотреть файл

@ -0,0 +1,20 @@
<svg xmlns="http://www.w3.org/2000/svg" x="0" y="0" version="1.1" viewBox="0 0 40 43" width="40" height="43" xml:space="preserve">
<style>
.st3{fill:none;stroke:#ff298a;stroke-width:.8772;stroke-linecap:round}
</style>
<path fill="#ff8ac5" d="M36.9 1.1H3.1C1.6 1.1.5 2.3.5 3.7v35.9c0 1.5 1.2 2.6 2.6 2.6h33.7c1.5 0 2.6-1.2 2.6-2.6V3.8c.1-1.5-1.1-2.7-2.5-2.7z"/>
<path fill="#ff298a" d="M36.9.7H3.1C1.6.7.5 1.9.5 3.3v5.4h39V3.4c0-1.5-1.2-2.7-2.6-2.7z"/>
<path fill="#e10980" d="M3.4 11.7h9.1v25.9H3.4z"/>
<g>
<path d="M16.2 16.6h19.5" class="st3"/>
<path d="M16.2 18.6h19.5" class="st3"/>
<path d="M16.2 20.6h19.5" class="st3"/>
<path d="M16.2 14.5h19.5" class="st3"/>
<path d="M16.4 22.6h9.7" class="st3"/>
<path d="M16.2 28.8h19.5" class="st3"/>
<path d="M16.2 30.8h19.5" class="st3"/>
<path d="M16.2 32.8h19.5" class="st3"/>
<path d="M16.2 26.8h19.5" class="st3"/>
<path d="M16.4 34.8h9.7" class="st3"/>
</g>
</svg>

После

Ширина:  |  Высота:  |  Размер: 976 B

Просмотреть файл

@ -0,0 +1,14 @@
<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 45 47" viewBox="0 0 45 47" width="45" height="47">
<path fill="#1877f2" d="M3.3.1h38.5c1.7 0 3 1.3 3 3V44c0 1.7-1.3 3-3 3H3.3c-1.7 0-3-1.3-3-3V3.1c0-1.7 1.3-3 3-3z"/>
<defs>
<filter id="a" width="27.5" height="27.3" x="8.7" y="9.9" filterUnits="userSpaceOnUse">
<feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"/>
</filter>
</defs>
<mask id="b" width="27.5" height="27.3" x="8.7" y="9.9" maskUnits="userSpaceOnUse">
<g filter="url(#a)">
<path fill="#fff" d="M3.3.1h38.5c1.7 0 3 1.3 3 3V44c0 1.7-1.3 3-3 3H3.3c-1.7 0-3-1.3-3-3V3.1c0-1.7 1.3-3 3-3z"/>
</g>
</mask>
<path fill="#fffffe" d="M36.2 23.6C36.2 16 30 9.9 22.4 9.9S8.7 16 8.7 23.6c0 6.9 5 12.5 11.6 13.6v-9.6h-3.5v-4h3.5v-3c0-3.4 2-5.3 5.2-5.3 1.5 0 3.1.3 3.1.3V19h-1.7c-1.7 0-2.2 1.1-2.2 2.1v2.6h3.8l-.6 4h-3.2v9.6c6.4-1.1 11.5-6.8 11.5-13.7" mask="url(#b)"/>
</svg>

После

Ширина:  |  Высота:  |  Размер: 946 B

Просмотреть файл

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 43" width="40" height="43">
<path fill="#ff7139" d="M35.4 42.6H4.6C2 42.6 0 40.6 0 38V5C0 2.5 2 .4 4.6.4h30.9C38 .4 40 2.4 40 5v33c0 2.6-2 4.6-4.6 4.6z"/>
<path fill="#ffb675" d="M3.6 4h32.9v26.9H3.6z"/>
<path fill="#e25920" d="M36.4 24.8l-1-1.2-6.3-7.4c-.3-.4-.8-.6-1.3-.6s-.9.2-1.3.6l-6.1 7.5c-.5.6-1.2.8-1.9.5l-6.2-2.4c-.6-.2-1.2-.1-1.6.3l-7.3 5.8v3h32.9v-6.1z"/>
</svg>

После

Ширина:  |  Высота:  |  Размер: 436 B

Просмотреть файл

@ -0,0 +1,24 @@
/* 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/. */
// create namespace
if (typeof window.Mozilla === 'undefined') {
window.Mozilla = {};
}
(function(Mozilla) {
'use strict';
var client = Mozilla.Client;
// bug 1419573 - only show "Your Firefox is up to date" if it's the latest version.
if (client.isFirefoxDesktop) {
client.getFirefoxDetails(function(data) {
if (data.isUpToDate) {
document.querySelector('.main-header').classList.add('show-up-to-date-message');
}
});
}
})(window.Mozilla);

Просмотреть файл

@ -444,6 +444,12 @@
],
"name": "firefox_whatsnew_73"
},
{
"files": [
"css/firefox/whatsnew/whatsnew-74.scss"
],
"name": "firefox_whatsnew_74"
},
{
"files": [
"css/firefox/privacy/common.scss"
@ -922,6 +928,14 @@
],
"name": "firefox_whatsnew_73"
},
{
"files": [
"js/base/uitour-lib.js",
"js/firefox/whatsnew/up-to-date.js",
"js/firefox/whatsnew/whatsnew-74.js"
],
"name": "firefox_whatsnew_74"
},
{
"files": [
"protocol/js/protocol-newsletter.js"

Просмотреть файл

@ -0,0 +1,14 @@
# 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/.
import pytest
from pages.firefox.whatsnew.whatsnew_74 import FirefoxWhatsNew74Page
@pytest.mark.skip_if_not_firefox(reason='Whatsnew pages are shown to Firefox only.')
@pytest.mark.nondestructive
def test_facebook_container_button_is_displayed(base_url, selenium):
page = FirefoxWhatsNew74Page(selenium, base_url, params='').open()
assert page.is_facebook_container_button_displayed

Просмотреть файл

@ -0,0 +1,18 @@
# 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 selenium.webdriver.common.by import By
from pages.firefox.base import FirefoxBasePage
class FirefoxWhatsNew74Page(FirefoxBasePage):
URL_TEMPLATE = '/{locale}/firefox/74.0/whatsnew/all/{params}'
_facebook_container_button_locator = (By.ID, 'facebook-container-button')
@property
def is_facebook_container_button_displayed(self):
return self.is_element_displayed(*self._facebook_container_button_locator)