diff --git a/_compress_images_cache.yml b/_compress_images_cache.yml index 672b29b68..17fc84a17 100644 --- a/_compress_images_cache.yml +++ b/_compress_images_cache.yml @@ -547,6 +547,10 @@ assets/images/guide/payments/transactions/transactions-mobile.jpg: transactions- assets/images/guide/payments/transactions/transactions-mobile@2x.jpg: transactions-mobile@2x.jpg assets/images/guide/onboarding/getting-to-know-your-users-mobile@2x.jpg: getting-to-know-your-users-mobile@2x.jpg assets/images/guide/onboarding/getting-to-know-your-users-mobile.jpg: getting-to-know-your-users-mobile.jpg +assets/images/home/banner/the-meta-future-mobile.jpg: the-meta-future-mobile.jpg +assets/images/home/banner/the-meta-future-mobile@2x.jpg: the-meta-future-mobile@2x.jpg +assets/images/home/banner/the-meta-future.jpg: the-meta-future.jpg +assets/images/home/banner/the-meta-future@2x.jpg: the-meta-future@2x.jpg assets/images/guide/getting-started/common-user-flows/muun-onboarding-1.png: muun-onboarding-1.png assets/images/guide/getting-started/common-user-flows/muun-onboarding-10.png: muun-onboarding-10.png assets/images/guide/getting-started/common-user-flows/muun-onboarding-10@2x.png: muun-onboarding-10@2x.png diff --git a/_sass/minima/_home-banner.scss b/_sass/minima/_home-banner.scss index 90decaa5a..45641fa31 100644 --- a/_sass/minima/_home-banner.scss +++ b/_sass/minima/_home-banner.scss @@ -6,6 +6,16 @@ max-width: 1680px; margin-left: auto; margin-right: auto; + background-color: var(--banner-background-color); + background-image: var(--banner-background-path-mobile); + background-size: cover; + background-repeat: no-repeat; + background-position: center top; + transition: background-color 150ms $ease; + + @include retina() { + background-image: var(--banner-background-path-mobile-retina); + } .home-banner-copy-wrapper { background-color: var(--copy-background-color); @@ -78,15 +88,15 @@ .home-banner-image { width: 100%; padding-bottom: 100%; - background-color: var(--background-image-color); - background-image: var(--background-image-path-mobile); + background-color: var(--banner-image-color); + background-image: var(--banner-image-path-mobile); background-size: cover; background-repeat: no-repeat; background-position: center center; transition: background-color 150ms $ease; @include retina() { - background-image: var(--background-image-path-mobile-retina); + background-image: var(--banner-image-path-mobile-retina); } } @@ -112,12 +122,18 @@ display: flex; flex-direction: row; align-items: stretch; + background-image: var(--banner-background-path); + background-position: center center; + + @include retina() { + background-image: var(--banner-background-path-retina); + } .home-banner-image { - background-image: var(--background-image-path); + background-image: var(--banner-image-path); @include retina() { - background-image: var(--background-image-path-retina); + background-image: var(--banner-image-path-retina); } } diff --git a/assets/images/home/banner/the-meta-future-mobile.jpg b/assets/images/home/banner/the-meta-future-mobile.jpg new file mode 100644 index 000000000..38ad53598 Binary files /dev/null and b/assets/images/home/banner/the-meta-future-mobile.jpg differ diff --git a/assets/images/home/banner/the-meta-future-mobile@2x.jpg b/assets/images/home/banner/the-meta-future-mobile@2x.jpg new file mode 100644 index 000000000..e419b3b80 Binary files /dev/null and b/assets/images/home/banner/the-meta-future-mobile@2x.jpg differ diff --git a/assets/images/home/banner/the-meta-future.jpg b/assets/images/home/banner/the-meta-future.jpg new file mode 100644 index 000000000..0d241ed64 Binary files /dev/null and b/assets/images/home/banner/the-meta-future.jpg differ diff --git a/assets/images/home/banner/the-meta-future@2x.jpg b/assets/images/home/banner/the-meta-future@2x.jpg new file mode 100644 index 000000000..07a45ba19 Binary files /dev/null and b/assets/images/home/banner/the-meta-future@2x.jpg differ diff --git a/js/themes.js b/js/themes.js index 1c4f42a43..b4c3cd83b 100644 --- a/js/themes.js +++ b/js/themes.js @@ -1,75 +1,191 @@ let themes = [ { // Template - copyBackgroundColor: "", - bitcoinLogoPath: "/assets/banner-bitcoin-logo.svg", - bitcoinLogoFillColor: "", - bitcoinLogoOutlineColor: "#000", - titleFillColor: "#FFF", - titleOutlineColor: "#000", - descriptionFillColor: "#000", - button1FillColor: "", - button1OutlineColor: "#000", - button1LabelFillColor: "#000", - button2FillColor: "", - button2OutlineColor: "#000", - button2LabelFillColor: "#000", - backgroundImagePath: 'url("/assets/images/home/banner/template.jpg")', - backgroundImagePathRetina: 'url("/assets/images/home/banner/template@2x.jpg")', - backgroundImagePathMobile: 'url("/assets/images/home/banner/template-mobile.jpg")', - backgroundImagePathMobileRetina: 'url("/assets/images/home/banner/template-mobile@2x.jpg")', - backgroundImageColor: "#fbfbfb", + logo: { + path: "/assets/banner-bitcoin-logo.svg", + fillColor: "", + outlineColor: "#000" + }, + title: { + fillColor: "#FFF", + outlineColor: "#000" + }, + description: { + fillColor: "#000" + }, + button1: { + fillColor: "", + outlineColor: "#000", + labelFillColor: "#000" + }, + button2: { + fillColor: "", + outlineColor: "#000", + labelFillColor: "#000" + }, + background: { + path: '', + pathRetina: '', + pathMobile: '', + pathMobileRetina: '', + backgroundColor: '' + }, + copy: { + backgroundColor: "" + }, + image: { + path: 'url("/assets/images/home/banner/template.jpg")', + pathRetina: 'url("/assets/images/home/banner/template@2x.jpg")', + pathMobile: 'url("/assets/images/home/banner/template-mobile.jpg")', + pathMobileRetina: 'url("/assets/images/home/banner/template-mobile@2x.jpg")', + backgroundColor: "#fbfbfb" + }, flipLayoutOnMobile: false, - author: "Template", - authorLink: "https://github.com/BitcoinDesign/Guide/pull/27" + author: { + name: "Template", + link: "https://github.com/BitcoinDesign/Guide/pull/27" + } }, { // Bridging bitcoin - copyBackgroundColor: "#F7931A", - bitcoinLogoPath: "/assets/banner-bitcoin-logo.svg", - bitcoinLogoFillColor: "#000", - bitcoinLogoOutlineColor: "", - titleFillColor: "#000", - titleOutlineColor: "", - descriptionFillColor: "#000", - button1FillColor: "#FFF", - button1OutlineColor: "#000", - button1LabelFillColor: "#000", - button2FillColor: "", - button2OutlineColor: "#000", - button2LabelFillColor: "#000", - backgroundImagePath: 'url("/assets/images/home/banner/header-theme-1-bridging-bitcoin.png")', - backgroundImagePathRetina: 'url("/assets/images/home/banner/header-theme-1-bridging-bitcoin@2x.png")', - backgroundImagePathMobile: 'url("/assets/images/home/banner/header-theme-1-bridging-bitcoin-mobile.png")', - backgroundImagePathMobileRetina: 'url("/assets/images/home/banner/header-theme-1-bridging-bitcoin-mobile@2x.png")', - backgroundImageColor: "#F7931A", + logo: { + path: "/assets/banner-bitcoin-logo.svg", + fillColor: "#000", + outlineColor: "" + }, + title: { + fillColor: "#000", + outlineColor: "transparent" + }, + description: { + fillColor: "#000" + }, + button1: { + fillColor: "#FFF", + outlineColor: "#000", + labelFillColor: "#000" + }, + button2: { + fillColor: "", + outlineColor: "#000", + labelFillColor: "#000" + }, + background: { + path: '', + pathRetina: '', + pathMobile: '', + pathMobileRetina: '', + backgroundColor: '' + }, + copy: { + backgroundColor: "#F7931A" + }, + image: { + path: 'url("/assets/images/home/banner/header-theme-1-bridging-bitcoin.png")', + pathRetina: 'url("/assets/images/home/banner/header-theme-1-bridging-bitcoin@2x.png")', + pathMobile: 'url("/assets/images/home/banner/header-theme-1-bridging-bitcoin-mobile.png")', + pathMobileRetina: 'url("/assets/images/home/banner/header-theme-1-bridging-bitcoin-mobile@2x.png")', + backgroundColor: "#F7931A" + }, flipLayoutOnMobile: false, - author: "Alexa Aker", - authorLink: "https://github.com/BitcoinDesign/Guide/issues/45" + author: { + name: "Alexa Aker", + link: "https://github.com/BitcoinDesign/Guide/issues/45" + } }, { // 3D abstract - copyBackgroundColor: "#64EBFC", - bitcoinLogoPath: "/assets/banner-bitcoin-logo.svg", - bitcoinLogoFillColor: "#F7931A", - bitcoinLogoOutlineColor: "", - titleFillColor: "#F7931A", - titleOutlineColor: "#F7931A", - descriptionFillColor: "#000", - button1FillColor: "#F7931A", - button1OutlineColor: "#F7931A", - button1LabelFillColor: "#FFF", - button2FillColor: "#F7931A", - button2OutlineColor: "#F7931A", - button2LabelFillColor: "#FFF", - backgroundImagePath: 'url("/assets/images/home/banner/header-theme-2-3d-abstract.png")', - backgroundImagePathRetina: 'url("/assets/images/home/banner/header-theme-2-3d-abstract@2x.png")', - backgroundImagePathMobile: 'url("/assets/images/home/banner/header-theme-2-3d-abstract-mobile.png")', - backgroundImagePathMobileRetina: 'url("/assets/images/home/banner/header-theme-2-3d-abstract-mobile@2x.png")', - backgroundImageColor: "#64EBFC", + logo: { + path: "/assets/banner-bitcoin-logo.svg", + fillColor: "#F7931A", + outlineColor: "" + }, + title: { + fillColor: "#F7931A", + outlineColor: "#F7931A" + }, + description: { + fillColor: "#000" + }, + button1: { + fillColor: "#F7931A", + outlineColor: "#F7931A", + labelFillColor: "#FFF" + }, + button2: { + fillColor: "#F7931A", + outlineColor: "#F7931A", + labelFillColor: "#FFF" + }, + background: { + path: '', + pathRetina: '', + pathMobile: '', + pathMobileRetina: '', + backgroundColor: '' + }, + copy: { + backgroundColor: "#64EBFC" + }, + image: { + path: 'url("/assets/images/home/banner/header-theme-2-3d-abstract.png")', + pathRetina: 'url("/assets/images/home/banner/header-theme-2-3d-abstract@2x.png")', + pathMobile: 'url("/assets/images/home/banner/header-theme-2-3d-abstract-mobile.png")', + pathMobileRetina: 'url("/assets/images/home/banner/header-theme-2-3d-abstract-mobile@2x.png")', + backgroundColor: "#64EBFC" + }, + flipLayoutOnMobile: false, + author: { + name: "Gabor Magyar", + link: "https://github.com/BitcoinDesign/Guide/issues/143" + } + }, + { + // The Meta-Future + logo: { + path: "/assets/banner-bitcoin-logo.svg", + fillColor: "#F7931A", + outlineColor: "" + }, + title: { + fillColor: "#000", + outlineColor: "transparent" + }, + description: { + fillColor: "#000" + }, + button1: { + fillColor: "#F7931A", + outlineColor: "#000", + labelFillColor: "#000" + }, + button2: { + fillColor: "#FFF", + outlineColor: "#000", + labelFillColor: "#000" + }, + background: { + path: 'url("/assets/images/home/banner/the-meta-future.jpg")', + pathRetina: 'url("/assets/images/home/banner/the-meta-future@2x.jpg")', + pathMobile: 'url("/assets/images/home/banner/the-meta-future-mobile.jpg")', + pathMobileRetina: 'url("/assets/images/home/banner/the-meta-future-mobile@2x.jpg")', + backgroundColor: "#D0E8E1" + }, + copy: { + backgroundColor: "" + }, + image: { + path: '', + pathRetina: '', + pathMobile: '', + pathMobileRetina: '', + backgroundColor: "" + }, flipLayoutOnMobile: false, - author: "Gabor Magyar", - authorLink: "https://github.com/BitcoinDesign/Guide/issues/143" + author: { + name: "Rama Krushna", + link: "https://github.com/BitcoinDesign/Guide/issues/272" + } } ]; @@ -96,33 +212,77 @@ var applyNextTheme = function() { applyTheme(currentThemeIndex); } +var getProperty = function(thing, find, fallback) { + if(!thing) { + return fallback ? fallback : null; + } + + if(!find) { + return fallback ? fallback : null; + } + + var result = thing; + var bits = find.split('.'); + var i=0, length=bits.length, bit; + for(; i