From 74e838dd67cc8d9d98797d3d68159e275a049e32 Mon Sep 17 00:00:00 2001 From: Kirill K Date: Tue, 10 Oct 2017 07:37:48 +0300 Subject: Add js to base template --- pelican-bootstrap3/templates/base.html | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pelican-bootstrap3') diff --git a/pelican-bootstrap3/templates/base.html b/pelican-bootstrap3/templates/base.html index 9a69baf..873cd08 100644 --- a/pelican-bootstrap3/templates/base.html +++ b/pelican-bootstrap3/templates/base.html @@ -207,6 +207,10 @@ +{% if CUSTOM_JS %} + +{% endif %} + {% if BANNER %} {% endif %} -- cgit From 8e5f8260de341bfa2255854ddf6f8f216adbdd85 Mon Sep 17 00:00:00 2001 From: Kirill K Date: Tue, 10 Oct 2017 07:38:00 +0300 Subject: Add readme changes --- pelican-bootstrap3/README.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'pelican-bootstrap3') diff --git a/pelican-bootstrap3/README.md b/pelican-bootstrap3/README.md index b5ad5f7..ccf739d 100644 --- a/pelican-bootstrap3/README.md +++ b/pelican-bootstrap3/README.md @@ -88,26 +88,31 @@ of the article and in the index of articles. Set `SHOW_ARTICLE_CATEGORY` to show the Category of each article. Set `SHOW_DATE_MODIFIED` to True to show the article modified date next to the published date. -### Custom CSS +### Custom CSS/JS -If you want to add custom css to the theme, without having to clone and -maintain your own version of the theme, you can use the `CUSTOM_CSS` variable. +If you want to add custom css/js to the theme, without having to clone and +maintain your own version of the theme, you can use `CUSTOM_CSS` and `CUSTOM_JS` variables. The value is the location where you tell Pelican to put the file (see below): ``` -CUSTOM_CSS = 'static/custom.css' +CUSTOM_CSS = 'static/css/custom.css' +CUSTOM_JS = 'static/js/custom.js' ``` To tell Pelican to copy the relevant file to the desired destination, add the path to `STATIC_PATHS` and the destination to `EXTRA_PATH_METADATA`, like so: ``` -# Tell Pelican to add 'extra/custom.css' to the output dir -STATIC_PATHS = ['images', 'extra/custom.css'] +# Tell Pelican to add files from 'extra' to the output dir +STATIC_PATHS = [ + 'images', + 'extra' +] # Tell Pelican to change the path to 'static/custom.css' in the output dir EXTRA_PATH_METADATA = { - 'extra/custom.css': {'path': 'static/custom.css'} + 'extra/custom.css': {'path': 'static/css/custom.css'}, + 'extra/custom.js': {'path': 'static/js/custom.js'} } ``` -- cgit From 277d36db50e1c1f4e2714f94c44aa2cb065244c0 Mon Sep 17 00:00:00 2001 From: Kirill K Date: Tue, 10 Oct 2017 10:24:37 +0300 Subject: Fix VK sidear logo --- pelican-bootstrap3/templates/includes/sidebar/social.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pelican-bootstrap3') diff --git a/pelican-bootstrap3/templates/includes/sidebar/social.html b/pelican-bootstrap3/templates/includes/sidebar/social.html index cca9b71..a4bdc91 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', 'gitlab'] %} + {% if name_sanitized in ['flickr', 'slideshare', 'instagram', 'spotify', 'stack-overflow', 'weibo', 'line-chart', 'home', 'user', 'users', 'envelope', 'envelope-o', 'stack-exchange', 'hacker-news', 'gitlab', 'vk'] %} {% set iconattributes = '"fa fa-' ~ name_sanitized ~ ' fa-lg"' %} {% else %} {% set iconattributes = '"fa fa-' ~ name_sanitized ~ '-square fa-lg"' %} -- cgit