Skip to content

Commit

Permalink
Direct Win 8.1 / macOs 10.14 users to ESR for FF release channel (Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgibson committed Jul 10, 2023
1 parent 2750b1b commit 5f1d032
Show file tree
Hide file tree
Showing 24 changed files with 542 additions and 224 deletions.
2 changes: 1 addition & 1 deletion bedrock/firefox/templates/firefox/home/index-master.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ <h5 class="mzp-c-menu-list-title">{{ ftl('firefox-home-download-the-browser') }}
<li class="mzp-c-menu-list-item menu-desktop"><a href="{{ url('firefox.new') }}" data-cta-type="link" data-cta-text="Firefox Desktop">{{ ftl('firefox-home-desktop') }}</a></li>
<![endif]-->
<!--[if !IE]><!-->
{# Download link should be locale neutral see issue 7982 #}
{# Download link hidden from legacy IE browsers see issue 13317 #}
<li class="mzp-c-menu-list-item menu-desktop"><a href="/firefox/download/thanks/" data-link-type="Desktop" data-download-os="Desktop" data-download-version="standard" data-link-name="Trackers">{{ ftl('firefox-home-desktop') }}</a></li>
<!--<![endif]-->
<li class="mzp-c-menu-list-item menu-android"><a href="{{ firefox_adjust_url('android', 'firefox_home') }}" rel="external noopener" data-link-type="download" data-display-name="Android" data-download-version="android" data-download-os="Android" data-link-name="Trackers"> {{ ftl('firefox-home-android') }}</a></li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
#}

<div id="{{ id }}" class="mzp-c-button-download-container c-button-download-thanks">
<!--[if !IE]><!-->
<a href="{{ transition_url }}"
class="download-link mzp-c-button mzp-t-product {% if button_class %}{{ button_class }}{% else %}mzp-t-xl{% endif %}"
class="download-link c-button-download-thanks-link mzp-c-button mzp-t-product {% if button_class %}{{ button_class }}{% else %}mzp-t-xl{% endif %}"
data-direct-link="{{ download_link_direct }}"
data-link-type="download"
{% if download_location %}data-download-location="{{ download_location }}"{% endif %}>
Expand All @@ -17,21 +16,9 @@
{{ ftl('download-button-download-firefox') }}
{% endif %}
</a>
<!--<![endif]-->

{# legacy IE visitors get a direct download link instead of going to /thanks. #}
<!--[if IE]>
<a href="{{ download_link_direct|safe }}"
class="download-link mzp-c-button mzp-t-product {% if button_class %}{{ button_class }}{% else %}mzp-t-xl{% endif %}"
data-link-type="download" data-download-os="Desktop" data-display-name="Windows 32-bit" data-download-version="win"
{% if download_location %}data-download-location="{{ download_location }}"{% endif %}>
{% if alt_copy %}
{{ alt_copy }}
{% else %}
{{ ftl('download-button-download-firefox') }}
{% endif %}
</a>
<![endif]-->
{# ESR download buttons to display on unsupported systems: issue 13317 #}
{% include 'firefox/includes/download-unsupported.html' %}

<small class="mzp-c-button-download-privacy-link">
<a href="{{ url('privacy.notices.firefox') }}">
Expand Down
41 changes: 2 additions & 39 deletions bedrock/firefox/templates/firefox/includes/download-button.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,45 +51,8 @@
{{ alt_buttons(builds) }}
</div>

{% if channel == 'beta' %}
{% set channel_name = 'Firefox Beta' %}
{% elif channel == 'alpha' %}
{% set channel_name = 'Firefox Developer Edition' %}
{% elif channel == 'nightly' %}
{% set channel_name = 'Firefox Nightly' %}
{% else %}
{% set channel_name = 'Firefox' %}
{% endif %}

<div class="fx-unsupported-message win" data-nosnippet="true">
<p><strong>{{ ftl('download-button-unsupported-platform', channel_name=channel_name, help_url='https://support.mozilla.org/kb/firefox-users-windows-7-8-and-81-moving-extended-support', os_version='Windows 8.1') }}</strong></p>
<p>{{ ftl('download-button-please-download-esr') }}</p>
<ul class="download-platform-list">
<li>
<a class="mzp-c-button mzp-t-product download-link" href="https://download.mozilla.org/?product=firefox-esr-next-latest-ssl&os=win64&lang={{ LANG }}" data-link-type="download" data-download-os="Desktop" data-download-version="win64" data-display-name="Firefox Extended Support Release">
{{ ftl('download-firefox-esr-64') }}
</a>
</li>
<li>
<a class="mzp-c-button mzp-t-product download-link" href="https://download.mozilla.org/?product=firefox-esr-next-latest-ssl&os=win&lang={{ LANG }}" data-link-type="download" data-download-os="Desktop" data-download-version="win" data-display-name="Firefox Extended Support Release">
{{ ftl('download-firefox-esr-32') }}
</a>
</li>
</ul>
</div>

<div class="fx-unsupported-message mac" data-nosnippet="true">
<p><strong>{{ ftl('download-button-unsupported-platform', channel_name=channel_name, help_url='https://support.mozilla.org/kb/firefox-users-macos-1012-1013-1014-moving-to-extended-support', os_version='macOS 10.14') }}</strong></p>
<p>{{ ftl('download-button-please-download-esr') }}</p>

<ul class="download-platform-list">
<li>
<a class="mzp-c-button mzp-t-product download-link" href="https://download.mozilla.org/?product=firefox-esr-next-latest-ssl&os=osx&lang={{ LANG }}" data-link-type="download" data-download-os="Desktop" data-download-version="osx" data-display-name="Firefox Extended Support Release">
{{ ftl('download-firefox-esr') }}
</a>
</li>
</ul>
</div>
{# ESR download buttons to display on unsupported systems: issue 13317 #}
{% include 'firefox/includes/download-unsupported.html' %}
{% endif %}
<ul class="download-list">
{% for plat in builds %}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{#
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 channel == 'beta' %}
{% set channel_name = 'Firefox Beta' %}
{% elif channel == 'alpha' %}
{% set channel_name = 'Firefox Developer Edition' %}
{% elif channel == 'nightly' %}
{% set channel_name = 'Firefox Nightly' %}
{% else %}
{% set channel_name = 'Firefox' %}
{% endif %}

<div class="fx-unsupported-message win" data-nosnippet="true">
<p><strong>{{ ftl('download-button-unsupported-platform', channel_name=channel_name, help_url='https://support.mozilla.org/kb/firefox-users-windows-7-8-and-81-moving-extended-support', os_version='Windows 8.1') }}</strong></p>
<p>{{ ftl('download-button-please-download-esr') }}</p>
<div class="download-platform-list">
<p>
<a class="mzp-c-button mzp-t-product download-link os_win64" href="https://download.mozilla.org/?product=firefox-esr-next-latest-ssl&os=win64&lang={{ LANG }}" data-link-type="download" data-download-os="Desktop" data-download-version="win64" data-display-name="Firefox Extended Support Release">
{{ ftl('download-firefox-esr-64') }}
</a>
</p>
<p>
<a class="mzp-c-button mzp-t-product download-link os_win" href="https://download.mozilla.org/?product=firefox-esr-next-latest-ssl&os=win&lang={{ LANG }}" data-link-type="download" data-download-os="Desktop" data-download-version="win" data-display-name="Firefox Extended Support Release">
{{ ftl('download-firefox-esr-32') }}
</a>
</p>

<small class="fx-unsupported-message-all-link">
<a href="{{ url('firefox.all') }}#product-desktop-esr">
{{ ftl('download-a-different-build') }}
</a>
</small>
</div>
</div>

<div class="fx-unsupported-message mac" data-nosnippet="true">
<p><strong>{{ ftl('download-button-unsupported-platform', channel_name=channel_name, help_url='https://support.mozilla.org/kb/firefox-users-macos-1012-1013-1014-moving-to-extended-support', os_version='macOS 10.14') }}</strong></p>
<p>{{ ftl('download-button-please-download-esr') }}</p>

<div class="download-platform-list">
<a class="mzp-c-button mzp-t-product download-link" href="https://download.mozilla.org/?product=firefox-esr-next-latest-ssl&os=osx&lang={{ LANG }}" data-link-type="download" data-download-os="Desktop" data-download-version="osx" data-display-name="Firefox Extended Support Release">
{{ ftl('download-firefox-esr') }}
</a>
</div>
</div>
1 change: 1 addition & 0 deletions l10n/en/download_button.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,4 @@ download-button-please-download-esr = Please download { -brand-name-firefox-esr
download-firefox-esr = Download { -brand-name-firefox-esr }
download-firefox-esr-32 = Download { -brand-name-firefox-esr } 32-bit
download-firefox-esr-64 = Download { -brand-name-firefox-esr } 64-bit
download-a-different-build = Download a different build
10 changes: 10 additions & 0 deletions media/css/firefox/browsers-products.scss
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,16 @@ $url-download-link-hover: svg-url($download-link-hover);
}
}

// issue 13317
.fx-unsupported .cta-download[data-download-os="Desktop"]{
display: none;
}

// issue 13317
.fx-unsupported .menu-desktop {
display: none;
}

// * -------------------------------------------------------------------------- */
// Mobile download links, show app store links when user is on mobile

Expand Down
7 changes: 5 additions & 2 deletions media/css/firefox/challenge-the-default/_hero.scss
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,6 @@ $campaign-red: #ff6a75;
max-width: 80%;
}



h1 {
@include font-firefox;
@include font-size(36px);
Expand Down Expand Up @@ -231,4 +229,9 @@ $campaign-red: #ff6a75;
}
}
}

// issue 13317
.fx-unsupported-message {
@include bidi(((text-align, left, right),));
}
}
4 changes: 0 additions & 4 deletions media/css/firefox/developer/includes/intro.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
margin-left: auto;
margin-right: auto;
}

