From dc70caa8cbbe65ade709c761a506bbf9287e57c6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Fri, 10 Nov 2023 12:31:17 +0100 Subject: [PATCH] Fix included template name --- Resources/views/_base.html.twig | 163 ++++++++++++++++++++++++++++++++ Resources/views/base.html.twig | 25 ----- 2 files changed, 163 insertions(+), 25 deletions(-) create mode 100644 Resources/views/_base.html.twig delete mode 100644 Resources/views/base.html.twig diff --git a/Resources/views/_base.html.twig b/Resources/views/_base.html.twig new file mode 100644 index 0000000..b32551f --- /dev/null +++ b/Resources/views/_base.html.twig @@ -0,0 +1,163 @@ + + + + {% block metas %} + + {{ head['title'] }} + +{#TODO: deal with unset head['description'] and set description #} + {% if head['description'] is defined and head['description'] %} + + {% endif %} + {% if head['keywords'] is defined and head['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 %} + {# Apple #} + {% if size in [120, 152, 167, 180] %} + {% if size == 180 %} + + {% 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 %} + {% endblock %} + + + {% 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 %} + {% block javascripts %} + {% stopwatch 'javascript' %} + {#{% javascript '@RapsysBlog/js/*.js' %} + + {% endjavascript %}#} + {% endstopwatch %} + {% endblock %} + + diff --git a/Resources/views/base.html.twig b/Resources/views/base.html.twig deleted file mode 100644 index 37ec4a1..0000000 --- a/Resources/views/base.html.twig +++ /dev/null @@ -1,25 +0,0 @@ - - - - - {% block title %}{{ title }}{% endblock %} - - {% block stylesheet %} - {% stylesheet '//fonts.googleapis.com/css?family=Irish+Grover' '//fonts.googleapis.com/css?family=La+Belle+Aurore' '@RapsysBlogBundle/Resources/public/css/{reset,screen}.css' %} - - {% endstylesheet %} - {% endblock %} - - - - {% block alternate %} - - - {% endblock %} - - {% block body %}{% endblock %} - -- 2.41.1