Skip to content

Commit

Permalink
Show source support added in pelican-bootstrap3
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisramsay committed Sep 10, 2017
1 parent 69ecf3d commit bd8ef84
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions pelican-bootstrap3/templates/article.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ <h1>
{% include 'includes/addthis.html' %}
{% include 'includes/shariff.html' %}
{% include 'includes/comments.html' %}
{% include 'includes/show_source.html' %}
</article>
</section>

Expand Down
10 changes: 10 additions & 0 deletions pelican-bootstrap3/templates/includes/show_source.html
Original file line number Diff line number Diff line change
@@ -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 %}
1 change: 1 addition & 0 deletions pelican-bootstrap3/templates/includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -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' %}
Expand Down
19 changes: 19 additions & 0 deletions pelican-bootstrap3/templates/includes/sidebar/show_source.html
Original file line number Diff line number Diff line change
@@ -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 %}

0 comments on commit bd8ef84

Please sign in to comment.