.fx-unsupported-message {
text-align: center;
}
}

.intro-title {
Expand Down
5 changes: 5 additions & 0 deletions media/css/firefox/home/master.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ $brand-theme: 'firefox';
color: $color-marketing-gray-50;
}
}

// issue 13317
.fx-unsupported & .menu-desktop {
display: none;
}
}

// ------------------------------------------------------------------------------
Expand Down
5 changes: 5 additions & 0 deletions media/css/firefox/new/basic/ie.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ $image-path: '/media/protocol/img';

@import '~@mozilla-protocol/core/protocol/css/includes/lib';
@import '../../../protocol/components/navigation-ie';
@import '../../../protocol/components/fx-unsupported-ie';

.fx-unsupported-message {
@include bidi(((text-align, left, right),));
}
24 changes: 24 additions & 0 deletions media/css/firefox/new/common/thanks-messaging.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@ $image-path: '/media/protocol/img';
.show-auto-download-notification {
display: block !important;
}

// issue 13317
&.fx-unsupported {
.show-mac,
.show-auto-download-notification {
display: none !important;
}

.show-unknown {
display: block !important;
}
}
}

&.windows {
Expand All @@ -44,6 +56,18 @@ $image-path: '/media/protocol/img';
display: block !important;
}
}

// issue 13317
&.fx-unsupported {
.show-windows,
.show-auto-download-notification {
display: none !important;
}

.show-unknown {
display: block !important;
}
}
}

