diff options
author | Curtis Timson <curt@live.co.uk> | 2018-02-18 23:26:27 +0300 |
---|---|---|
committer | Curtis Timson <curt@live.co.uk> | 2018-02-18 23:26:27 +0300 |
commit | 3ce2bc748b90e70584185c5467362c3c0f5d09c3 (patch) | |
tree | ee578edab688160cef2d7f426c16b5025e53c4c3 | |
parent | a2e4f416ad4e8b5199070a1bf64c32189db1300d (diff) |
:wrench: Configure sidebar content
-rw-r--r-- | exampleSite/config-prod.toml | 12 | ||||
-rw-r--r-- | exampleSite/config.toml | 13 | ||||
-rw-r--r-- | layouts/partials/post/sidebar.html | 17 |
3 files changed, 32 insertions, 10 deletions
diff --git a/exampleSite/config-prod.toml b/exampleSite/config-prod.toml index 3a0204a..9b2c48a 100644 --- a/exampleSite/config-prod.toml +++ b/exampleSite/config-prod.toml @@ -75,4 +75,14 @@ theme = "../.." [params.sidebar] position = "right" - image = "images/pic09.jpg"
\ No newline at end of file + + image1 = "images/pic09.jpg" + title1 = "Sed etiam lorem nulla" + description1 = "Lorem ipsum dolor sit amet sit veroeros sed amet blandit consequat veroeros lorem blandit adipiscing et feugiat phasellus tempus dolore ipsum lorem dolore." + buttonlink1 = "#" + buttontext1 = "Magna sed taciti" + + title2 = "Feugiat consequat" + description2 = "Veroeros sed amet blandit consequat veroeros lorem blandit adipiscing et feugiat sed lorem consequat feugiat lorem dolore." + buttonlink2 = "#" + buttontext2 = "Ipsum consequat"
\ No newline at end of file diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 2802b07..2935a89 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -75,4 +75,15 @@ theme = "../.." [params.sidebar] position = "right" - image = "images/pic09.jpg"
\ No newline at end of file + + image1 = "images/pic09.jpg" + imagelink1 = "#" + title1 = "Sed etiam lorem nulla" + description1 = "Lorem ipsum dolor sit amet sit veroeros sed amet blandit consequat veroeros lorem blandit adipiscing et feugiat phasellus tempus dolore ipsum lorem dolore." + buttonlink1 = "#" + buttontext1 = "Magna sed taciti" + + title2 = "Feugiat consequat" + description2 = "Veroeros sed amet blandit consequat veroeros lorem blandit adipiscing et feugiat sed lorem consequat feugiat lorem dolore." + buttonlink2 = "#" + buttontext2 = "Ipsum consequat"
\ No newline at end of file diff --git a/layouts/partials/post/sidebar.html b/layouts/partials/post/sidebar.html index 203043a..83726ac 100644 --- a/layouts/partials/post/sidebar.html +++ b/layouts/partials/post/sidebar.html @@ -1,21 +1,22 @@ +{{ $sidebar := .Site.Params.Sidebar }} <!-- Sidebar --> <section class="box"> - {{ if .Site.Params.Sidebar.image }} - <a href="#" class="image featured"><img src="{{ .Site.BaseURL }}{{ .Site.Params.Sidebar.image }}" alt="" /></a> + {{ if $sidebar.image1 }} + <a href="{{ $sidebar.imagelink1 }}" class="image featured"><img src="{{ .Site.BaseURL }}{{ $sidebar.image1 }}" alt="" /></a> {{ end }} <header> - <h3>Sed etiam lorem nulla</h3> + <h3>{{ $sidebar.title1 }}</h3> </header> - <p>Lorem ipsum dolor sit amet sit veroeros sed amet blandit consequat veroeros lorem blandit adipiscing et feugiat phasellus tempus dolore ipsum lorem dolore.</p> + <p>{{ $sidebar.description1 }}</p> <footer> - <a href="#" class="button alt">Magna sed taciti</a> + <a href="{{ $sidebar.buttonlink1 }}" class="button alt">{{ $sidebar.buttontext1 }}</a> </footer> </section> <section class="box"> <header> - <h3>Feugiat consequat</h3> + <h3>{{ $sidebar.title2 }}</h3> </header> - <p>Veroeros sed amet blandit consequat veroeros lorem blandit adipiscing et feugiat sed lorem consequat feugiat lorem dolore.</p> + <p>{{ $sidebar.description2 }}</p> <ul class="divided"> <li><a href="#">Sed et blandit consequat sed</a></li> <li><a href="#">Hendrerit tortor vitae sapien dolore</a></li> @@ -23,6 +24,6 @@ <li><a href="#">Aptent taciti sociosqu ad litora</a></li> </ul> <footer> - <a href="#" class="button alt">Ipsum consequat</a> + <a href="{{ $sidebar.buttonlink2 }}" class="button alt">{{ $sidebar.buttontext2 }}</a> </footer> </section>
\ No newline at end of file |