From e891c8b68d45f1dd533b550f724cdde421dd3d94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Sun, 16 Oct 2022 17:25:13 +0100 Subject: [PATCH] add new home layout --- assets/css/compiled/main.css | 55 ++++++++++++------ config/_default/params.toml | 2 +- exampleSite/assets/js/home.js | 5 +- exampleSite/config/_default/params.toml | 2 +- exampleSite/content/_index.md | 2 +- .../content/docs/configuration/index.md | 3 +- .../docs/homepage-layout/home-background.png | Bin 0 -> 3799385 bytes .../content/docs/homepage-layout/index.md | 9 ++- exampleSite/layouts/partials/home/custom.html | 5 +- images/home-background.png | Bin 0 -> 3799385 bytes layouts/_default/single.html | 2 - layouts/partials/home/background.html | 53 +++++++++++++++++ 12 files changed, 107 insertions(+), 31 deletions(-) create mode 100644 exampleSite/content/docs/homepage-layout/home-background.png create mode 100644 images/home-background.png create mode 100644 layouts/partials/home/background.html diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index 7b46d151..558654bb 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -1582,14 +1582,14 @@ select { margin-right: -0.5rem; } -.-mr-48 { - margin-right: -12rem; -} - .mb-0 { margin-bottom: 0px; } +.-mr-48 { + margin-right: -12rem; +} + .mb-\[2px\] { margin-bottom: 2px; } @@ -1642,14 +1642,14 @@ select { height: 9rem; } -.h-48 { - height: 12rem; -} - .h-1\/2 { height: 50%; } +.h-48 { + height: 12rem; +} + .max-h-\[5rem\] { max-height: 5rem; } @@ -1969,6 +1969,12 @@ select { --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); } +.from-neutral-100 { + --tw-gradient-from: rgba(var(--color-neutral-100), 1); + --tw-gradient-to: rgba(var(--color-neutral-100), 0); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + .from-primary-500 { --tw-gradient-from: rgba(var(--color-primary-500), 1); --tw-gradient-to: rgba(var(--color-primary-500), 0); @@ -2257,6 +2263,11 @@ select { color: rgba(var(--color-neutral), var(--tw-text-opacity)) !important; } +.text-primary-300 { + --tw-text-opacity: 1; + color: rgba(var(--color-primary-300), var(--tw-text-opacity)); +} + .text-neutral-200 { --tw-text-opacity: 1; color: rgba(var(--color-neutral-200), var(--tw-text-opacity)); @@ -2267,11 +2278,6 @@ select { color: rgba(var(--color-neutral-300), var(--tw-text-opacity)); } -.text-primary-300 { - --tw-text-opacity: 1; - color: rgba(var(--color-primary-300), var(--tw-text-opacity)); -} - .\!no-underline { -webkit-text-decoration-line: none !important; text-decoration-line: none !important; @@ -3398,6 +3404,10 @@ body:has(#menu-controller:checked) { --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); } +.dark .dark\:to-neutral-300 { + --tw-gradient-to: rgba(var(--color-neutral-300), 1); +} + .dark .dark\:to-secondary-800 { --tw-gradient-to: rgba(var(--color-secondary-800), 1); } @@ -3437,6 +3447,15 @@ body:has(#menu-controller:checked) { color: rgba(var(--color-neutral-100), var(--tw-text-opacity)); } +.dark .dark\:text-neutral-200 { + --tw-text-opacity: 1; + color: rgba(var(--color-neutral-200), var(--tw-text-opacity)); +} + +.dark .dark\:mix-blend-multiply { + mix-blend-mode: multiply; +} + .dark .dark\:hover\:bg-primary-900:hover { --tw-bg-opacity: 1; background-color: rgba(var(--color-primary-900), var(--tw-bg-opacity)); @@ -3718,6 +3737,11 @@ body:has(#menu-controller:checked) { padding-right: 8rem; } + .lg\:py-32 { + padding-top: 8rem; + padding-bottom: 8rem; + } + .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; @@ -3733,11 +3757,6 @@ body:has(#menu-controller:checked) { padding-right: 0px; } - .lg\:py-32 { - padding-top: 8rem; - padding-bottom: 8rem; - } - [dir="ltr"] .ltr\:lg\:pl-8 { padding-left: 2rem; } diff --git a/config/_default/params.toml b/config/_default/params.toml index 6f991981..9c45638d 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -22,7 +22,7 @@ enableCodeCopy = true showScrollToTop = true [homepage] - layout = "profile" # valid options: page, profile, hero, card, custom + layout = "profile" # valid options: page, profile, hero, card, background, custom #homepageImage = "IMAGE.jpg" # used in: hero, and card showRecent = false showRecentItems = 5 diff --git a/exampleSite/assets/js/home.js b/exampleSite/assets/js/home.js index 3e0cd833..509b2965 100644 --- a/exampleSite/assets/js/home.js +++ b/exampleSite/assets/js/home.js @@ -1,6 +1,5 @@ - - var layouts = [ + "background", "hero", "profile", "card", @@ -11,8 +10,6 @@ var currentLayout = 0 function switchHomeLayout() { - //document.getElementById( - var old = currentLayout currentLayout = currentLayout == layouts.length - 1 ? 0 : currentLayout + 1 diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index 6b673a19..31321a00 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -22,7 +22,7 @@ mainSections = ["docs"] showScrollToTop = true [homepage] - layout = "custom" # valid options: page, profile, hero, card, custom + layout = "custom" # valid options: page, profile, hero, card, background, custom homepageImage = "iceland.jpg" # used in: hero, and card showRecent = true showRecentItems = 5 diff --git a/exampleSite/content/_index.md b/exampleSite/content/_index.md index 704d3ec1..46fc8aea 100755 --- a/exampleSite/content/_index.md +++ b/exampleSite/content/_index.md @@ -10,7 +10,7 @@ This is a demo site built entirely using Blowfish. It also contains a complete s {{< icon "triangle-exclamation" >}} - This is a demo of the profile layout. + This is a demo of the background layout.