X-Git-Url: https://git.rapsys.eu/blogbundle/blobdiff_plain/dc70caa8cbbe65ade709c761a506bbf9287e57c6..71c7bfea3fba239721455861c4f430a3e7ec424a:/Resources/views/_base.html.twig diff --git a/Resources/views/_base.html.twig b/Resources/views/_base.html.twig index b32551f..0b103c0 100644 --- a/Resources/views/_base.html.twig +++ b/Resources/views/_base.html.twig @@ -1,34 +1,20 @@ - - - {% block metas %} - - {{ head['title'] }} + + + {% block meta %}{% endblock %} + {% block title %}{{ [title.page, title.section, title.site]|filter(v => v)|join(' - ') }}{% endblock %} + {% block stylesheet %} -{#TODO: deal with unset head['description'] and set description #} - {% if head['description'] is defined and head['description'] %} - + {% if description is defined and description %} + {% endif %} - {% if head['keywords'] is defined and head['keywords'] %} - + {% if keywords is defined and keywords %} + {% endif %} - {% if head['facebook'] is defined and head['facebook'] %} - {% for property, contents in head['facebook'] %} - {% if contents is iterable %} - {% for content in contents %} - - {% endfor %} - {% else %} - - {% endif %} - {% endfor %} - {% endif %} - {% endblock %} - {% block links %} - {% if site is defined and site is not empty %} - - - {% for size, icon in site.icon.png %} + {% if icon is defined and icon %} + + + {% for size, icon in icon.png %} {# Apple #} {% if size in [120, 152, 167, 180] %} {% if size == 180 %} @@ -44,25 +30,36 @@ {% 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' %} + {# stylesheet '//fonts.googleapis.com/css?family=Irish+Grover' '//fonts.googleapis.com/css?family=La+Belle+Aurore' '@RapsysBlogBundle/css/{reset,screen}.css' #} + {% stylesheet '@RapsysBlog/css/{reset,droidsans,lemon,notoemoji,screen}.css' %} + + {% endstylesheet %} {% endstopwatch %} - {% if head["canonical"] is defined and head['canonical'] %} - + {% if canonical is defined and canonical %} + {% endif %} - {% if head['alternates'] is defined and head['alternates'] %} - {% for lang, alternate in head['alternates'] %} + {% if alternates is defined and alternates %} + {% for lang, alternate in alternates %} {% endfor %} {% endif %} - {% if head.prev is defined and head.prev %} - + {% if prev is defined and prev %} + {% endif %} - {% if head.next is defined and head.next %} - + {% if next is defined and next %} + + {% endif %} + {% if facebook is defined and facebook %} + {% for property, contents in facebook %} + {% if contents is iterable %} + {% for content in contents %} + + {% endfor %} + {% else %} + + {% endif %} + {% endfor %} {% endif %} {% endblock %} @@ -70,89 +67,94 @@ {% block body %} {% block header %} {% endblock %} {% block message %} {# pass an array argument to get the messages of those types (['warning', 'error']) #} {% for label, messages in app.flashes %} {% if messages %} -
+
    {% for message in messages %}
  • {{ message }}
  • {% endfor %}
-
+ {% endif %} {% endfor %} {% endblock %} - {% endblock %} -{# - {% block sidebar %}{% endblock %} -#} - {% block content %} - - {% endblock %} - {% block footer %} - + {% endblock %} {% endblock %} - {% block javascripts %} + {% block javascript %} {% stopwatch 'javascript' %} {#{% javascript '@RapsysBlog/js/*.js' %}