From 75d3291a76f385ab20bfccc4ebad543868d1664a Mon Sep 17 00:00:00 2001 From: Reem H <42309026+reemhamz@users.noreply.github.com> Date: Tue, 16 Apr 2024 20:42:15 +1000 Subject: [PATCH] Add download CTA for `fr` and `de` /features/private/ page (#14440) * added download cta for french and german pages * updated CTA to be same as footer * JS fixes --- .../templates/firefox/features/private.html | 7 +++++++ media/css/firefox/features/article.scss | 5 +++++ .../js/firefox/features/features-article.es6.js | 17 ++++++++--------- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/bedrock/firefox/templates/firefox/features/private.html b/bedrock/firefox/templates/firefox/features/private.html index 2ffd1e4fe81..d418dc30a80 100644 --- a/bedrock/firefox/templates/firefox/features/private.html +++ b/bedrock/firefox/templates/firefox/features/private.html @@ -16,6 +16,13 @@

{{ ftl('features-private-firefox-also-protects-your', url='https://support.mozilla.org/kb/enhanced-tracking-protection-firefox-desktop?utm_source=www.mozilla.org&utm_medium=referral&utm_campaign=firefox-features') }}

{{ ftl('features-private-sidenote-we-are-not-big-tech') }}

+{% if LANG in ['fr', 'de'] %} +
+

{{ ftl('features-shared-footer-cta-title') }}

+ {{ download_firefox_thanks(alt_copy=ftl('download-button-download-firefox'), dom_id='features-midpage-download', button_class='mzp-t-product mzp-t-lg', download_location='primary') }} +
+{% endif %} +

{{ ftl('features-private-what-information-does-firefox') }}

{{ ftl('features-private-mozilla-the-maker-of-firefox', url=url('firefox.privacy.index')) }}

{{ ftl('features-private-read-firefoxs-privacy-notice', url=url('privacy.notices.firefox')) }}

diff --git a/media/css/firefox/features/article.scss b/media/css/firefox/features/article.scss index fe87bfa3fd7..3d196aaeda8 100644 --- a/media/css/firefox/features/article.scss +++ b/media/css/firefox/features/article.scss @@ -87,3 +87,8 @@ $image-path: '/media/protocol/img'; } } } + +.c-firefox-midpage-cta { + text-align: center; + margin-top: $spacing-2xl; +} diff --git a/media/js/firefox/features/features-article.es6.js b/media/js/firefox/features/features-article.es6.js index de5925f0ff2..dcb77d58c1c 100644 --- a/media/js/firefox/features/features-article.es6.js +++ b/media/js/firefox/features/features-article.es6.js @@ -6,13 +6,12 @@ const client = Mozilla.Client; const footerCta = document.querySelector('.c-feature-footer'); +const midPageCta = document.querySelector('.c-firefox-midpage-cta'); -(function () { - if ( - (footerCta && client.isFirefoxDesktop) || - (footerCta && client.isFirefoxAndroid) || - (footerCta && client.isFirefoxiOS) - ) { - footerCta.parentNode.removeChild(footerCta); - } -})(window.Mozilla); +if (midPageCta && client.isFirefox) { + midPageCta.parentNode.removeChild(midPageCta); +} + +if (footerCta && client.isFirefox) { + footerCta.parentNode.removeChild(footerCta); +}