&.linux {
Expand Down
13 changes: 7 additions & 6 deletions media/css/firefox/new/desktop/download.scss
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,10 @@ button.mzp-c-cta-link {
max-width: $content-xl + $layout-xl * 2;
}

.c-block-body > p {
margin-bottom: $v-grid-md;
}

[lang='ar'] & h2 {
@include font-size(40px);
}
Expand All @@ -627,8 +631,9 @@ button.mzp-c-cta-link {
margin-bottom: $v-grid-md;
}

p {
margin-bottom: $v-grid-md;
// issue 13317
.fx-unsupported-message {
@include bidi(((text-align, left, right),));
}
}

Expand Down Expand Up @@ -1194,10 +1199,6 @@ button.mzp-c-cta-link {
text-align: left;
}
}

p {
margin-bottom: 0;
}
}

// --------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions media/css/firefox/new/desktop/ie8.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ $image-path: '/media/protocol/img';

@import '~@mozilla-protocol/core/protocol/css/includes/lib';
@import '../../../protocol/components/navigation-ie';
@import '../../../protocol/components/fx-unsupported-ie';

$h-grid-lg: 80px;

Expand Down
1 change: 1 addition & 0 deletions media/css/firefox/new/desktop/ie9.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ $font-path: '/media/protocol/fonts';
$image-path: '/media/protocol/img';

@import '~@mozilla-protocol/core/protocol/css/includes/lib';
@import '../../../protocol/components/fx-unsupported-ie';

.c-menu-item .c-menu-item-desc {
display: none;
Expand Down
6 changes: 0 additions & 6 deletions media/css/firefox/releasenotes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ $image-path: '/media/protocol/img';
// * -------------------------------------------------------------------------- */
// Call out / page header


// Fx unsupported message issue #13317
.mzp-c-call-out .fx-unsupported-message {
text-align: center;
}

.mzp-c-call-out.mzp-t-product-firefox,
.mzp-c-call-out.mzp-t-product-beta {
background: $color-marketing-gray-20;
Expand Down
28 changes: 1 addition & 27 deletions media/css/protocol/components/_download-button-ie.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

@import '~@mozilla-protocol/core/protocol/css/includes/lib';
@import 'fx-unsupported-ie';

// download button and related containers
ul.download-list {
Expand Down Expand Up @@ -42,31 +43,4 @@ ul.download-list {
display: block !important;
}

// Hide pre-release Firefox download buttons on unsupported
// operating system versions (issue #13317)
.download-button-beta.download-button-desktop .download-list,
.download-button-alpha.download-button-desktop .download-list,
.download-button-nightly.download-button-desktop .download-list {
display: none !important;
}

.fx-unsupported-message {
@include bidi(((text-align, left, right),));
display: none !important;

.download-platform-list {
text-align: center;

li {
margin-bottom: $spacing-lg;
}
}
}

.download-button-beta .fx-unsupported-message.win,
.download-button-alpha .fx-unsupported-message.win,
.download-button-nightly .fx-unsupported-message.win {
display: block !important;
}

/* stylelint-enable */
Loading

0 comments on commit 5f1d032

Please sign in to comment.