diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d90b67..f6e3a75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,18 @@ +# v1.2.1 +## 01/19/2021 + +1. [](#improved) + * Fixed autoescaping in preparation for Grav 1.7 + +# v1.2.0 +## 03/21/2019 + +1. [](#new) + * Set Dependency of Grav 1.5.10+ which has support for new **Deferred Block** Twig extension + * Implement assets rendering using **Deferred Block** Twig extension +1. [](#improved) + * Added twig `t` filter for submit button translation in comments form + # v1.1.0 ## 07/14/2016 @@ -7,7 +22,7 @@ * Use https for Gravatar request as default 1. [](#bugfix) * Fix setting the page language in the html tag - * Fixed pagination + * Fixed pagination * Use the correct parameter separator in the blog post template # v1.0.1 diff --git a/blueprints.yaml b/blueprints.yaml index cacc4db..0a849c5 100644 --- a/blueprints.yaml +++ b/blueprints.yaml @@ -1,5 +1,7 @@ name: disrootblog -version: 1.1.0 +slug: disrootblog +type: theme +version: 1.2.1 description: "A clean and simple theme for bloggers, with responsive design and beautiful typography." icon: group author: @@ -11,3 +13,5 @@ demo: http://demo.getgrav.org/lingonberry-skeleton keywords: lingonberry, theme, onepage, modern, fast, responsive, html5, css3 bugs: https://github.com/getgrav/grav-theme-lingonberry/issues license: GPL +dependencies: + - { name: grav, version: '>=1.5.10' } diff --git a/templates/blog.html.twig b/templates/blog.html.twig index b19228e..fd21acd 100644 --- a/templates/blog.html.twig +++ b/templates/blog.html.twig @@ -14,7 +14,7 @@ {% block content %} - {{ page.content }} + {{ page.content|raw }} {% for child in collection %} {% include 'partials/blog_item.html.twig' with {'page':child, 'truncate':true} %} {% endfor %} diff --git a/templates/default.html.twig b/templates/default.html.twig index 3f3b600..bf8c2c8 100644 --- a/templates/default.html.twig +++ b/templates/default.html.twig @@ -7,7 +7,7 @@

{{ page.header.title }}

- {{ page.content }} + {{ page.content|raw }}
diff --git a/templates/error.html.twig b/templates/error.html.twig index 7c8a735..03f91fc 100644 --- a/templates/error.html.twig +++ b/templates/error.html.twig @@ -7,7 +7,7 @@

Error {{ page.header.http_response_code }}

- {{ page.content }} + {{ page.content|raw }}
diff --git a/templates/form.html.twig b/templates/form.html.twig index 7e85af3..16b9e46 100644 --- a/templates/form.html.twig +++ b/templates/form.html.twig @@ -7,7 +7,7 @@

{{ page.header.title }}

- {{ content }} + {{ content|raw }}
{% if config.plugins.form.enabled %} {% include "forms/form.html.twig" %} diff --git a/templates/formdata.html.twig b/templates/formdata.html.twig index 711eb5c..36244d2 100644 --- a/templates/formdata.html.twig +++ b/templates/formdata.html.twig @@ -7,7 +7,7 @@

{{ form.message }}

