From: Raphaël Gertz Date: Tue, 26 Nov 2019 23:30:38 +0000 (+0100) Subject: Makes base template clean X-Git-Url: https://git.rapsys.eu/airbundle/commitdiff_plain/0c031877779113a6728f6bd6a54d52dad594f00c?hp=face6575364d85f53b5398175699779850dbf8d1 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 %}