From baf72cd841a1277e45d37c1fd3a60bd40feb9d5e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Wed, 27 Nov 2019 00:30:38 +0100 Subject: [PATCH] Makes base template clean Move in body template the generic body rules --- Resources/views/base.html.twig | 80 +++------------------------ Resources/views/body.html.twig | 98 ++++++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+), 73 deletions(-) create mode 100644 Resources/views/body.html.twig diff --git a/Resources/views/base.html.twig b/Resources/views/base.html.twig index a95e21a..6045a6e 100644 --- a/Resources/views/base.html.twig +++ b/Resources/views/base.html.twig @@ -1,78 +1,12 @@ - - {% block title %}{{ title }}{% endblock %} - - {% block stylesheet %} - {% stylesheet '//fonts.googleapis.com/css?family=Irish+Grover' '//fonts.googleapis.com/css?family=La+Belle+Aurore' '@RapsysAirBundle/Resources/public/css/{reset,screen}.css' %} - - {% endstylesheet %} - {% endblock %} - - - + {% block metas %}{% endblock %} + {% block title %}Welcome!{% endblock %} + {% block stylesheets %}{% endblock %} - {% block body %} - - {% block header %} - - {% endblock %} - - {# pass an array argument to get the messages of those types (['warning', 'error']) #} - {% for label, messages in app.flashes %} - {% if messages %} -
- -
- {% endif %} - {% endfor %} - - {% block sidebar %}{% endblock %} - - {% block content %}
{% endblock %} - - {% block footer %} - - {% endblock %} - - {% endblock %} + + {% block body %}{% endblock %} + {% block javascripts %}{% endblock %} + diff --git a/Resources/views/body.html.twig b/Resources/views/body.html.twig new file mode 100644 index 0000000..452f70c --- /dev/null +++ b/Resources/views/body.html.twig @@ -0,0 +1,98 @@ +{% extends '@RapsysAir/base.html.twig' %} +{% block metas %} + +{% endblock %} +{% block stylesheets %} + + + + {% for size, icon in site_png %} + {# Apple #} + {% if size in [152, 167, 180] %} + {% if size == 180 %} + + {% endif %} + + {# Windows #} + {% elseif size in [70, 150, 310] %} + + {# Others #} + {% else %} + + {% endif %} + {% endfor %} + {# stylesheet '//fonts.googleapis.com/css?family=Irish+Grover' '//fonts.googleapis.com/css?family=La+Belle+Aurore' '@RapsysAirBundle/Resources/public/css/{reset,screen}.css' #} + {% stylesheet '@rapsys_air_bundle/css/{reset,irishgrover,labelleaurore,screen}.css' %} + + {% endstylesheet %} +{% endblock %} +{% block javascripts %} + {#{% javascript '@RapsysAir/js/*.js' %} + + {% endjavascript %}#} +{% endblock %} +{% block title %}{{ title }}{% 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 %} +
+ +
+ {% endif %} + {% endfor %} + {% endblock %} +{# + {% block sidebar %}{% endblock %} +#} + {% block content %} +
+

{{ section }}

+

{% trans %}Outdoor space reservation system{% endtrans %}

+
+ {% endblock %} + {% block footer %} + + {% endblock %} +{% endblock %} -- 2.41.1