Merge pull request #4832 from jpetto/bug-1361181-redirect-firefox-products-to-firefox-en-us

[fix bug 1361181] Redirect en-US/firefox/products/ to /firefox/
This commit is contained in:
Jon Petto 2017-05-17 08:10:33 -05:00 коммит произвёл GitHub
Родитель d8ecee2595 855848fd21
Коммит 4e03d1b8d5
17 изменённых файлов: 10 добавлений и 512 удалений

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

@ -523,4 +523,7 @@ redirectpatterns = (
# Bug 1355189
redirect(r'^en-US/firefox/desktop/fast/?', '/en-US/firefox/features/fast/',
locale_prefix=False),
# Bug 1361181
redirect(r'^en-US/firefox/products/?', '/en-US/firefox/', locale_prefix=False),
)

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

@ -1,162 +0,0 @@
{# 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.html" import fxfamilynav with context %}
{% extends "firefox/base-resp.html" %}
{% block experiments %}
{% if switch('experiment-firefox-family', ['en-US']) %}
{% javascript 'experiment_firefox_family' %}
{% endif %}
{% endblock %}
{% block page_title_prefix %}{% endblock %}
{% block page_title %}{{_('Free Web Browser for Android, iOS, Desktop | Firefox')}}{% endblock %}
{% block page_desc %}{{_('Millions of people around the world trust Firefox Web browsers on Android, iOS and desktop computers. Fast. Private. Download now!')}}{% endblock %}
{% block page_css %}
{% stylesheet 'firefox_family_index_b' %}
{% endblock %}
{% block body_id %}firefox{% endblock %}
{% block body_class %}{% endblock %}
{% block site_header %}{% endblock %}
{% block site_header_unwrapped %}
{% call fxfamilynav('firefox') %}
{{ download_firefox(dom_id="sticky-download-desktop", alt_copy=_('Download')) }}
{% endcall %}
{% endblock %}
{% block content %}
<section class="content-section" id="intro">
<div class="content">
<h2>
{{ _('Firefox Web Browser: <br>Fast. Private. Safe.') }}
</h2>
<p>
{% trans %}
Firefox is faster, more private, and always independent. <br>Available on
desktop and mobile.
{% endtrans %}
</p>
{{ download_firefox(dom_id="download-firefox") }}
</div>
</section>
<section class="content-section" id="fast">
<div class="content">
<div class="copy">
<h3>{{ _('Browse faster with Firefox') }}</h3>
<p>
{% trans url1=url('mozorg.home'), url2='https://blog.mozilla.org/firefox/tag/fastest/' %}
Firefox is faster than ever before, thanks to a new multi-process
architecture that improves browser speed and page-load time.
<a href="{{ url1 }}">Mozilla</a>, the non-profit that builds Firefox,
invented a new programming language to
<a rel="external" href="{{ url2 }}">make Firefox faster</a>. Our rapid
browser update schedule means Firefox loads faster and is more stable
every time you use it.
{% endtrans %}
</p>
</div>
</div>
</section>
<section class="content-section" id="private-browsing">
<div class="content">
<div class="copy">
<h3>{{ _('Get Firefox for Private Browsing') }}</h3>
<p>
{% trans url1=url('firefox.private-browsing'),
url2='https://addons.mozilla.org/firefox/collections/mozilla/privacy/' %}
What does your browser history say about you? Who has access to your browser
history? Plenty of browsers offer an incognito mode, but only Firefox offers
advanced tracking protection: Just
<a href="{{ url1 }}">open a private browsing window</a> and enjoy safe
browsing again. Enhance your private browsing experience with dozens of
<a href="{{ url2 }}">privacy add-ons</a> — for ad blocking, private
search, VPN and more.
{% endtrans %}
</p>
</div>
</div>
</section>
<section class="content-section" id="better">
<div class="content">
<div class="copy">
<h3>{{ _('Choose Firefox, A Better Browser') }}</h3>
<p>
{% trans url1=url('mozorg.home'), url2=url('firefox.new') %}
Most browsers are designed to limit your choices and protect a corporate
agenda, but not Firefox. Firefox is the only independent web browser,
proudly <a href="{{ url1 }}">built by a non-profit</a> on a mission to
make the best web browser in the universe. Firefox is a better browser:
free from corporate agendas, free from bottom-line calculations, and
<a href="{{ url2 }}">free to download now</a>.
{% endtrans %}
</p>
</div>
</div>
</section>
<section class="content-section" id="everywhere">
<div class="content">
<div class="copy">
<h3>{{ _('Use Firefox Everywhere') }}</h3>
<p>
{% trans url1=url('firefox.ios'), url2=url('firefox.desktop.index'),
url3=url('firefox.android.index'), url4=url('firefox.all'),
url5=url('firefox.sync') %}
Looking for the best browser for desktop and mobile? Firefox is
available on <a href="{{ url1 }}">iOS</a>,
<a href="{{ url2 }}">Windows, macOS, Linux</a>, and
<a href="{{ url3 }}">Android</a>. Need a better browser in your
language? <a href="{{ url4 }}">Firefox is available in 90 languages</a>.
With Firefox Sync, you can install Firefox everywhere and
<a href="{{ url5 }}">share bookmarks across devices</a>.
{% endtrans %}
</p>
</div>
</div>
</section>
<section class="content-section" id="today">
<div class="content">
<h3>{{ _('Get Firefox today.') }}</h3>
{{ download_firefox(dom_id="download-firefox-today") }}
</div>
</section>
{% endblock %}
{% block email_form %}
<aside id="newsletter-subscribe">
<div class="content container">
{# L10n: Line break for visual formatting. #}
{{ email_newsletter_form(title=_('Keep up with<br> all things Firefox.'), button_class='button-light') }}
</div>
</aside>
{% endblock %}
{% block site_footer %}
{% with footer_class='dark' %}
{% include 'includes/site-footer-new.html' %}
{% endwith %}
{% endblock %}
{% block js %}
{% javascript 'firefox_family_index_b' %}
{% endblock %}

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

@ -66,14 +66,12 @@ urlpatterns = (
url(r'^firefox/ios/testflight', views.ios_testflight, name='firefox.ios.testflight'),
page('firefox/mobile-download', 'firefox/mobile-download.html'),
page('firefox/mobile-download/desktop', 'firefox/mobile-download-desktop.html'),
url('^firefox/products/$',
VariationTemplateView.as_view(template_name='firefox/family/index.html',
template_name_variations=['b'],
variation_locales=['en-US']),
name='firefox.family.index'),
page('firefox/private-browsing', 'firefox/private-browsing.html', alt_canonical_paths={
'en-US': '/firefox/features/private-browsing/',
}),
page('firefox/products', 'firefox/family/index.html', alt_canonical_paths={
'en-US': '/firefox/',
}),
url('^firefox/send-to-device-post/$', views.send_to_device_ajax,
name='firefox.send-to-device-post'),
url(r'^firefox/sync/$',

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

@ -358,14 +358,6 @@ PIPELINE_CSS = {
),
'output_filename': 'css/firefox_family_index-bundle.css',
},
'firefox_family_index_b': {
'source_filenames': (
'css/newsletter/fxnewsletter-subscribe.less',
'css/firefox/family-nav.less',
'css/firefox/family/index-b.less',
),
'output_filename': 'css/firefox_family_index_b-bundle.css',
},
'firefox_faq': {
'source_filenames': (
'css/base/menu-resp.less',
@ -1437,21 +1429,6 @@ PIPELINE_JS = {
),
'output_filename': 'js/firefox_family_index-bundle.js',
},
'firefox_family_index_b': {
'source_filenames': (
'js/libs/jquery.waypoints.min.js',
'js/libs/jquery.waypoints-sticky.min.js',
'js/firefox/family-nav.js',
),
'output_filename': 'js/firefox_family_index_b-bundle.js',
},
'experiment_firefox_family': {
'source_filenames': (
'js/base/mozilla-traffic-cop.js',
'js/firefox/experiment-firefox-family.js',
),
'output_filename': 'js/experiment_firefox_family-bundle.js',
},
'firefox_faq': {
'source_filenames': (
'js/base/mozilla-accordion.js',

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

@ -1,305 +0,0 @@
// 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 '../../sandstone/lib.less';
@blue: #0a99d5;
@grey: #EFEFEF;
// generates a < tablet media query for all sections (except intro)
.common-mobile-props(@padding: 250px) {
@media only screen and (max-width: @breakTablet) {
background-position: bottom 20px center;
min-height: 0;
padding-bottom: @padding;
.copy {
float: none;
width: auto;
}
}
}
#outer-wrapper {
background: @grey;
}
#wrapper {
background: #fff;
padding-bottom: 0;
width: auto;
// add icon to download buttons *not* in family nav
.download-button .download-title:after {
background: url('/media/img/firefox/family/index-b/download-arrow.svg') center right no-repeat;
content: '';
display: inline-block;
height: 20px;
margin: 0 0 -3px 12px;
width: 20px;
}
}
#tabzilla:before {
background-color: @blue;
}
.fxfamilynav-header {
// Safari 5.1+, Chrome 10+
background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0)),
-webkit-linear-gradient(@blue, @blue);
background-image: -o-linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0)),
-o-linear-gradient(@blue, @blue);
// the standard
background-image: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0)),
linear-gradient(@blue, @blue);
}
.content-section {
color: #484848;
padding: 100px 0;
@media only screen and (max-width: @breakTablet) {
padding: 50px 0;
text-align: center;
}
}
.content {
.clearfix();
background-repeat: no-repeat;
padding-left: 20px;
padding-right: 20px;
margin: 0 auto;
width: @widthDesktop - 40px;
a {
color: @blue;
font-weight: bold;
}
@media only screen and (max-width: @breakDesktop) {
width: @widthTablet - 40px;
}
@media only screen and (max-width: @breakTablet) {
background-position: bottom 20px center;
width: @widthMobileLandscape - 40px;
}
@media only screen and (max-width: @breakMobileLandscape) {
padding-left: 10px;
padding-right: 10px;
width: @widthMobile - 20px;
}
}
h2 {
.font-size(52px);
line-height: 1.3;
margin-bottom: 40px;
text-shadow: none;
@media only screen and (max-width: @breakDesktop) {
.font-size(46px);
margin-bottom: 34px;
}
@media only screen and (max-width: @breakTablet) {
.font-size(38px);
margin-bottom: 30px;
}
@media only screen and (max-width: @breakMobileLandscape) {
.font-size(28px);
}
}
h3 {
.font-size(36px);
line-height: 1.4;
margin-bottom: 40px;
text-shadow: none;
@media only screen and (max-width: @breakDesktop) {
.font-size(30px);
line-height: 1.3;
margin-bottom: 25px;
}
@media only screen and (max-width: @breakMobileLandscape) {
.font-size(24px);
}
}
.copy {
width: 500px;
p {
.font-size(18px);
.open-sans-light();
line-height: 40px;
}
@media only screen and (max-width: @breakDesktop) {
width: 380px;
p {
.font-size(16px);
line-height: 34px;
}
}
@media only screen and (max-width: @breakMobileLandscape) {
width: auto;
p {
.font-size(14px);
line-height: 30px;
}
}
}
.fx-privacy-link {
a:active,
a:focus,
a:hover,
a:link,
a:visited {
color: #9b9b9b;
}
}
#intro {
&.content-section {
padding-top: 60px;
}
.content {
.at2x('/media/img/firefox/family/index-b/intro.png', 632px, 550px);
background-position: bottom center;
padding-bottom: 610px;
text-align: center;
}
p {
.font-size(24px);
font-weight: bold;
line-height: 38px;
margin-bottom: 50px;
}
@media only screen and (max-width: @breakDesktop) {
p {
.font-size(22px);
}
}
@media only screen and (max-width: @breakTablet) {
.content {
.background-size(400px 348px);
padding-bottom: 390px;
}
p {
.font-size(18px);
line-height: 1.6;
margin-bottom: 40px;
br {
display: none;
}
}
}
@media only screen and (max-width: @breakMobileLandscape) {
.content {
background-image: url('/media/img/firefox/family/index-b/intro.png');
background-size: 300px 261px;
padding-bottom: 320px;
}
p {
.font-size(16px);
}
}
}
#fast .content {
.at2x('/media/img/firefox/template/logo-jumbo.png', 256px, 266px);
.common-mobile-props(316px);
background-position: top right 20px;
min-height: 266px;
}
#private-browsing .content {
.at2x('/media/img/firefox/family/index-b/private-browsing.png', 400px, 243px);
.common-mobile-props(232px);
background-position: top left 20px;
min-height: 243px;
.copy {
float: right;
}
@media only screen and (max-width: @breakDesktop) {
.background-size(300px 182px);
}
}
#better .content {
.at2x('/media/img/firefox/family/index-b/better.png', 400px, 317px);
.common-mobile-props(288px);
background-position: top right 20px;
min-height: 314px;
@media only screen and (max-width: @breakDesktop) {
.background-size(300px 238px);
min-height: 238px;
}
}
#everywhere .content {
.at2x('/media/img/firefox/family/index-b/everywhere.png', 400px, 234px);
.common-mobile-props(226px);
background-position: top left 20px;
min-height: 234px;
.copy {
float: right;
}
@media only screen and (max-width: @breakDesktop) {
.background-size(300px 176px);
}
}
#today.content-section {
padding: 46px 0;
h3 {
float: left;
}
.download-button {
float: right;
}
@media only screen and (max-width: @breakTablet) {
h3,
.download-button {
float: none;
}
}
}
#fast,
#better,
#today {
background: @grey;
}
#colophon.dark {
background: #666;
}