- {{ content }} + {{ content|raw }}
{% if config.plugins.form.enabled %} {% include "forms/data.html.twig" %} diff --git a/templates/partials/base.html.twig b/templates/partials/base.html.twig index 4b90aa6..28ce97f 100644 --- a/templates/partials/base.html.twig +++ b/templates/partials/base.html.twig @@ -2,50 +2,53 @@ {% block head %} - - {% if header.title %}{{ header.title }} | {% endif %}{{ site.title }} - {% include 'partials/metadata.html.twig' %} - - + + {% if header.title %}{{ header.title }} | {% endif %}{{ site.title }} + {% include 'partials/metadata.html.twig' %} + + - {% block stylesheets %} - {% do assets.addCss('theme://css/widget.css') %} - {% do assets.addCss('theme://css/style.css') %} + {% block stylesheets %} + {% do assets.addCss('theme://css/widget.css') %} + {% do assets.addCss('theme://css/style.css') %} {% do assets.addCss('theme://css/media-queries.css') %} - {% do assets.addCss('theme://css/content.css') %} - {% do assets.addCss('theme://css/sidebar.css') %} - {% do assets.addCss('theme://css/lightbox.css') %} - {% if browser.getBrowser == 'msie' and browser.getVersion >= 7 and browser.getVersion <= 8 %} - {% do assets.addCss('theme://css/ie.css') %} - {% endif %} - {% endblock %} - {{ assets.css() }} + {% do assets.addCss('theme://css/content.css') %} + {% do assets.addCss('theme://css/sidebar.css') %} + {% do assets.addCss('theme://css/lightbox.css') %} + {% if browser.getBrowser == 'msie' and browser.getVersion >= 7 and browser.getVersion <= 8 %} + {% do assets.addCss('theme://css/ie.css') %} + {% endif %} + {% endblock %} - {% block javascripts %} - {% do assets.add('jquery',101) %} - {% endblock %} - {{ assets.js() }} + {% block javascripts %} + {% do assets.add('jquery',101) %} + {% endblock %} - {% if site.calendar %} - - + - {% endif %} + }); + + {% endif %} + + {% block assets deferred %} + {{ assets.css()|raw }} + {{ assets.js()|raw }} + {% endblock %} {% endblock head %} {% block navigation %} - {% include 'partials/navigation.html.twig' %} + {% include 'partials/navigation.html.twig' %} {% endblock %} {% block header %} {% include 'partials/header.html.twig' %} @@ -65,5 +68,8 @@ - - + {% block bottom %} + {{ assets.js('bottom')|raw }} + {% endblock %} + + diff --git a/templates/partials/blog_item.html.twig b/templates/partials/blog_item.html.twig index 3331f35..8012f86 100644 --- a/templates/partials/blog_item.html.twig +++ b/templates/partials/blog_item.html.twig @@ -53,7 +53,7 @@ {% endif %} {% if page.media.images|first and not page.header.slideshow %} - {{ page.media.images|first.cropZoom(750,422).html('','', 'thumb') }} + {{ page.media.images|first.cropZoom(750,422).html('','', 'thumb')|raw }} {% endif %} {% if page.header.description %}
@@ -100,7 +100,7 @@ / {% if page.taxonomy.tag %} {% for tag in page.taxonomy.tag %} - + {% endfor %} {% endif %}
@@ -111,16 +111,16 @@
{% if page.header.type != 'quote' and page.header.type != 'video' and page.header.type != 'link' and page.header.type != 'chat' and page.header.type != 'aside' %} {% if page.header.continue_link is sameas(false) %} - {{ page.content }} + {{ page.content|raw }} {% if not truncate %} {% set show_prev_next = true %} {% endif %} {% elseif truncate and page.summary != page.content %} - {{ page.summary }} + {{ page.summary|raw }} {% elseif truncate %} - {{ page.content|truncate(550) }} + {{ page.content|truncate(550)|raw }} {% else %} - {{ page.content }} + {{ page.content|raw }} {% set show_prev_next = true %} {% endif %}

@@ -131,7 +131,7 @@ {% endif %}

{% else %} - {{ page.content }} + {{ page.content|raw }} {% endif %}
diff --git a/templates/partials/comments.html.twig b/templates/partials/comments.html.twig index a77125c..1700918 100644 --- a/templates/partials/comments.html.twig +++ b/templates/partials/comments.html.twig @@ -41,7 +41,7 @@

{% for button in grav.config.plugins.comments.form.buttons %} - + {% endfor %}

diff --git a/templates/partials/relatedpages.html.twig b/templates/partials/relatedpages.html.twig index 17bafc7..b9f10c0 100644 --- a/templates/partials/relatedpages.html.twig +++ b/templates/partials/relatedpages.html.twig @@ -3,7 +3,7 @@ {% if related %}
{% if related.media.images|first %} - {{ related.media.images|first.forceResize(230,160).html }} + {{ related.media.images|first.forceResize(230,160).html|raw }} {% else %} {{ related.title }} diff --git a/templates/tagcloud.html.twig b/templates/tagcloud.html.twig index ce207f2..1d03ebd 100644 --- a/templates/tagcloud.html.twig +++ b/templates/tagcloud.html.twig @@ -20,7 +20,7 @@ {% elseif percent >= 50 and percent < 80 %} {% set class = 'large' %} {% endif %} - {{ tax }} + {{ tax }} {% endif %} {% endfor %}