Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/curttimson/hugo-theme-dopetrope.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCurtis Timson <curt@live.co.uk>2018-02-18 23:17:19 +0300
committerCurtis Timson <curt@live.co.uk>2018-02-18 23:17:19 +0300
commita2e4f416ad4e8b5199070a1bf64c32189db1300d (patch)
tree25b12b846f3a5403c70065e81c33d1e0564cab04
parent8a3f367817a1b20ea49c47113ecec8b78c263719 (diff)
:wrench: Configure sidebar for left/right/none positioning
-rw-r--r--exampleSite/config-prod.toml6
-rw-r--r--exampleSite/config.toml4
-rw-r--r--layouts/_default/single.html11
3 files changed, 18 insertions, 3 deletions
diff --git a/exampleSite/config-prod.toml b/exampleSite/config-prod.toml
index e03a277..3a0204a 100644
--- a/exampleSite/config-prod.toml
+++ b/exampleSite/config-prod.toml
@@ -71,4 +71,8 @@ theme = "../.."
[params.settings]
googleanalytics = "UA-113904582-2"
- disqus = "hugo-dopetrope" \ No newline at end of file
+ disqus = "hugo-dopetrope"
+
+[params.sidebar]
+ position = "right"
+ image = "images/pic09.jpg" \ No newline at end of file
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index a56d309..2802b07 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -74,5 +74,5 @@ theme = "../.."
disqus = "hugo-dopetrope"
[params.sidebar]
- enabled = true
- \ No newline at end of file
+ position = "right"
+ image = "images/pic09.jpg" \ No newline at end of file
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index a174d2c..75a9e4e 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -23,14 +23,25 @@
<!-- Main -->
<div id="main-wrapper">
<div class="container">
+ {{ if or (eq .Site.Params.Sidebar.position "left") (eq .Site.Params.Sidebar.position "right") }}
<div class="row">
+ {{ if eq .Site.Params.Sidebar.position "left" }}
+ <div class="4u 12u(mobile)">
+ {{ partial "post/sidebar" . }}
+ </div>
+ {{ end }}
<div class="8u 12u(mobile)">
{{ partial "post/content.html" . }}
</div>
+ {{ if eq .Site.Params.Sidebar.position "right" }}
<div class="4u 12u(mobile)">
{{ partial "post/sidebar" . }}
</div>
+ {{ end }}
</div>
+ {{ else }}
+ {{ partial "post/content.html" . }}
+ {{ end }}
</div>
</div>