diff --git a/mobile/app/mobile.js b/mobile/app/mobile.js index ab46c69a8f49..1a5788c4ac33 100644 --- a/mobile/app/mobile.js +++ b/mobile/app/mobile.js @@ -438,6 +438,7 @@ pref("app.faqURL", "http://www.mozilla.com/%LOCALE%/mobile/beta/faq/"); pref("app.featuresURL", "http://www.mozilla.com/%LOCALE%/mobile/features/"); pref("app.faqURL", "http://www.mozilla.com/%LOCALE%/mobile/faq/"); #endif +pref("app.promo.spark.endDate", "2011-01-01"); // Name of alternate about: page for certificate errors (when undefined, defaults to about:neterror) pref("security.alternate_certificate_error_page", "certerror"); diff --git a/mobile/branding/nightly/content/jar.mn b/mobile/branding/nightly/content/jar.mn index 0a9f7ca1e3ae..2efd6b8ed3c2 100644 --- a/mobile/branding/nightly/content/jar.mn +++ b/mobile/branding/nightly/content/jar.mn @@ -4,3 +4,4 @@ chrome.jar: content/branding/logoWordmark.png (logoWordmark.png) content/branding/logo.png (logo.png) content/branding/favicon32.png (favicon32.png) + content/branding/spark.png (spark.png) diff --git a/mobile/branding/nightly/content/spark.png b/mobile/branding/nightly/content/spark.png new file mode 100644 index 000000000000..32c8af51d275 Binary files /dev/null and b/mobile/branding/nightly/content/spark.png differ diff --git a/mobile/branding/official/content/jar.mn b/mobile/branding/official/content/jar.mn index 0a9f7ca1e3ae..2efd6b8ed3c2 100644 --- a/mobile/branding/official/content/jar.mn +++ b/mobile/branding/official/content/jar.mn @@ -4,3 +4,4 @@ chrome.jar: content/branding/logoWordmark.png (logoWordmark.png) content/branding/logo.png (logo.png) content/branding/favicon32.png (favicon32.png) + content/branding/spark.png (spark.png) diff --git a/mobile/branding/official/content/spark.png b/mobile/branding/official/content/spark.png new file mode 100644 index 000000000000..32c8af51d275 Binary files /dev/null and b/mobile/branding/official/content/spark.png differ diff --git a/mobile/chrome/content/aboutHome.xhtml b/mobile/chrome/content/aboutHome.xhtml index 757cf1b54665..9fa83652892b 100644 --- a/mobile/chrome/content/aboutHome.xhtml +++ b/mobile/chrome/content/aboutHome.xhtml @@ -86,6 +86,8 @@ + +
&aboutHome.promoSpark;
@@ -124,6 +126,7 @@ function init() { initTabs(); initAddons(); + initPromo(); } function uninit() { @@ -350,12 +353,18 @@ } function initAddons() { - getChromeWin().Services.obs.addObserver(updateAddons, "recommended-addons-cache-updated", false); - updateAddons(); + getChromeWin().Services.obs.addObserver(updateAddons, "recommended-addons-cache-updated", false); + updateAddons(); } function uninitAddons() { - getChromeWin().Services.obs.removeObserver(updateAddons, "recommended-addons-cache-updated"); + getChromeWin().Services.obs.removeObserver(updateAddons, "recommended-addons-cache-updated"); + } + + function initPromo() { + let endDate = new Date(getChromeWin().Services.prefs.getCharPref("app.promo.spark.endDate")); + if (endDate > Date.now()) + document.getElementById("promo").style.display = "block"; } ]]> diff --git a/mobile/locales/en-US/chrome/aboutHome.dtd b/mobile/locales/en-US/chrome/aboutHome.dtd index fa15cdf58859..f22c55d065ed 100644 --- a/mobile/locales/en-US/chrome/aboutHome.dtd +++ b/mobile/locales/en-US/chrome/aboutHome.dtd @@ -8,3 +8,6 @@ + + + diff --git a/mobile/themes/core/aboutHome.css b/mobile/themes/core/aboutHome.css index 095e5e5ca78f..a12ceb1895af 100644 --- a/mobile/themes/core/aboutHome.css +++ b/mobile/themes/core/aboutHome.css @@ -232,3 +232,22 @@ body[dir="rtl"] { border-left: none; border-radius: 0 8px 8px 0; } + +#promo { + font-weight: bold; + color: rgb(254,210,13); + background-color: black; + border-radius: 6px; + padding: 10px; + margin-top: 24px; + box-shadow: inset rgba(0, 0, 0, 0.2) 0 -3px 0px, rgba(0, 0, 0, 0.1) 0px 2px 0px; + display: none; +} + +#promo > img { + vertical-align: middle; +} + +#promo > span { + padding-left: 16px; +}