diff options
Diffstat (limited to 'pelican-bootstrap3')
8 files changed, 69 insertions, 3 deletions
diff --git a/pelican-bootstrap3/README.md b/pelican-bootstrap3/README.md index 02a130a..b5ad5f7 100644 --- a/pelican-bootstrap3/README.md +++ b/pelican-bootstrap3/README.md @@ -38,6 +38,14 @@ plugin: `PLUGIN_PATHS = ['/path/to/git/pelican-plugins']` `PLUGINS = ['i18n_subsites']` +If you are using +[`i18n_subsites`](https://github.com/getpelican/pelican-plugins/tree/master/i18n_subsites) +and you are not using English as your default language, make sure to +also correctly specify the default language of the theme. Otherwise +the translations will not be used on your default site. + +`I18N_TEMPLATES_LANG = 'en'` + ## Usage This theme honors the following standard Pelican settings: @@ -251,6 +259,8 @@ icon to show. You can provide an alternative icon string as the third string (as * **Categories** will be shown if `DISPLAY_CATEGORIES_ON_SIDEBAR` is set to _True_ * **Recent Posts** will be shown if `DISPLAY_RECENT_POSTS_ON_SIDEBAR` is set to _True_ * Use `RECENT_POST_COUNT` to control the amount of recent posts. Defaults to **5** +* **Archive** will be shown if `DISPLAY_ARCHIVE_ON_SIDEBAR` is set to _True_ and `MONTH_ARCHIVE_SAVE_AS` is set up properly. +* **Authors** will be shown if `DISPLAY_AUTHORS_ON_SIDEBAR` is set to _True_ Other sidebar related options include: @@ -351,6 +361,10 @@ All you have to do, is: By default, the Tipue search page is configured at "/search.html", but you can override that with the `SEARCH_URL` setting, which comes in handy if you have fancy rewrite rules in your Apache or Nginx configuration. +### Flattr + +This theme has support for linking your domain with [Flattr](https://flattr.com). To enable this provide your `FLATTR_ID`. Be aware that you will also have to go [Flattr's domain settings](https://flattr.com/settings/domains) and link your domain. + ### Footer The footer will display a copyright message using the AUTHOR variable and the year of the latest post. If a content license mark is enabled (see above), that will be shown as well. diff --git a/pelican-bootstrap3/templates/base.html b/pelican-bootstrap3/templates/base.html index 195934b..9a69baf 100644 --- a/pelican-bootstrap3/templates/base.html +++ b/pelican-bootstrap3/templates/base.html @@ -53,6 +53,11 @@ {# Twitter Cards tags #} {% include 'includes/twitter_cards.html' %} + {# Flattr ID for the Flattr browser plug-in #} + {% if FLATTR_ID %} + <meta name="flattr:id" content="m1qj28"> + {% endif %} + <!-- Bootstrap --> {% if BOOTSTRAP_THEME %} <link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/bootstrap.{{ BOOTSTRAP_THEME }}.min.css" type="text/css"/> diff --git a/pelican-bootstrap3/templates/includes/cc-license.html b/pelican-bootstrap3/templates/includes/cc-license.html index fca507d..84f204d 100644 --- a/pelican-bootstrap3/templates/includes/cc-license.html +++ b/pelican-bootstrap3/templates/includes/cc-license.html @@ -26,7 +26,7 @@ {# The parameters all mirror the Creative Commone license chooser: #} {# https://creativecommons.org/choose/ #} {# ------------------------------------------------------------------------ #} -{# Copyright (c) 1994 Hilmar Lapp, hlapp@drycafe.net. #} +{# Copyright (c) 2014 Hilmar Lapp, hlapp@drycafe.net. #} {# Licensed under the terms of the MIT License. #} {# Source at http://github.com/hlapp/cc-tools. Please fork & contribute. #} {# ------------------------------------------------------------------------ #} diff --git a/pelican-bootstrap3/templates/includes/liquid_tags_nb_header.html b/pelican-bootstrap3/templates/includes/liquid_tags_nb_header.html index 5dc6d1c..635c6fb 100644 --- a/pelican-bootstrap3/templates/includes/liquid_tags_nb_header.html +++ b/pelican-bootstrap3/templates/includes/liquid_tags_nb_header.html @@ -143,7 +143,7 @@ div.collapseheader { </style> -<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML" type="text/javascript"></script> +<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML" type="text/javascript"></script> <script type="text/javascript"> init_mathjax = function() { if (window.MathJax) { diff --git a/pelican-bootstrap3/templates/includes/sidebar.html b/pelican-bootstrap3/templates/includes/sidebar.html index 7772ff8..71bab3a 100644 --- a/pelican-bootstrap3/templates/includes/sidebar.html +++ b/pelican-bootstrap3/templates/includes/sidebar.html @@ -10,7 +10,9 @@ {% include 'includes/sidebar/github.html' %} {% include 'includes/sidebar/twitter_timeline.html' %} {% include 'includes/sidebar/links.html' %} + {% include 'includes/sidebar/authors.html' %} {% include 'includes/sidebar/images.html' %} + {% include 'includes/sidebar/archive.html' %} {% include 'includes/sidebar/optional_bottom.html' ignore missing %} </ul> </section> diff --git a/pelican-bootstrap3/templates/includes/sidebar/archive.html b/pelican-bootstrap3/templates/includes/sidebar/archive.html new file mode 100644 index 0000000..881897b --- /dev/null +++ b/pelican-bootstrap3/templates/includes/sidebar/archive.html @@ -0,0 +1,23 @@ +{% if DISPLAY_ARCHIVE_ON_SIDEBAR and MONTH_ARCHIVE_SAVE_AS %} + {% from 'includes/sidebar/macros.jinja' import title %} + +<!-- Sidebar/Archive --> +<li class="list-group-item"> + <h4>{{ title(_('Archive'), DISABLE_SIDEBAR_TITLE_ICONS) }}</h4> + <ul class="list-group" id="archive"> + {% for year, date_year in dates|groupby( 'date.year' )|sort(reverse=True) %} + {% for month, articles in date_year|groupby( 'date.month' )|sort(reverse=True) %} + <li class="list-group-item"> + <a href="{{ SITEURL }}/{{ MONTH_ARCHIVE_SAVE_AS.format(date=articles[0].date) }}"> + {%- if not DISABLE_SIDEBAR_TITLE_ICONS -%} + <i class="fa fa-calendar fa-lg"></i> + {%- endif -%} + {{ articles[0].date.strftime('%B') }} {{ year }} ({{ articles|count }}) + </a> + </li> + {% endfor %} + {% endfor %} + </ul> +</li> +<!-- End Sidebar/Archive --> +{% endif %} diff --git a/pelican-bootstrap3/templates/includes/sidebar/authors.html b/pelican-bootstrap3/templates/includes/sidebar/authors.html new file mode 100644 index 0000000..114c688 --- /dev/null +++ b/pelican-bootstrap3/templates/includes/sidebar/authors.html @@ -0,0 +1,22 @@ +{% if DISPLAY_AUTHORS_ON_SIDEBAR %} + {% from 'includes/sidebar/macros.jinja' import title %} + +<!-- Sidebar/Authors --> +<li class="list-group-item"> + <h4>{{ title(_('Authors'), DISABLE_SIDEBAR_TITLE_ICONS) }}</h4> + <ul class="list-group" id="authors"> + {% for author, articles in authors|sort %} + <li class="list-group-item"> + <a href="{{ SITEURL }}/{{ author.url }}"> + {%- if not DISABLE_SIDEBAR_TITLE_ICONS -%} + <i class="fa fa-user fa-lg"></i> + {%- endif -%} + {{- author -}} + </a> + ({{ articles|count }}) + </li> + {% endfor %} + </ul> +</li> +<!-- End Sidebar/Authors --> +{% endif %} diff --git a/pelican-bootstrap3/templates/includes/sidebar/social.html b/pelican-bootstrap3/templates/includes/sidebar/social.html index 3b768db..cca9b71 100644 --- a/pelican-bootstrap3/templates/includes/sidebar/social.html +++ b/pelican-bootstrap3/templates/includes/sidebar/social.html @@ -11,7 +11,7 @@ {% else %} {% set name_sanitized = s[0]|lower|replace('+','-plus')|replace(' ','-') %} {% endif %} - {% if name_sanitized in ['flickr', 'slideshare', 'instagram', 'spotify', 'stack-overflow', 'weibo', 'line-chart', 'home', 'user', 'users', 'envelope', 'envelope-o', 'stack-exchange', 'hacker-news'] %} + {% if name_sanitized in ['flickr', 'slideshare', 'instagram', 'spotify', 'stack-overflow', 'weibo', 'line-chart', 'home', 'user', 'users', 'envelope', 'envelope-o', 'stack-exchange', 'hacker-news', 'gitlab'] %} {% set iconattributes = '"fa fa-' ~ name_sanitized ~ ' fa-lg"' %} {% else %} {% set iconattributes = '"fa fa-' ~ name_sanitized ~ '-square fa-lg"' %} |