forked from getpelican/pelican-themes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show source support added in pelican-bootstrap3
- Loading branch information
1 parent
69ecf3d
commit bd8ef84
Showing
4 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
pelican-bootstrap3/templates/includes/sidebar/show_source.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 %} |