aboutsummaryrefslogtreecommitdiffstats
path: root/pelican-bootstrap3/templates/includes/sidebar
diff options
context:
space:
mode:
Diffstat (limited to 'pelican-bootstrap3/templates/includes/sidebar')
-rw-r--r--pelican-bootstrap3/templates/includes/sidebar/article-li.html1
-rw-r--r--pelican-bootstrap3/templates/includes/sidebar/categories.html21
-rw-r--r--pelican-bootstrap3/templates/includes/sidebar/github-js.html36
-rw-r--r--pelican-bootstrap3/templates/includes/sidebar/github.html15
-rw-r--r--pelican-bootstrap3/templates/includes/sidebar/images.html16
-rw-r--r--pelican-bootstrap3/templates/includes/sidebar/links.html16
-rw-r--r--pelican-bootstrap3/templates/includes/sidebar/macros.jinja7
-rw-r--r--pelican-bootstrap3/templates/includes/sidebar/recent_posts.html19
-rw-r--r--pelican-bootstrap3/templates/includes/sidebar/series.html24
-rw-r--r--pelican-bootstrap3/templates/includes/sidebar/social.html24
-rw-r--r--pelican-bootstrap3/templates/includes/sidebar/tag_cloud.html27
-rw-r--r--pelican-bootstrap3/templates/includes/sidebar/twitter_timeline.html12
12 files changed, 218 insertions, 0 deletions
diff --git a/pelican-bootstrap3/templates/includes/sidebar/article-li.html b/pelican-bootstrap3/templates/includes/sidebar/article-li.html
new file mode 100644
index 0000000..d163212
--- /dev/null
+++ b/pelican-bootstrap3/templates/includes/sidebar/article-li.html
@@ -0,0 +1 @@
+<a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a>
diff --git a/pelican-bootstrap3/templates/includes/sidebar/categories.html b/pelican-bootstrap3/templates/includes/sidebar/categories.html
new file mode 100644
index 0000000..01fb5b4
--- /dev/null
+++ b/pelican-bootstrap3/templates/includes/sidebar/categories.html
@@ -0,0 +1,21 @@
+{% if DISPLAY_CATEGORIES_ON_SIDEBAR %}
+ {% from 'includes/sidebar/macros.jinja' import title %}
+
+<!-- Sidebar/Categories -->
+<li class="list-group-item">
+ <h4>{{ title(_('Categories'), DISABLE_SIDEBAR_TITLE_ICONS) }}</h4>
+ <ul class="list-group" id="categories">
+ {% for cat, null in categories %}
+ <li class="list-group-item">
+ <a href="{{ SITEURL }}/{{ cat.url }}">
+ {%- if not DISABLE_SIDEBAR_TITLE_ICONS -%}
+ <i class="fa fa-folder-open fa-lg"></i>
+ {%- endif -%}
+ {{- cat -}}
+ </a>
+ </li>
+ {% endfor %}
+ </ul>
+</li>
+<!-- End Sidebar/Categories -->
+{% endif %}
diff --git a/pelican-bootstrap3/templates/includes/sidebar/github-js.html b/pelican-bootstrap3/templates/includes/sidebar/github-js.html
new file mode 100644
index 0000000..7fc00a5
--- /dev/null
+++ b/pelican-bootstrap3/templates/includes/sidebar/github-js.html
@@ -0,0 +1,36 @@
+{% if GITHUB_USER %}
+ {% if GITHUB_REPO_COUNT is not defined %}
+ {% set GITHUB_REPO_COUNT = 5 %}
+ {% endif %}
+ {% if GITHUB_SKIP_FORK is not defined %}
+ {% set GITHUB_SKIP_FORK = "false" %}
+ {% else %}
+ {% if GITHUB_SKIP_FORK %}
+ {% set GITHUB_SKIP_FORK = "true" %}
+ {% else %}
+ {% set GITHUB_SKIP_FORK = "false" %}
+ {% endif %}
+ {% endif %}
+
+<!-- GitHub JS Code -->
+<script type="text/javascript">
+$(document).ready(function () {
+ if (!window.jXHR) {
+ var jxhr = document.createElement('script');
+ jxhr.type = 'text/javascript';
+ jxhr.src = '{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/jXHR.js';
+ var s = document.getElementsByTagName('script')[0];
+ s.parentNode.insertBefore(jxhr, s);
+ }
+
+ github.showRepos({
+ user: '{{ GITHUB_USER }}',
+ count: {{ GITHUB_REPO_COUNT }},
+ skip_forks: {{ GITHUB_SKIP_FORK }},
+ target: '#gh_repos'
+ });
+});
+</script>
+<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/github.js" type="text/javascript"></script>
+<!-- End GitHub JS Code -->
+{% endif %}
diff --git a/pelican-bootstrap3/templates/includes/sidebar/github.html b/pelican-bootstrap3/templates/includes/sidebar/github.html
new file mode 100644
index 0000000..a84dbfb
--- /dev/null
+++ b/pelican-bootstrap3/templates/includes/sidebar/github.html
@@ -0,0 +1,15 @@
+{% if GITHUB_USER %}
+ {% from 'includes/sidebar/macros.jinja' import title %}
+
+<!-- Sidebar/Github -->
+<li class="list-group-item">
+ <h4>{{ title('GitHub Repos', DISABLE_SIDEBAR_TITLE_ICONS, icon='github') }}</h4>
+ <div id="gh_repos">
+ <p class="list-group-item">Status updating...</p>
+ </div>
+ {% if GITHUB_SHOW_USER_LINK is defined %}
+ <a href="https://github.com/{{ GITHUB_USER }}">@{{ GITHUB_USER }}</a> on GitHub
+ {% endif %}
+</li>
+<!-- End Sidebar/Github -->
+{% endif %}
diff --git a/pelican-bootstrap3/templates/includes/sidebar/images.html b/pelican-bootstrap3/templates/includes/sidebar/images.html
new file mode 100644
index 0000000..2ca2e8d
--- /dev/null
+++ b/pelican-bootstrap3/templates/includes/sidebar/images.html
@@ -0,0 +1,16 @@
+{% if SIDEBAR_IMAGES %}
+ {% from 'includes/sidebar/macros.jinja' import title %}
+
+<!-- Sidebar/Images -->
+<li class="list-group-item">
+ {% if SIDEBAR_IMAGES_HEADER %}
+ <h4>{{ title(SIDEBAR_IMAGES_HEADER, DISABLE_SIDEBAR_TITLE_ICONS, icon='external-link-square') }}</h4>
+ {% endif %}
+ <ul class="list-group" id="links">
+ {% for image in SIDEBAR_IMAGES %}
+ <img width="100%" class="img-thumbnail" src="{{ image }}"/>
+ {% endfor %}
+ </ul>
+</li>
+<!-- End Sidebar/Images -->
+{% endif %}
diff --git a/pelican-bootstrap3/templates/includes/sidebar/links.html b/pelican-bootstrap3/templates/includes/sidebar/links.html
new file mode 100644
index 0000000..179b1a3
--- /dev/null
+++ b/pelican-bootstrap3/templates/includes/sidebar/links.html
@@ -0,0 +1,16 @@
+{% if LINKS %}
+ {% from 'includes/sidebar/macros.jinja' import title %}
+
+<!-- Sidebar/Links -->
+<li class="list-group-item">
+ <h4>{{ title(_('Links'), DISABLE_SIDEBAR_TITLE_ICONS, icon='external-link-square') }}</h4>
+ <ul class="list-group" id="links">
+ {% for name, link in LINKS %}
+ <li class="list-group-item">
+ <a href="{{ link }}" target="_blank">{{ name }}</a>
+ </li>
+ {% endfor %}
+ </ul>
+</li>
+<!-- End Sidebar/Links -->
+{% endif %}
diff --git a/pelican-bootstrap3/templates/includes/sidebar/macros.jinja b/pelican-bootstrap3/templates/includes/sidebar/macros.jinja
new file mode 100644
index 0000000..b830923
--- /dev/null
+++ b/pelican-bootstrap3/templates/includes/sidebar/macros.jinja
@@ -0,0 +1,7 @@
+{% macro title(name, no_icon, icon='home') -%}
+ {%- if no_icon -%}
+ {{ name }}
+ {%- else -%}
+ <i class="fa fa-{{ icon }} fa-lg"></i><span class="icon-label">{{ name }}</span>
+ {%- endif -%}
+{%- endmacro %}
diff --git a/pelican-bootstrap3/templates/includes/sidebar/recent_posts.html b/pelican-bootstrap3/templates/includes/sidebar/recent_posts.html
new file mode 100644
index 0000000..0b301df
--- /dev/null
+++ b/pelican-bootstrap3/templates/includes/sidebar/recent_posts.html
@@ -0,0 +1,19 @@
+{% if DISPLAY_RECENT_POSTS_ON_SIDEBAR %}
+ {% from 'includes/sidebar/macros.jinja' import title %}
+ {% if RECENT_POST_COUNT is not defined %}
+ {% set RECENT_POST_COUNT = 5 %}
+ {% endif %}
+
+<!-- Sidebar/Recent Posts -->
+<li class="list-group-item">
+ <h4>{{ title(_('Recent Posts'), DISABLE_SIDEBAR_TITLE_ICONS) }}</h4>
+ <ul class="list-group" id="recentposts">
+ {% for article in articles[:RECENT_POST_COUNT] %}
+ <li class="list-group-item">
+ {%- include 'includes/sidebar/article-li.html' -%}
+ </li>
+ {% endfor %}
+ </ul>
+</li>
+<!-- End Sidebar/Recent Posts -->
+{% endif %}
diff --git a/pelican-bootstrap3/templates/includes/sidebar/series.html b/pelican-bootstrap3/templates/includes/sidebar/series.html
new file mode 100644
index 0000000..323f8c0
--- /dev/null
+++ b/pelican-bootstrap3/templates/includes/sidebar/series.html
@@ -0,0 +1,24 @@
+{% if DISPLAY_SERIES_ON_SIDEBAR and article and article.series %}
+ {% from 'includes/sidebar/macros.jinja' import title %}
+
+<!-- Sidebar/Series -->
+<li class="list-group-item">
+ <h4>{{ title(_('Series'), DISABLE_SIDEBAR_TITLE_ICONS, icon='tags') }}</h4>
+ <ul class="list-group">
+ {% if article.series.previous %}
+ <li class="list-group-item">
+ <h5></i>{{ _('Previous article') }}</h5>
+ <a href="{{ SITEURL }}/{{ article.series.previous.url }}">{{ article.series.previous.title }}</a>
+ </li>
+ {% endif %}
+ {% if article.series.next %}
+ <li class="list-group-item">
+ <h5>{{ _('Next article') }}</h5>
+ <a href="{{ SITEURL }}/{{ article.series.next.url }}">{{ article.series.next.title }}</a>
+ </li>
+ {% endif %}
+ </ul>
+</li>
+<!-- End Sidebar/Series -->
+
+{% endif %}
diff --git a/pelican-bootstrap3/templates/includes/sidebar/social.html b/pelican-bootstrap3/templates/includes/sidebar/social.html
new file mode 100644
index 0000000..13fb267
--- /dev/null
+++ b/pelican-bootstrap3/templates/includes/sidebar/social.html
@@ -0,0 +1,24 @@
+{% if SOCIAL %}
+ {% from 'includes/sidebar/macros.jinja' import title %}
+
+<!-- Sidebar/Social -->
+<li class="list-group-item">
+ <h4>{{ title(_('Social'), DISABLE_SIDEBAR_TITLE_ICONS) }}</h4>
+ <ul class="list-group" id="social">
+ {% for s in SOCIAL %}
+ {% if s[2] %}
+ {% set name_sanitized = s[2]|lower|replace('+','-plus')|replace(' ','-') %}
+ {% else %}
+ {% set name_sanitized = s[0]|lower|replace('+','-plus')|replace(' ','-') %}
+ {% endif %}
+ {% if name_sanitized in ['flickr', 'slideshare', 'spotify', 'stack-overflow', 'weibo', 'line-chart', 'home', 'user', 'users', 'envelope', 'envelope-o', 'stack-exchange', 'hacker-news'] %}
+ {% set iconattributes = '"fa fa-' ~ name_sanitized ~ ' fa-lg"' %}
+ {% else %}
+ {% set iconattributes = '"fa fa-' ~ name_sanitized ~ '-square fa-lg"' %}
+ {% endif %}
+ <li class="list-group-item"><a href="{{ s[1] }}"><i class={{ iconattributes }}></i> {{ s[0] }}</a></li>
+ {% endfor %}
+ </ul>
+</li>
+<!-- End Sidebar/Social -->
+{% endif %}
diff --git a/pelican-bootstrap3/templates/includes/sidebar/tag_cloud.html b/pelican-bootstrap3/templates/includes/sidebar/tag_cloud.html
new file mode 100644
index 0000000..147432a
--- /dev/null
+++ b/pelican-bootstrap3/templates/includes/sidebar/tag_cloud.html
@@ -0,0 +1,27 @@
+{% if DISPLAY_TAGS_ON_SIDEBAR is not defined %}
+ {% set DISPLAY_TAGS_ON_SIDEBAR = True %}
+{% endif -%}
+
+{% if 'tag_cloud' in PLUGINS and DISPLAY_TAGS_ON_SIDEBAR %}
+ {% from 'includes/sidebar/macros.jinja' import title %}
+ {% if DISPLAY_TAGS_INLINE %}
+ {% set tags = tag_cloud | sort(attribute='0') %}
+ {% else %}
+ {% set tags = tag_cloud | sort(attribute='1') %}
+ {% endif %}
+
+<!-- Sidebar/Tag Cloud -->
+<li class="list-group-item">
+ <a href="{{ SITEURL }}/{{ TAGS_URL }}"><h4>{{ title(_('Tags'), DISABLE_SIDEBAR_TITLE_ICONS, icon='tags') }}</h4></a>
+ <ul class="list-group {% if DISPLAY_TAGS_INLINE %}list-inline tagcloud{% endif %}" id="tags">
+ {% for tag in tags %}
+ <li class="list-group-item tag-{{ tag.1 }}">
+ <a href="{{ SITEURL }}/{{ tag.0.url }}">
+ {{- tag.0 -}}
+ </a>
+ </li>
+ {% endfor %}
+ </ul>
+</li>
+<!-- End Sidebar/Tag Cloud -->
+{% endif %}
diff --git a/pelican-bootstrap3/templates/includes/sidebar/twitter_timeline.html b/pelican-bootstrap3/templates/includes/sidebar/twitter_timeline.html
new file mode 100644
index 0000000..16551a2
--- /dev/null
+++ b/pelican-bootstrap3/templates/includes/sidebar/twitter_timeline.html
@@ -0,0 +1,12 @@
+{% if TWITTER_WIDGET_ID %}
+ {% from 'includes/sidebar/macros.jinja' import title %}
+
+<!-- Sidebar/Twitter Timeline -->
+<li class="list-group-item">
+ <h4>{{ title('Latest Tweets', DISABLE_SIDEBAR_TITLE_ICONS, icon='twitter') }}</h4>
+ <div id="twitter_timeline">
+ <a class="twitter-timeline" data-width="250" data-height="300" data-dnt="true" data-theme="light" href="https://twitter.com/{{TWITTER_USERNAME}}">Tweets by {{TWITTER_USERNAME}}</a> <script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
+ </div>
+</li>
+<!-- End Sidebar/Twitter Timeline -->
+{% endif %}