Двоичный файл не отображается.

До

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

Двоичные данные
media/img/firefox/family/index-b/better.png

Двоичный файл не отображается.

До

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

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

@ -1 +0,0 @@
<svg width="22" height="21" viewBox="0 0 22 21" xmlns="http://www.w3.org/2000/svg"><g stroke="#FFF" stroke-width="2" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"><path d="M1 20h20M6.5 10.5l4.528 4.528M15.5 10.5l-4.528 4.528M11 1v13.533"/></g></svg>

До

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

Двоичный файл не отображается.

До

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

Двоичные данные
media/img/firefox/family/index-b/everywhere.png

Двоичный файл не отображается.

До

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

Двоичный файл не отображается.

До

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

Двоичные данные
media/img/firefox/family/index-b/intro.png

Двоичный файл не отображается.

До

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

Двоичный файл не отображается.

До

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

Двоичный файл не отображается.

До

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

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

@ -1,14 +0,0 @@
(function() {
'use strict';
var mcnulty = new Mozilla.TrafficCop({
id: 'experiment-firefox-family-spring-2017',
cookieExpires: 720, // 1 month
variations: {
'v=a': 50, // double-control
'v=b': 50 // actual variation
}
});
mcnulty.init();
})();

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

@ -8,10 +8,9 @@ from pages.firefox.products import ProductsPage
@pytest.mark.skip_if_firefox(reason='Download bar is not shown for up-to-date Firefox browsers.')
@pytest.mark.skipif(reason='https://bugzilla.mozilla.org/show_bug.cgi?id=1348146')
@pytest.mark.nondestructive
def test_download_bar_displayed(base_url, selenium):
page = ProductsPage(selenium, base_url).open()
page = ProductsPage(selenium, base_url, locale='de').open()
download_bar = page.download_bar
assert download_bar.is_download_firefox_message_displayed
download_bar.close()

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

@ -1165,4 +1165,7 @@ URLS = flatten((
# Bug 1355189
url_test('/en-US/firefox/desktop/fast/', '/en-US/firefox/features/fast/'),
# Bug 1361181
url_test('/en-US/firefox/products/', '/en-US/firefox/'),
))