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-19 00:00:34 +0300
committerCurtis Timson <curt@live.co.uk>2018-02-19 00:00:34 +0300
commit0e6f05bf2f738196eb738c256b7cee2b22363df0 (patch)
tree061ad39b94cad50165f58e26442e9227c7d02432
parent796c7cbf7c7fa0a999279329bab4b5e8765b2ac3 (diff)
:sparkles: Add ability to hide sidebar for specific posts
-rw-r--r--exampleSite/content/blog/04-no-sidebar.md19
-rw-r--r--exampleSite/content/blog/04-post.md12
-rw-r--r--exampleSite/content/blog/06-comments.md (renamed from exampleSite/content/blog/06-post.md)8
-rw-r--r--layouts/_default/single.html2
-rw-r--r--package.json2
5 files changed, 25 insertions, 18 deletions
diff --git a/exampleSite/content/blog/04-no-sidebar.md b/exampleSite/content/blog/04-no-sidebar.md
new file mode 100644
index 0000000..ca7ed12
--- /dev/null
+++ b/exampleSite/content/blog/04-no-sidebar.md
@@ -0,0 +1,19 @@
++++
+description = "An example of a post without a sidebar"
+date = "2017-12-25T00:00:00"
+thumbnail = "images/pic08.jpg"
+image = "images/pic01.jpg"
+title = "No Sidebar"
+slug = "no-sidebar"
+author = "John Smith"
+draft = false
+disqusid = "4"
+hidesidebar = true
++++
+An example of a post without a sidebar.
+
+```
++++
+hidesidebar = true
++++
+``` \ No newline at end of file
diff --git a/exampleSite/content/blog/04-post.md b/exampleSite/content/blog/04-post.md
deleted file mode 100644
index dc3eb11..0000000
--- a/exampleSite/content/blog/04-post.md
+++ /dev/null
@@ -1,12 +0,0 @@
-+++
-description = "fourth post description"
-date = "2017-12-25T00:00:00"
-thumbnail = "images/pic08.jpg"
-image = "images/pic01.jpg"
-title = "fourth post"
-slug = "fourth-post"
-author = "John Smith"
-draft = false
-disqusid = "4"
-+++
-Testing content \ No newline at end of file
diff --git a/exampleSite/content/blog/06-post.md b/exampleSite/content/blog/06-comments.md
index 3231657..6fa3771 100644
--- a/exampleSite/content/blog/06-post.md
+++ b/exampleSite/content/blog/06-comments.md
@@ -1,12 +1,12 @@
+++
-description = "Sixth post description"
+description = "Example of a post with comments"
date = "2018-02-06T00:00:00"
thumbnail = "images/pic08.jpg"
image = "images/pic01.jpg"
-title = "Sixth post"
-slug = "sixth-post"
+title = "Comment Example"
+slug = "comment-example"
author = "John Smith"
draft = false
disqusid = "6"
+++
-Testing content \ No newline at end of file
+Example of a post with comments using Disqus. \ No newline at end of file
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 75a9e4e..b4df0e0 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -23,7 +23,7 @@
<!-- Main -->
<div id="main-wrapper">
<div class="container">
- {{ if or (eq .Site.Params.Sidebar.position "left") (eq .Site.Params.Sidebar.position "right") }}
+ {{ if and (or (eq .Site.Params.Sidebar.position "left") (eq .Site.Params.Sidebar.position "right")) (not (eq .Params.hidesidebar true)) }}
<div class="row">
{{ if eq .Site.Params.Sidebar.position "left" }}
<div class="4u 12u(mobile)">
diff --git a/package.json b/package.json
index 7337bd8..bcb26ba 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "hugo-theme-dopetrope",
- "version": "3.1.0",
+ "version": "3.2.0",
"description": "Hugo Theme Dopetrope",
"main": "index.js",
"scripts": {