From 34c1143204e90e513e77f5492d9d908bfe0fe5f5 Mon Sep 17 00:00:00 2001 From: Alexandre Vicenzi Date: Sat, 22 Apr 2017 03:41:39 -0300 Subject: [PATCH 01/32] Fixes. --- CHANGELOG.md | 4 ++++ README.md | 8 +++++--- templates/article.html | 7 ++++--- templates/authors.html | 1 + templates/base.html | 2 ++ templates/categories.html | 1 + templates/page.html | 1 + templates/partial/cc_license.html | 2 +- templates/partial/copyright.html | 2 +- templates/partial/disqus.html | 2 ++ templates/partial/duoshuo.html | 27 ++++++++++++++++----------- templates/partial/github.html | 18 +++++++++++++++++- templates/partial/gtm.html | 20 +++++++++++++------- templates/partial/og_article.html | 6 +++--- templates/tags.html | 1 + 15 files changed, 72 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89f4030..0f807b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.2.0 + +TODO + ## 2.1.0 - Italian translation [#60](https://github.com/alexandrevicenzi/Flex/issues/60) diff --git a/README.md b/README.md index 4e3f616..fd0a25f 100644 --- a/README.md +++ b/README.md @@ -23,17 +23,19 @@ DON'T send any questions, issues or anything related to Flex to my personal emai - [AddThis](http://www.addthis.com/) Share Buttons and Related Posts - [Disqus](https://disqus.com/) -- [Gauges](http://get.gaug.es/) +- [duoshuo](http://duoshuo.com/) (new in 2.2) +- [Gauges Analytics](http://get.gaug.es/) - [Google AdSense](https://www.google.com.br/adsense/start/) (new in 2.1) - [Google Analytics](https://www.google.com/analytics/web/) - [Google Tag Manager](https://www.google.com/tagmanager/) -- [Piwik](http://piwik.org/) +- [Piwik Analytics](http://piwik.org/) - [StatusCake](https://www.statuscake.com/) -- [Github Corners](https://github.com/tholman/github-corners) (new in 2.2) ## Plugins Support +- [Github Corners](https://github.com/tholman/github-corners) (new in 2.2) - [I18N Sub-sites](https://github.com/getpelican/pelican-plugins/tree/master/i18n_subsites) (new in 2.0) +- [Minute read](https://github.com/getpelican/pelican-plugins/tree/master/post_stats)) (new in 2.0) - [Related Posts](https://github.com/getpelican/pelican-plugins/tree/master/related_posts) - [Representative image](https://github.com/getpelican/pelican-plugins/tree/master/representative_image) (new in 2.2) diff --git a/templates/article.html b/templates/article.html index 004043d..f1e8cb1 100644 --- a/templates/article.html +++ b/templates/article.html @@ -2,12 +2,13 @@ {% block meta %} - - + + + {% include "partial/og_article.html" %} {% endblock %} -{% block title %} – {{ article.title|striptags }}{% endblock %} +{% block title %} – {{ article.title|striptags|escape }}{% endblock %} {% block content %}
diff --git a/templates/authors.html b/templates/authors.html index d802130..46f6bba 100644 --- a/templates/authors.html +++ b/templates/authors.html @@ -1,4 +1,5 @@ {% extends "base.html" %} + {% block title %} – {{ _('Authors') }}{% endblock %} {% block content %} diff --git a/templates/base.html b/templates/base.html index 8f79b77..105a236 100644 --- a/templates/base.html +++ b/templates/base.html @@ -54,6 +54,8 @@ + + {% endif %} {% block meta %} diff --git a/templates/categories.html b/templates/categories.html index 1153874..9b7f29c 100644 --- a/templates/categories.html +++ b/templates/categories.html @@ -1,4 +1,5 @@ {% extends "base.html" %} + {% block title %} – {{ _('Categories') }}{% endblock %} {% block content %} diff --git a/templates/page.html b/templates/page.html index c7fb212..f9c2aac 100644 --- a/templates/page.html +++ b/templates/page.html @@ -1,4 +1,5 @@ {% extends "base.html" %} + {% block title %} – {{ page.title }}{% endblock %} {% block content %} diff --git a/templates/partial/cc_license.html b/templates/partial/cc_license.html index af0ac4c..87dbece 100644 --- a/templates/partial/cc_license.html +++ b/templates/partial/cc_license.html @@ -1,5 +1,5 @@

- © {{ AUTHOR }} {{ COPYRIGHT_YEAR }} - This work is licensed under a {{ CC_LICENSE['name'] }} {{ CC_LICENSE['version'] }} International License + © {{ COPYRIGHT_NAME }} {{ COPYRIGHT_YEAR }} - This work is licensed under a {{ CC_LICENSE['name'] }} {{ CC_LICENSE['version'] }} International License

{% include "partial/flex.html" %}

diff --git a/templates/partial/copyright.html b/templates/partial/copyright.html index ac5e872..5426dfd 100644 --- a/templates/partial/copyright.html +++ b/templates/partial/copyright.html @@ -1,4 +1,4 @@ -

© {{ AUTHOR }} {{ COPYRIGHT_YEAR }}

