diff options
author | Curtis Timson <curt@live.co.uk> | 2018-02-24 12:16:41 +0300 |
---|---|---|
committer | Curtis Timson <curt@live.co.uk> | 2018-02-24 12:16:41 +0300 |
commit | 485c5d8dbab39f1d0f46cca062096c51a0a342b7 (patch) | |
tree | 1c9215b0c19b8a12e02c6c69dddcfcd5efa8236a | |
parent | 4803be9d27b7a53c68296b5f95477d8d80af3099 (diff) |
:sparkles: Move buttons to data file and remove intro config
-rw-r--r-- | exampleSite/config-prod.toml | 7 | ||||
-rw-r--r-- | exampleSite/config.toml | 7 | ||||
-rw-r--r-- | exampleSite/data/home/intro.yaml | 9 | ||||
-rw-r--r-- | layouts/partials/intro.html | 6 |
4 files changed, 12 insertions, 17 deletions
diff --git a/exampleSite/config-prod.toml b/exampleSite/config-prod.toml index 3030ebb..112d17c 100644 --- a/exampleSite/config-prod.toml +++ b/exampleSite/config-prod.toml @@ -7,13 +7,6 @@ theme = "../.." subtitle = "Howdy. This is Dopetrope." subtitleline2 = "A responsive template by HTML5 UP" -[params.intro] - buttonlink1 = "#" - buttontext1 = "Get Started" - - buttonlink2 = "#" - buttontext2 = "Learn More" - [params.footer] title1 = "Blandit nisl adipiscing" diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 54c9fcf..83bec74 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -7,13 +7,6 @@ theme = "../.." subtitle = "Howdy. This is Dopetrope." subtitleline2 = "A responsive template by HTML5 UP" -[params.intro] - buttonlink1 = "#" - buttontext1 = "Get Started" - - buttonlink2 = "#" - buttontext2 = "Learn More" - [params.footer] title1 = "Blandit nisl adipiscing" diff --git a/exampleSite/data/home/intro.yaml b/exampleSite/data/home/intro.yaml index 479a15c..6f29784 100644 --- a/exampleSite/data/home/intro.yaml +++ b/exampleSite/data/home/intro.yaml @@ -9,4 +9,11 @@ sections: - icon: 'fa-star' title: 'Tempus adipiscing' - description: 'Nisl amet dolor sit ipsum veroeros sed blandit consequat veroeros et magna tempus.'
\ No newline at end of file + description: 'Nisl amet dolor sit ipsum veroeros sed blandit consequat veroeros et magna tempus.' + +buttons: +- link: '#' + text: 'Get Started' + +- link: '#' + text: 'Learn More'
\ No newline at end of file diff --git a/layouts/partials/intro.html b/layouts/partials/intro.html index 55932af..381cc12 100644 --- a/layouts/partials/intro.html +++ b/layouts/partials/intro.html @@ -2,6 +2,8 @@ {{ $section1 := index .Site.Data.home.intro.sections 0 }} {{ $section2 := index .Site.Data.home.intro.sections 1 }} {{ $section3 := index .Site.Data.home.intro.sections 2 }} +{{ $button1 := index .Site.Data.home.intro.buttons 0 }} +{{ $button2 := index .Site.Data.home.intro.buttons 1 }} <section id="intro" class="container"> <div class="row"> <div class="4u 12u(mobile)"> @@ -34,8 +36,8 @@ </div> <footer> <ul class="actions"> - <li><a href="{{ .Site.Params.Intro.buttonlink1 }}" class="button big">{{ .Site.Params.Intro.buttontext1 }}</a></li> - <li><a href="{{ .Site.Params.Intro.buttonlink2 }}" class="button alt big">{{ .Site.Params.Intro.buttontext2 }}</a></li> + <li><a href="{{ $button1.link }}" class="button big">{{ $button1.text }}</a></li> + <li><a href="{{ $button2.link }}" class="button alt big">{{ $button2.text }}</a></li> </ul> </footer> </section>
\ No newline at end of file |