From: Raphaël Gertz Date: Tue, 26 Nov 2019 23:30:38 +0000 (+0100) Subject: Makes base template clean X-Git-Tag: 0.1.1~75 X-Git-Url: https://git.rapsys.eu/.gitweb.cgi/airbundle/commitdiff_plain/baf72cd841a1277e45d37c1fd3a60bd40feb9d5e?hp=7a56f5fca86c3f68343df9ed21b3e0388e59702b Makes base template clean Move in body template the generic body rules --- 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 %}