+

© {{ COPYRIGHT_NAME }} {{ COPYRIGHT_YEAR }}

{% include "partial/flex.html" %} {% if STATUSCAKE %} {% include "partial/statuscake.html" %} diff --git a/templates/partial/disqus.html b/templates/partial/disqus.html index 7fcb403..bcc35fc 100644 --- a/templates/partial/disqus.html +++ b/templates/partial/disqus.html @@ -1,4 +1,5 @@ {% if DISQUS_SITENAME %} +
- {% endif %} \ No newline at end of file + + (function() { + var ds = document.createElement('script'); + ds.type = 'text/javascript';ds.async = true; + ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js'; + ds.charset = 'UTF-8'; + (document.getElementsByTagName('head')[0] + || document.getElementsByTagName('body')[0]).appendChild(ds); + })(); + + + +{% endif %} diff --git a/templates/partial/github.html b/templates/partial/github.html index 3ce4800..98c521d 100644 --- a/templates/partial/github.html +++ b/templates/partial/github.html @@ -1,3 +1,19 @@ - + + diff --git a/templates/partial/gtm.html b/templates/partial/gtm.html index f1b33a0..69d266d 100644 --- a/templates/partial/gtm.html +++ b/templates/partial/gtm.html @@ -1,9 +1,15 @@ - - + + diff --git a/templates/partial/og_article.html b/templates/partial/og_article.html index c2c1cef..31f70b0 100644 --- a/templates/partial/og_article.html +++ b/templates/partial/og_article.html @@ -4,8 +4,8 @@ {% set default_locale = 'en_US' %} {% endif %} - - + + @@ -14,7 +14,7 @@ {% for tag in article.tags %} - + {% endfor %} {% if 'cover' in article.metadata %} diff --git a/templates/tags.html b/templates/tags.html index 1005fa9..df36fda 100644 --- a/templates/tags.html +++ b/templates/tags.html @@ -1,4 +1,5 @@ {% extends "base.html" %} + {% block title %} – {{ _('Tags') }}{% endblock %} {% block content %} From 212f106a554b564ca140593c44615c201e4cb47d Mon Sep 17 00:00:00 2001 From: Alexandre Vicenzi Date: Sat, 22 Apr 2017 03:48:23 -0300 Subject: [PATCH 02/32] Change menu layout. --- static/stylesheet/style.less | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/static/stylesheet/style.less b/static/stylesheet/style.less index bdfe60f..0f8722d 100644 --- a/static/stylesheet/style.less +++ b/static/stylesheet/style.less @@ -125,11 +125,16 @@ main { a { padding: 0 4px 0 4px; + border-left: @nav-border-color 1px solid; border-right: @nav-border-color 1px solid; } :first-child { - border-left: @nav-border-color 1px solid; + border-left: none; + } + + :last-child { + border-right: none; } } From a6f12ec78197f48015e51f765ee3974351e18910 Mon Sep 17 00:00:00 2001 From: Oliver Pratt Date: Sat, 22 Apr 2017 07:54:50 +0100 Subject: [PATCH 03/32] Add support for the neighbors plugin (#98) --- README.md | 1 + static/stylesheet/style.less | 5 +++++ templates/article.html | 2 ++ templates/partial/neighbors.html | 14 ++++++++++++++ tests/pelicanconf.py | 9 +++++---- 5 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 templates/partial/neighbors.html diff --git a/README.md b/README.md index fd0a25f..9c6725d 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ DON'T send any questions, issues or anything related to Flex to my personal emai - [Minute read](https://github.com/getpelican/pelican-plugins/tree/master/post_stats)) (new in 2.0) - [Related Posts](https://github.com/getpelican/pelican-plugins/tree/master/related_posts) - [Representative image](https://github.com/getpelican/pelican-plugins/tree/master/representative_image) (new in 2.2) +- [Neighbors](https://github.com/getpelican/pelican-plugins/tree/master/neighbors) (new in 2.2) ## Install diff --git a/static/stylesheet/style.less b/static/stylesheet/style.less index 0f8722d..2e85900 100644 --- a/static/stylesheet/style.less +++ b/static/stylesheet/style.less @@ -138,6 +138,11 @@ main { } } + .neighbors { + margin: 4% 0% 4% 0%; + height: 20px; + } + .pagination { margin: 4% 8% 4% 8%; height: 20px; diff --git a/templates/article.html b/templates/article.html index f1e8cb1..080aeb2 100644 --- a/templates/article.html +++ b/templates/article.html @@ -57,6 +57,8 @@ {% endif %} + {% include "partial/neighbors.html" %} + {% if article.related_posts %} diff --git a/docs/blog/categories.html b/docs/blog/categories.html index 731a70a..79c3a08 100644 --- a/docs/blog/categories.html +++ b/docs/blog/categories.html @@ -81,7 +81,7 @@ diff --git a/docs/blog/category/news.html b/docs/blog/category/news.html index f0a2c4b..bfd3168 100644 --- a/docs/blog/category/news.html +++ b/docs/blog/category/news.html @@ -81,7 +81,7 @@ diff --git a/docs/blog/flex-pelican-theme-update-1-1-1.html b/docs/blog/flex-pelican-theme-update-1-1-1.html index c39e723..b0db152 100644 --- a/docs/blog/flex-pelican-theme-update-1-1-1.html +++ b/docs/blog/flex-pelican-theme-update-1-1-1.html @@ -90,7 +90,7 @@ diff --git a/docs/blog/flex-pelican-theme-update-1-1.html b/docs/blog/flex-pelican-theme-update-1-1.html index 8b182d6..329af61 100644 --- a/docs/blog/flex-pelican-theme-update-1-1.html +++ b/docs/blog/flex-pelican-theme-update-1-1.html @@ -90,7 +90,7 @@ diff --git a/docs/blog/flex-pelican-theme-update-1-2-0.html b/docs/blog/flex-pelican-theme-update-1-2-0.html index 0c5edba..aa925e6 100644 --- a/docs/blog/flex-pelican-theme-update-1-2-0.html +++ b/docs/blog/flex-pelican-theme-update-1-2-0.html @@ -90,7 +90,7 @@ diff --git a/docs/blog/flex-pelican-theme-update-2-0.html b/docs/blog/flex-pelican-theme-update-2-0.html index cb3c26c..9e81fcd 100644 --- a/docs/blog/flex-pelican-theme-update-2-0.html +++ b/docs/blog/flex-pelican-theme-update-2-0.html @@ -90,7 +90,7 @@ diff --git a/docs/blog/flex-pelican-theme-update-2-1.html b/docs/blog/flex-pelican-theme-update-2-1.html index 66aed74..7c267a9 100644 --- a/docs/blog/flex-pelican-theme-update-2-1.html +++ b/docs/blog/flex-pelican-theme-update-2-1.html @@ -90,7 +90,7 @@ diff --git a/docs/blog/flex-pelican-theme.html b/docs/blog/flex-pelican-theme.html index 3e39604..d8bf268 100644 --- a/docs/blog/flex-pelican-theme.html +++ b/docs/blog/flex-pelican-theme.html @@ -90,7 +90,7 @@ diff --git a/docs/blog/index.html b/docs/blog/index.html index ab85d4f..acdb562 100644 --- a/docs/blog/index.html +++ b/docs/blog/index.html @@ -80,7 +80,7 @@ diff --git a/docs/blog/pages/about.html b/docs/blog/pages/about.html index a6afe69..ffd0bdb 100644 --- a/docs/blog/pages/about.html +++ b/docs/blog/pages/about.html @@ -80,7 +80,7 @@ diff --git a/docs/blog/pages/contact.html b/docs/blog/pages/contact.html index 4c1bc7e..175792d 100644 --- a/docs/blog/pages/contact.html +++ b/docs/blog/pages/contact.html @@ -80,7 +80,7 @@ diff --git a/docs/blog/tag/pelican.html b/docs/blog/tag/pelican.html index 3cbb204..0c36a90 100644 --- a/docs/blog/tag/pelican.html +++ b/docs/blog/tag/pelican.html @@ -81,7 +81,7 @@ diff --git a/docs/blog/tag/python.html b/docs/blog/tag/python.html index 8109646..2d221cc 100644 --- a/docs/blog/tag/python.html +++ b/docs/blog/tag/python.html @@ -81,7 +81,7 @@ diff --git a/docs/blog/tag/theme.html b/docs/blog/tag/theme.html index 007e952..ff84ba0 100644 --- a/docs/blog/tag/theme.html +++ b/docs/blog/tag/theme.html @@ -81,7 +81,7 @@ diff --git a/docs/blog/tags.html b/docs/blog/tags.html index fe1ce51..119f1cb 100644 --- a/docs/blog/tags.html +++ b/docs/blog/tags.html @@ -81,7 +81,7 @@ diff --git a/docs/pelicanconf.py b/docs/pelicanconf.py index debd510..f844502 100644 --- a/docs/pelicanconf.py +++ b/docs/pelicanconf.py @@ -41,7 +41,7 @@ HOME_HIDE_TAGS = True SOCIAL = ( ('github', 'https://github.com/alexandrevicenzi/Flex'), - ('rss', '/feeds/all.atom.xml'), + ('rss', '/blog/feeds/all.atom.xml'), ) MENUITEMS = (('Archives', '/archives.html'), From 656be15154822db478b573021e4355641cd2b896 Mon Sep 17 00:00:00 2001 From: olipratt Date: Sat, 24 Feb 2018 13:59:51 +0000 Subject: [PATCH 23/32] Close the addthis relatedposts div, and only include it if addthis is enabled in config --- templates/article.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/article.html b/templates/article.html index 83fafa9..243b1f5 100644 --- a/templates/article.html +++ b/templates/article.html @@ -72,8 +72,8 @@ {% endfor %} - {% else %} - - - - - - +
ls *.jpg | xargs -n1 -i cp {} /external-hard-drive/directory
+
+ +

Note: The code block looks like GitHub’s colors.

You can add tables too:

@@ -233,7 +237,7 @@ Swap: 20480 1267 19213 -