aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Ramsay <chris@ramsay-family.net>2017-09-10 16:23:53 +0100
committerChris Ramsay <chris@ramsay-family.net>2017-09-10 16:23:53 +0100
commitbd8ef84d31882b2bc113df3ba4dcc57da3f37a26 (patch)
tree10cceba91697918a0181b36daabeb7a99f1d26f4
parent69ecf3d1df63f079aafbae2e512db70bc35bca37 (diff)
downloadpelican-themes-bd8ef84d31882b2bc113df3ba4dcc57da3f37a26.tar.gz
Show source support added in pelican-bootstrap3
-rw-r--r--pelican-bootstrap3/templates/article.html1
-rw-r--r--pelican-bootstrap3/templates/includes/show_source.html10
-rw-r--r--pelican-bootstrap3/templates/includes/sidebar.html1
-rw-r--r--pelican-bootstrap3/templates/includes/sidebar/show_source.html19
4 files changed, 31 insertions, 0 deletions
diff --git a/pelican-bootstrap3/templates/article.html b/pelican-bootstrap3/templates/article.html
index 957d9e7..ad4e35a 100644
--- a/pelican-bootstrap3/templates/article.html
+++ b/pelican-bootstrap3/templates/article.html
@@ -93,6 +93,7 @@
{% include 'includes/addthis.html' %}
{% include 'includes/shariff.html' %}
{% include 'includes/comments.html' %}
+ {% include 'includes/show_source.html' %}
</article>
</section>
diff --git a/pelican-bootstrap3/templates/includes/show_source.html b/pelican-bootstrap3/templates/includes/show_source.html
new file mode 100644
index 0000000..f6a4f3c
--- /dev/null
+++ b/pelican-bootstrap3/templates/includes/show_source.html
@@ -0,0 +1,10 @@
+{% if SHOW_SOURCE_IN_SECTION %}
+ {% if article and article.show_source_url %}
+ <section class="well" id="show-source">
+ <h4>This Page</h4>
+ <ul>
+ <a href="{{ SITEURL }}/{{ article.show_source_url }}">Show source</a>
+ </ul>
+ </section>
+ {% endif %}
+{% endif %}
diff --git a/pelican-bootstrap3/templates/includes/sidebar.html b/pelican-bootstrap3/templates/includes/sidebar.html
index 71bab3a..f9aaa95 100644
--- a/pelican-bootstrap3/templates/includes/sidebar.html
+++ b/pelican-bootstrap3/templates/includes/sidebar.html
@@ -6,6 +6,7 @@
{% include 'includes/sidebar/recent_posts.html' %}
{% include 'includes/sidebar/categories.html' %}
{% include 'includes/sidebar/tag_cloud.html' %}
+ {% include 'includes/sidebar/show_source.html' %}
{% include 'includes/sidebar/series.html' %}
{% include 'includes/sidebar/github.html' %}
{% include 'includes/sidebar/twitter_timeline.html' %}
diff --git a/pelican-bootstrap3/templates/includes/sidebar/show_source.html b/pelican-bootstrap3/templates/includes/sidebar/show_source.html
new file mode 100644
index 0000000..4316129
--- /dev/null
+++ b/pelican-bootstrap3/templates/includes/sidebar/show_source.html
@@ -0,0 +1,19 @@
+{% if SHOW_SOURCE_ON_SIDEBAR %}
+ {% if (article and article.show_source_url) or (page and page.show_source_url) %}
+
+<!-- Show source -->
+<li class="list-group-item"><h4><i class="fa fa-tags fa-file-text"></i><span class="icon-label">This Page</span></h4>
+ <ul class="list-group">
+ <li class="list-group-item">
+ {% if article %}
+ <a href="{{ SITEURL }}/{{ article.show_source_url }}">Show source</a>
+ {% elif page %}
+ <a href="{{ SITEURL }}/{{ page.show_source_url }}">Show source</a>
+ {% endif %}
+ </li>
+ </ul>
+</li>
+<!-- End Show source -->
+
+ {% endif %}
+{% endif %}