- {% block metas %}
+
+
+ {% block head %}
- {{ head['title'] }}
+ {{ head.title }}
-{#TODO: deal with unset head['description'] and set description #}
- {% if head['description'] is defined and head['description'] %}
-
+ {% if head.description is defined and head.description %}
+
{% endif %}
- {% if head['keywords'] is defined and head['keywords'] %}
-
+ {% if head.keywords is defined and head.keywords %}
+
{% endif %}
- {% if head['facebook'] is defined and head['facebook'] %}
- {% for property, contents in head['facebook'] %}
+ {% if head.facebook is defined and head.facebook %}
+ {% for property, contents in head.facebook %}
{% if contents is iterable %}
{% for content in contents %}
@@ -23,64 +22,68 @@
{% endif %}
{% endfor %}
{% endif %}
- {% endblock %}
- {% block links %}
- {% if site is defined and site is not empty %}
-
-
- {% for size, icon in site.icon.png %}
- {# Apple #}
- {% if size in [120, 152, 167, 180] %}
- {% if size == 180 %}
-
+ {% block link %}
+ {% if head.icon.ico is defined and head.icon.ico is not empty %}
+
+ {% endif %}
+ {% if head.icon.png is defined and head.icon.png is not empty %}
+ {% for size, icon in head.icon.png %}
+ {# Apple #}
+ {% if size in [120, 152, 167, 180] %}
+ {% if size == 180 %}
+
+ {% endif %}
+
+ {# Windows #}
+ {% elseif size in [70, 150, 310] %}
+
+ {# Others #}
+ {% else %}
+
{% endif %}
-
- {# Windows #}
- {% elseif size in [70, 150, 310] %}
-
- {# Others #}
- {% else %}
-
- {% endif %}
- {% endfor %}
- {% endif %}
- {# stylesheet '//fonts.googleapis.com/css?family=Irish+Grover' '//fonts.googleapis.com/css?family=La+Belle+Aurore' '@RapsysBlogBundle/Resources/public/css/{reset,screen}.css' #}
- {% stylesheet '@RapsysBlog/css/{reset,droidsans,lemon,notoemoji,screen}.css' %}
-
- {% endstylesheet %}
- {% stopwatch 'stylesheet' %}
- {% endstopwatch %}
- {% if head["canonical"] is defined and head['canonical'] %}
-
- {% endif %}
- {% if head['alternates'] is defined and head['alternates'] %}
- {% for lang, alternate in head['alternates'] %}
-
- {% endfor %}
- {% endif %}
- {% if head.prev is defined and head.prev %}
-
- {% endif %}
- {% if head.next is defined and head.next %}
-
- {% endif %}
+ {% endfor %}
+ {% endif %}
+ {% if head.icon.svg is defined and head.icon.svg is not empty %}
+
+ {% endif %}
+ {# stylesheet '//fonts.googleapis.com/css?family=Irish+Grover' '//fonts.googleapis.com/css?family=La+Belle+Aurore' '@RapsysBlogBundle/Resources/public/css/{reset,screen}.css' #}
+ {% stylesheet '@RapsysBlog/css/{reset,droidsans,lemon,notoemoji,screen}.css' %}
+
+ {% endstylesheet %}
+ {% stopwatch 'stylesheet' %}
+ {% endstopwatch %}
+ {% if head.canonical is defined and head.canonical %}
+
+ {% endif %}
+ {% if head.alternates is defined and head.alternates %}
+ {% for lang, alternate in head.alternates %}
+
+ {% endfor %}
+ {% endif %}
+ {% if head.prev is defined and head.prev %}
+
+ {% endif %}
+ {% if head.next is defined and head.next %}
+
+ {% endif %}
+ {% endblock %}
{% endblock %}
{% block body %}
{% block header %}
-
-
- {{ site.title }}
+
+
+ {{ head.site }}
- {#
- {% block site_subtitle %}{% endblock %}
+ {#{% block site_subtitle %}{% endblock %}
{% block site_tagline %}
{% if tags is defined and tags %}
@@ -99,32 +101,30 @@
{% endfor %}
{% endif %}
- {% endblock %}
- #}
+ {% endblock %}#}
{% endblock %}
{% block message %}
{# pass an array argument to get the messages of those types (['warning', 'error']) #}
{% for label, messages in app.flashes %}
{% if messages %}
-
{% endblock %}
@@ -135,17 +135,17 @@
{{ copy.long }}{{ copy.short }} {{ copy.by }}
{% endif %}
{#{% trans %}Terms of service{% endtrans %}#}
- {% if alternates is defined and alternates %}
- {% set langs = alternates|keys|filter(v => v|length == 5) %}
+ {% if head.alternates is defined and head.alternates %}
+ {% set langs = head.alternates|keys|filter(v => v|length == 5) %}
{% if langs|length > 1 %}