зеркало из https://github.com/mozilla/bedrock.git
[fix bug 1364988] Batm page variations
This commit is contained in:
Родитель
d91a98f487
Коммит
4beabe41c5
|
@ -0,0 +1,13 @@
|
|||
{# 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 google_play_button with context %}
|
||||
|
||||
{% extends "firefox/new/batm/scene1.html" %}
|
||||
|
||||
{% block main_header_copy %}
|
||||
<p id="main-header-copy" data-experience="batmfree">
|
||||
{{_('Break free with Firefox, for people not profit.')}}
|
||||
</p>
|
||||
{% endblock %}
|
|
@ -0,0 +1,13 @@
|
|||
{# 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 google_play_button with context %}
|
||||
|
||||
{% extends "firefox/new/batm/scene1.html" %}
|
||||
|
||||
{% block main_header_copy %}
|
||||
<p id="main-header-copy" data-experience="batmnimble">
|
||||
{{_('Get Firefox, faster to put you first.')}}
|
||||
</p>
|
||||
{% endblock %}
|
|
@ -0,0 +1,13 @@
|
|||
{# 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 google_play_button with context %}
|
||||
|
||||
{% extends "firefox/new/batm/scene1.html" %}
|
||||
|
||||
{% block main_header_copy %}
|
||||
<p id="main-header-copy" data-experience="batmprivate">
|
||||
{{_('Get Firefox, the only browser built for people, not profit.')}}
|
||||
</p>
|
||||
{% endblock %}
|
|
@ -0,0 +1,13 @@
|
|||
{# 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 google_play_button with context %}
|
||||
|
||||
{% extends "firefox/new/batm/scene1.html" %}
|
||||
|
||||
{% block main_header_copy %}
|
||||
<p id="main-header-copy" data-experience="batmresist">
|
||||
{{_('Get nonprofit Firefox and resist Internet empires.')}}
|
||||
</p>
|
||||
{% endblock %}
|
|
@ -6,19 +6,13 @@
|
|||
|
||||
{% extends "firefox/new/batm/base.html" %}
|
||||
|
||||
{% block optimizely %}
|
||||
{% if switch('firefox-new-optimizely', ['en-US']) %}
|
||||
{% include 'includes/optimizely.html' %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body_class %}scene-1{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<main role="main">
|
||||
<header>
|
||||
<h1>{{_('Browse against the machine')}}</h1>
|
||||
<p>{{_('Get Firefox, the only browser built for people, not profit.')}}</p>
|
||||
{% block main_header_copy %}{% endblock %}
|
||||
</header>
|
||||
<div class="download-cta">
|
||||
{{ download_firefox(alt_copy=_('Download Firefox'), locale_in_transition=True, button_color='button-hollow') }}
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
{% block body_id %}firefox{% endblock %}
|
||||
{% block body_class %}{% endblock %}
|
||||
|
||||
{% block string_data %}
|
||||
data-pixels="{% for pixel in settings.TRACKING_PIXELS %}{{ pixel }}{% if not loop.last %}::{% endif %}{% endfor %}"
|
||||
{% endblock %}
|
||||
|
||||
{% block site_header %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
|
|
@ -453,20 +453,56 @@ class TestFirefoxNew(TestCase):
|
|||
views.new(req)
|
||||
render_mock.assert_called_once_with(req, 'firefox/new/fx-lifestyle/its-your-web/scene2.html')
|
||||
|
||||
# browse against the machine bug 1363802
|
||||
# browse against the machine bug 1363802, 1364988.
|
||||
|
||||
def test_batm_scene_1(self, render_mock):
|
||||
def test_batmfree_scene_1(self, render_mock):
|
||||
req = RequestFactory().get('/firefox/new/?xv=batmfree')
|
||||
req.locale = 'en-US'
|
||||
views.new(req)
|
||||
render_mock.assert_called_once_with(req, 'firefox/new/batm/scene1.html')
|
||||
render_mock.assert_called_once_with(req, 'firefox/new/batm/free.html')
|
||||
|
||||
def test_batm_scene_2(self, render_mock):
|
||||
def test_batmfree_scene_2(self, render_mock):
|
||||
req = RequestFactory().get('/firefox/new/?scene=2&xv=batmfree')
|
||||
req.locale = 'en-US'
|
||||
views.new(req)
|
||||
render_mock.assert_called_once_with(req, 'firefox/new/batm/scene2.html')
|
||||
|
||||
def test_batmprivate_scene_1(self, render_mock):
|
||||
req = RequestFactory().get('/firefox/new/?xv=batmprivate')
|
||||
req.locale = 'en-US'
|
||||
views.new(req)
|
||||
render_mock.assert_called_once_with(req, 'firefox/new/batm/private.html')
|
||||
|
||||
def test_batmprivate_scene_2(self, render_mock):
|
||||
req = RequestFactory().get('/firefox/new/?scene=2&xv=batmprivate')
|
||||
req.locale = 'en-US'
|
||||
views.new(req)
|
||||
render_mock.assert_called_once_with(req, 'firefox/new/batm/scene2.html')
|
||||
|
||||
def test_batmnimble_scene_1(self, render_mock):
|
||||
req = RequestFactory().get('/firefox/new/?xv=batmnimble')
|
||||
req.locale = 'en-US'
|
||||
views.new(req)
|
||||
render_mock.assert_called_once_with(req, 'firefox/new/batm/nimble.html')
|
||||
|
||||
def test_batmnimble_scene_2(self, render_mock):
|
||||
req = RequestFactory().get('/firefox/new/?scene=2&xv=batmnimble')
|
||||
req.locale = 'en-US'
|
||||
views.new(req)
|
||||
render_mock.assert_called_once_with(req, 'firefox/new/batm/scene2.html')
|
||||
|
||||
def test_batmresist_scene_1(self, render_mock):
|
||||
req = RequestFactory().get('/firefox/new/?xv=batmresist')
|
||||
req.locale = 'en-US'
|
||||
views.new(req)
|
||||
render_mock.assert_called_once_with(req, 'firefox/new/batm/resist.html')
|
||||
|
||||
def test_batmresist_scene_2(self, render_mock):
|
||||
req = RequestFactory().get('/firefox/new/?scene=2&xv=batmresist')
|
||||
req.locale = 'en-US'
|
||||
views.new(req)
|
||||
render_mock.assert_called_once_with(req, 'firefox/new/batm/scene2.html')
|
||||
|
||||
# onboarding experiment bug 1333435
|
||||
|
||||
def test_onboarding_f_98_scene_1_template(self, render_mock):
|
||||
|
|
|
@ -515,7 +515,7 @@ def new(request):
|
|||
template = 'firefox/new/fx-lifestyle/you-do-you/scene2.html'
|
||||
elif experience == 'itsyourweb':
|
||||
template = 'firefox/new/fx-lifestyle/its-your-web/scene2.html'
|
||||
elif experience == 'batmfree':
|
||||
elif experience in ['batmfree', 'batmprivate', 'batmnimble', 'batmresist']:
|
||||
template = 'firefox/new/batm/scene2.html'
|
||||
else:
|
||||
template = 'firefox/new/scene2.html'
|
||||
|
@ -545,7 +545,13 @@ def new(request):
|
|||
elif experience == 'itsyourweb':
|
||||
template = 'firefox/new/fx-lifestyle/its-your-web/scene1.html'
|
||||
elif experience == 'batmfree':
|
||||
template = 'firefox/new/batm/scene1.html'
|
||||
template = 'firefox/new/batm/free.html'
|
||||
elif experience == 'batmprivate':
|
||||
template = 'firefox/new/batm/private.html'
|
||||
elif experience == 'batmnimble':
|
||||
template = 'firefox/new/batm/nimble.html'
|
||||
elif experience == 'batmresist':
|
||||
template = 'firefox/new/batm/resist.html'
|
||||
else:
|
||||
template = 'firefox/new/scene1.html'
|
||||
else:
|
||||
|
|
|
@ -1391,7 +1391,6 @@ PIPELINE_JS = {
|
|||
},
|
||||
'firefox_new_scene1_batm': {
|
||||
'source_filenames': (
|
||||
'js/base/mozilla-modal.js',
|
||||
'js/firefox/new/scene1-batm.js',
|
||||
),
|
||||
'output_filename': 'js/firefox_new_scene1_batm-bundle.js',
|
||||
|
|
|
@ -5,10 +5,12 @@
|
|||
(function($) {
|
||||
'use strict';
|
||||
|
||||
var exp = $('#main-header-copy').data('experience');
|
||||
|
||||
$('.download-link').each(function(i, link) {
|
||||
if (link.href.indexOf('scene=2') > -1) {
|
||||
if (exp && link.href.indexOf('scene=2') > -1) {
|
||||
// specify v=1 template for scene 2
|
||||
link.href = link.href.replace('scene=2', 'scene=2&xv=batmfree');
|
||||
link.href = link.href.replace('scene=2', 'scene=2&xv=' + exp);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче