Skip to content

Commit

Permalink
add pencil banner
Browse files Browse the repository at this point in the history
  • Loading branch information
reemhamz committed Sep 17, 2024
1 parent c7bf500 commit 3cce76b
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#}

{% if switch('m24-navigation-and-footer') and LANG.startswith('en-') %}
{% include 'includes/protocol/navigation/pencil-banner.html' %}
{% include 'includes/protocol/navigation/navigation-refresh.html' %}
{% else %}
{# Bug 1438302 Avoid duplicate content for en-CA and en-GB pages. #}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{#
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/.
#}

{% block page_css %}
{{ css_bundle('m24-pencil-banner') }}
{% endblock %}

<aside class="m24-pencil-banner c-banner">
<div class="m24-pencil-banner-copy">
{% set donate_url = 'href="https://foundation.mozilla.org/en/?form=donate-today"' %}

{% set download_url = 'href="https://www.mozilla.org/en-US/firefox/download/thanks/"' %}

<p class="c-banner-mofo-donate">{{ ftl('m24-pencil-banner-support-ethical', donate=donate_url) }}</p>

<p class="c-banner-firefox-download">{{ ftl('m24-pencil-banner-download-firefox', download=download_url) }}</p>
</div>
</aside>
1 change: 1 addition & 0 deletions bedrock/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ def _put_default_lang_first(langs, default_lang=LANGUAGE_CODE):
"navigation_v2",
"navigation_refresh",
"newsletter_form",
"m24-pencil-banner",
"send_to_device",
"sub_navigation",
"ui",
Expand Down
11 changes: 11 additions & 0 deletions l10n/en/m24-pencil-banner.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# 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/.

# Variables:
# $donate (url) - link to https://foundation.mozilla.org/en/?form=donate-today
m24-pencil-banner-support-ethical = Support ethical AI and internet privacy — <a { $donate }>donate today!</a>
# Variables:
# $download (url) - link to https://www.mozilla.org/en-US/firefox/download/thanks/
m24-pencil-banner-download-firefox = Placeholder text to download firefox <a { $download }>download { -brand-name-firefox }</a>
48 changes: 48 additions & 0 deletions media/css/m24/pencil-banner.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// 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/.

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

@import 'vars/color';
@import 'vars/fonts';
@import 'vars/grid';
@import 'vars/spacing';
@import 'vars/text';

.m24-pencil-banner {
background-color: $m24-color-light-green;
border-bottom: 2px solid $m24-color-green;
padding: $spacer-sm;

.m24-pencil-banner-copy {
display: flex;
align-items: center;
justify-content: center;

p {
color: $m24-color-black;
margin-bottom: 0;
text-align: center;
}

.c-banner-mofo-donate {
display: none;
}

.c-banner-firefox-download {
display: block;
}

.is-firefox & {
.c-banner-mofo-donate {
display: block;
}

.c-banner-firefox-download {
display: none;
}
}

}
}
6 changes: 6 additions & 0 deletions media/static-bundles.json
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,12 @@
],
"name": "m24-navigation-and-footer"
},
{
"files": [
"css/m24/pencil-banner.scss"
],
"name": "m24-pencil-banner"
},
{
"files": [
"css/legal/legal.scss"
Expand Down

0 comments on commit 3cce76b

Please sign in to comment.