Skip to content

Commit

Permalink
v2 - not working
Browse files Browse the repository at this point in the history
  • Loading branch information
stephaniehobson committed Apr 4, 2024
1 parent addbd1b commit 9087bca
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 262 deletions.
17 changes: 17 additions & 0 deletions bedrock/firefox/templates/firefox/all/download.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{#
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/all/base.html" %}

{% block main %}

{# Show download #}
<div>
<a href="{{ download_url }}" id="download-button-primary" class="mzp-c-button mzp-t-product" data-link-type="download" data-download-location="primary cta">
{{ ftl('download-button-download-now') }}
</a>
</div>

{% endblock %}
261 changes: 28 additions & 233 deletions bedrock/firefox/templates/firefox/all/installer.html
Original file line number Diff line number Diff line change
@@ -1,237 +1,32 @@
{#
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/base/base-protocol.html" %}

{% from "macros.html" import google_play_button, apple_app_store_button with context %}
{% set android_url = play_store_url('firefox', 'firefox-all') %}
{% set ios_url = app_store_url('firefox', 'firefox-all') %}

{%- block page_title -%}
{{ ftl('firefox-all-download-the-firefox') }}
{%- endblock -%}

{%- block page_desc -%}
{{ ftl('firefox-all-everyone-deserves-access') }}
{%- endblock -%}

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

{% block old_ie_styles %}
{{ super() }}
{{ css_bundle('firefox_all_unified_old_ie') }}
{% endblock %}

{% block site_header %}
{% with hide_nav_cta=True %}
{% include 'includes/protocol/navigation/navigation.html' %}
{% endwith %}
{% endblock %}

{% block content %}
<main>
<div class="mzp-l-content">
<div id="product-select-form" class="c-product-select-form" data-supported="true"{% if product %} data-current="{{ product.slug }}"{% endif %}>
<div class="c-intro">
<h1 class="c-intro-heading">{{ ftl('firefox-all-choose-which-firefox') }}</h1>
<p>{{ self.page_desc() }}</p>

{% if product %}
{% if product.slug == "desktop-release" %}
<div>
<ul>
<li><a href="{{ firefox_url('desktop', 'sysreq', 'release') }}">{{ ftl('firefox-all-check-the-system-requirements') }}</a></li>
<li><a href="{{ firefox_url('desktop', 'notes', 'release') }}">{{ ftl('firefox-all-release-notes') }}</a></li>
<li><a href="https://firefox-source-docs.mozilla.org/">{{ ftl('firefox-all-source-code') }}</a></li>
</ul>
</div>
{% elif product.slug == "desktop-beta" %}
<div>
<ul>
<li><a href="{{ firefox_url('desktop', 'sysreq', 'beta') }}">{{ ftl('firefox-all-check-the-system-requirements') }}</a></li>
<li><a href="{{ firefox_url('desktop', 'notes', 'beta') }}">{{ ftl('firefox-all-release-notes') }}</a></li>
<li><a href="https://firefox-source-docs.mozilla.org/">{{ ftl('firefox-all-source-code') }}</a></li>
</ul>
</div>
{% elif product.slug == "desktop-developer" %}
<div>
<ul>
<li><a href="{{ firefox_url('desktop', 'sysreq', 'alpha') }}">{{ ftl('firefox-all-check-the-system-requirements') }}</a></li>
<li><a href="{{ firefox_url('desktop', 'notes', 'alpha') }}">{{ ftl('firefox-all-release-notes') }}</a></li>
<li><a href="https://firefox-source-docs.mozilla.org/">{{ ftl('firefox-all-source-code') }}</a></li>
</ul>
</div>
{% elif product.slug == "desktop-nightly" %}
<div>
<ul>
<li><a href="{{ firefox_url('desktop', 'sysreq', 'nightly') }}">{{ ftl('firefox-all-check-the-system-requirements') }}</a></li>
<li><a href="{{ firefox_url('desktop', 'notes', 'nightly') }}">{{ ftl('firefox-all-release-notes') }}</a></li>
<li><a href="https://firefox-source-docs.mozilla.org/">{{ ftl('firefox-all-source-code') }}</a></li>
</ul>
</div>
{% elif product.slug == "desktop-esr" %}
<div>
<ul>
<li><a href="{{ firefox_url('desktop', 'sysreq', 'organizations') }}">{{ ftl('firefox-all-check-the-system-requirements') }}</a></li>
<li><a href="{{ firefox_url('desktop', 'notes', 'organizations') }}">{{ ftl('firefox-all-release-notes') }}</a></li>
<li><a href="https://firefox-source-docs.mozilla.org/">{{ ftl('firefox-all-source-code') }}</a></li>
</ul>
</div>
{% elif product.slug == "android-release" %}
<div>
<ul>
<li><a href="{{ firefox_url('android', 'sysreq', 'release') }}">{{ ftl('firefox-all-check-the-system-requirements') }}</a></li>
<li><a href="{{ firefox_url('android', 'notes', 'release') }}">{{ ftl('firefox-all-release-notes') }}</a></li>
</ul>
</div>
{% elif product.slug == "android-release" %}
<div>
<ul>
<li><a href="{{ firefox_url('ios', 'sysreq', 'release') }}">{{ ftl('firefox-all-check-the-system-requirements') }}</a></li>
<li><a href="{{ firefox_url('ios', 'notes', 'release') }}">{{ ftl('firefox-all-release-notes') }}</a></li>
</ul>
</div>
{% endif %}
{% endif %}
<div class="c-support-links">
<ul>
<li><a href="{{ url('privacy.notices.firefox') }}">{{ ftl('firefox-all-firefox-privacy-notice') }}</a></li>
<li><a href="https://support.mozilla.org/products/?utm_source=mozilla.org&utm_medium=referral&utm_campaign=need-help-link">{{ ftl('firefox-all-need-help') }}</a></li>
</ul>
</div>
</div>
<div class="c-selection-form">
{% if product %}
<p><a href="{{ url('firefox.drilldown') }}">&lt; start over</a></p>
{% endif %}

{# Choose product #}
<h2 class="mzp-c-sidemenu-title">{{ ftl('firefox-all-which-browser-would') }}
<a id="icon-browser-help" href="#browser-help" class="c-button-help" title="{{ ftl('firefox-all-learn-about-firefox') }}">
{{ ftl('firefox-all-get-help') }}
</a>
</h2>
{% if product %}
<p>{{ product and product.name }}</p>
{% else %}
<h3><img src="{{ static('protocol/img/icons/desktop.svg') }}"> Desktop</h3>
<ul class="c-product-list">
{% for p in products %}
{% if p.slug.startswith('desktop-release') %}
<li class="{{ p.slug }}"><a href="{{ url('firefox.drilldown_product', product_slug=p.slug) }}">{{ p.name }}</a></li>
{% endif %}
{% endfor %}
</ul>

<p>Or get a non-standard version</p>

<ul class="c-product-list">
{% for p in products %}
{% if p.slug.startswith('desktop') and not p.slug.endswith('release') %}
<li class="{{ p.slug }}"><a href="{{ url('firefox.drilldown_product', product_slug=p.slug) }}">{{ p.name }}</a></li>
{% endif %}
{% endfor %}
</ul>

<h3><img src="{{ static('protocol/img/icons/mobile.svg') }}"> Mobile</h3>
<ul class="c-product-list">
<li ><a href="">Firefox</a></li>
</ul>
<!-- <p>
{{ google_play_button(href=android_url, id='playStoreLink-primary') }} {{ apple_app_store_button(href=ios_url) }}
</p>
<p>
<a href="{{ url('firefox.browsers.mobile.get-app') }}" class="c-get-app" data-cta-type="link" data-cta-text="Send link" data-cta-position="step-one">{{ ftl('firefox-all-product-send-link') }}</a>
</p> -->

<p>Or get a non-standard version</p>

<ul class="c-product-list">
{% for p in products %}
{% if p.slug.startswith('android') and not p.slug.endswith('release')%}
<li class="{{ p.slug }}"><a href="{{ url('firefox.drilldown_product', product_slug=p.slug) }}">{{ p.name }}</a></li>
{% endif %}
{% endfor %}
</ul>
<ul class="c-product-list">
<li class=""><a href="{{ url('firefox.ios.testflight') }}">Firefox iOS TestFlight</a></li>
</ul>
{% endif %}

{# Choose platform #}
{% if product %}
<h2 class="mzp-c-sidemenu-title">{{ ftl('firefox-all-select-your-preferred-installer') }}
<a href="#installer-help" class="c-button-help icon-installer-help" title="{{ ftl('firefox-all-learn-about-installers')}}">
{{ ftl('firefox-all-get-help') }}
</a>
</h2>
{% if platform %}
<p>{{ platform_name }}</p>
{% else %}
<ul>
{% for platform, name in platforms %}
<li><a href="{{ url('firefox.drilldown_platform', product_slug=product.slug, platform=platform) }}">{{ name }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% endif %}

{# Choose language #}
{% if product and platform %}
<h2 class="mzp-c-sidemenu-title">{{ ftl('firefox-all-select-your-preferred-language') }}</h2>
{% if locale %}
<p>{{ locale_name }}</p>
{% else %}
<ul>
{% for locale, name in locales %}
<li><a href="{{ url('firefox.drilldown_locale', product_slug=product.slug, platform=platform, locale=locale) }}">{{ name }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% endif %}

{# Show download #}
{% if product and platform and locale %}
<div>
<a href="{{ download_url }}" id="download-button-primary" class="mzp-c-button mzp-t-product" data-link-type="download" data-download-location="primary cta">
{{ ftl('download-button-download-now') }}
</a>
</div>
{% endif %}
</div>
</div>
</div>
</main>

<div id="browser-help" class="c-help mzp-u-modal-content">
<ul>
<li>
<h2 class="c-help-title"><a href="{{ url('firefox.new') }}">Firefox</a></h2>
<p class="c-help-desc">{{ ftl('firefox-all-the-standard-firefox') }}</p>
</li>
<li>
<h2 class="c-help-title"><a href="{{ url('firefox.channel.desktop') }}#beta">Firefox <span>Beta</span></a></h2>
<p class="c-help-desc">{{ ftl('firefox-all-get-a-sneak-peek-at') }}</p>
</li>
<li>
<h2 class="c-help-title"><a href="{{ url('firefox.developer.index') }}">Firefox <span>Developer Edition</span></a></h2>
<p class="c-help-desc">{{ ftl('firefox-all-test-your-sites-against') }}</p>
</li>
<li>
<h2 class="c-help-title"><a href="{{ url('firefox.channel.desktop') }}#nightly">Firefox <span>Nightly</span></a></h2>
<p class="c-help-desc">{{ ftl('firefox-all-the-pre-alpha-version') }}</p>
</li>
<li>
<h2 class="c-help-title"><a href="{{ url('firefox.enterprise.index') }}">Firefox <span>Extended Support Release</span></a></h2>
<p class="c-help-desc">{{ ftl('firefox-all-count-on-stability-and') }}</p>
</li>
</ul>
</div>

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/all/base.html" %}

{% block main %}
{# Choose platform #}
{% if product %}
<h2 class="mzp-c-sidemenu-title">{{ ftl('firefox-all-select-your-preferred-installer') }}
<a href="#installer-help" class="c-button-help icon-installer-help" title="{{ ftl('firefox-all-learn-about-installers')}}">
{{ ftl('firefox-all-get-help') }}
</a>
</h2>
{% if platform %}
<p>{{ platform_name }}</p>
{% else %}
<ul>
{% for platform, name in platforms %}
<li><a href="{{ url('firefox.drilldown_platform', product_slug=product.slug, platform=platform) }}">{{ name }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% endif %}
{% endblock%}


{% block modal %}
<div id="installer-help" class="c-help mzp-u-modal-content">
<ul>
<li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,23 @@ <h2 class="mzp-c-sidemenu-title">{{ ftl('firefox-all-which-browser-would') }}
{% else %}
<h3><img src="{{ static('protocol/img/icons/desktop.svg') }}"> Desktop</h3>
<ul class="c-product-list">
{% for p in products %}
{% if p.slug.startswith('desktop-release') %}
<li class="{{ p.slug }}"><a href="{{ url('firefox.drilldown_product', product_slug=p.slug) }}">{{ p.name }}</a></li>
{% endif %}
{% endfor %}
<li class="release"><a href="{{ url('firefox.drilldown_product', product_slug='desktop-release') }}">Firefox</a></li>
</ul>
<div class="c-product-channels">
<p>Or get a non-standard version</p>

<p>Or get a non-standard version</p>

<ul class="c-product-list">
{% for p in products %}
{% if p.slug.startswith('desktop') and not p.slug.endswith('release') %}
<li class="{{ p.slug }}"><a href="{{ url('firefox.drilldown_product', product_slug=p.slug) }}">{{ p.name }}</a></li>
{% endif %}
{% endfor %}
</ul>
<ul class="c-product-list">
{% for p in products %}
{% if p.slug.startswith('desktop') and not p.slug.endswith('release') %}
<li class="{{ p.slug }}"><a href="{{ url('firefox.drilldown_product', product_slug=p.slug) }}">{{ p.name }}</a></li>
{% endif %}
{% endfor %}
</ul>
</div>

<h3><img src="{{ static('protocol/img/icons/mobile.svg') }}"> Mobile</h3>
<ul class="c-product-list">
<li ><a href="">Firefox</a></li>
<li class="release"><a href="{{ url('firefox.drilldown_product', product_slug='mobile-release') }}">Firefox</a></li>
</ul>
<!-- <p>
{{ google_play_button(href=android_url, id='playStoreLink-primary') }} {{ apple_app_store_button(href=ios_url) }}
Expand All @@ -45,18 +42,20 @@ <h3><img src="{{ static('protocol/img/icons/mobile.svg') }}"> Mobile</h3>
<a href="{{ url('firefox.browsers.mobile.get-app') }}" class="c-get-app" data-cta-type="link" data-cta-text="Send link" data-cta-position="step-one">{{ ftl('firefox-all-product-send-link') }}</a>
</p> -->

<p>Or get a non-standard version</p>
<div class="c-product-channels">
<p>Or get a non-standard version</p>

<ul class="c-product-list">
{% for p in products %}
{% if p.slug.startswith('android') and not p.slug.endswith('release')%}
<li class="{{ p.slug }}"><a href="{{ url('firefox.drilldown_product', product_slug=p.slug) }}">{{ p.name }}</a></li>
{% endif %}
{% endfor %}
</ul>
<ul class="c-product-list">
<li class=""><a href="{{ url('firefox.ios.testflight') }}">Firefox iOS TestFlight</a></li>
</ul>
<ul class="c-product-list">
{% for p in products %}
{% if p.slug.startswith('android') and not p.slug.endswith('release')%}
<li class="{{ p.slug }}"><a href="{{ url('firefox.drilldown_product', product_slug=p.slug) }}">{{ p.name }}</a></li>
{% endif %}
{% endfor %}
</ul>
<ul class="c-product-list">
<li class=""><a href="{{ url('firefox.ios.testflight') }}">Firefox iOS TestFlight</a></li>
</ul>
</div>
{% endif %}
</div>
{% endblock %}
Expand Down
4 changes: 2 additions & 2 deletions bedrock/firefox/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def firefox_drilldown(request, product_slug=None, platform=None, locale=None):
platform_name = None
locale_name = None
download_url = None
template_name = "firefox/all/products.html" # TKTK
template_name = "firefox/all/product.html" # TKTK

# The mobile products don't drill down, so short-circuit them here.
if product:
Expand Down Expand Up @@ -434,7 +434,7 @@ def firefox_drilldown(request, product_slug=None, platform=None, locale=None):
context.update(
products=[{"slug": k, "name": v["name"]} for k, v in product_map.items()],
)
template_name = "firefox/all/products.html"
template_name = "firefox/all/product.html"

return l10n_utils.render(request, template_name, context, ftl_files=ftl_files)

Expand Down
8 changes: 7 additions & 1 deletion media/css/firefox/all/all-unified.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,21 @@ $image-path: '/media/protocol/img';
margin-top: $spacing-sm;
}

.c-product-channels {
padding-left: $spacing-xl;
}

.c-product-list {
padding-left: 36px;

li {
li,
.release {
background: center left / contain no-repeat;
padding-left: 2em;
margin-bottom: 1em;
}

.release,
.desktop-release,
.desktop-esr {
background-image: url('#{$image-path}/logos/firefox/browser/logo.svg');
Expand Down

0 comments on commit 9087bca

Please sign in to comment.