From 51e38e582cc05d7055423e73f7f951427aa62f55 Mon Sep 17 00:00:00 2001 From: mspnr Date: Sun, 31 Jan 2021 01:20:41 +0100 Subject: [PATCH] switching banner to data concept --- exampleSite/data/banner.yml | 12 ++++++++++++ layouts/index.html | 2 +- layouts/partials/banner.html | 28 ++++++++++++++-------------- 3 files changed, 27 insertions(+), 15 deletions(-) create mode 100644 exampleSite/data/banner.yml diff --git a/exampleSite/data/banner.yml b/exampleSite/data/banner.yml new file mode 100644 index 0000000..517f0ab --- /dev/null +++ b/exampleSite/data/banner.yml @@ -0,0 +1,12 @@ +####################### Banner ######################### +style: "style1 orient-left content-align-left image-position-right fullscreen onload-image-fade-in onload-content-fade-right" +title : "Hugo Story" +subtitle: | + Hugo Story released for free under the Creative Commons. +content : | + This is a Banner element, and it's generally used as an introduction or opening statement. You can customize its appearance with a number of modifiers, as well as assign it an optional onload or onscroll transition modifier (details). +button: + label : "Get Started" + link : "#first" +image : "images/banner.jpg" + diff --git a/layouts/index.html b/layouts/index.html index b78f436..278846d 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -15,7 +15,7 @@
- {{ partial "banner" . }} + {{ partial "banner" site.Data.banner }} {{ partial "spotlight-01-left" . }} {{ partial "spotlight-02-right" . }} {{ partial "spotlight-03-left" . }} diff --git a/layouts/partials/banner.html b/layouts/partials/banner.html index edd0fa7..29acf12 100644 --- a/layouts/partials/banner.html +++ b/layouts/partials/banner.html @@ -1,14 +1,14 @@ - - \ No newline at end of file + + \ No newline at end of file