base.html.twig 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>{% block title %}Test application{% endblock %}</title>
  6. {% block stylesheets -%}
  7. <link rel="stylesheet" href="{{ absolute_url(asset('styles/app.css')) }}" />
  8. {% endblock %}
  9. </head>
  10. <body>
  11. <div id="sidebar">
  12. {% block sidebar %}
  13. {# Note: asset() is only available with composer require asset #}
  14. <img src="{{ asset('images/wikimedia.jpeg') }}" class="logo" alt="Logo Wikimedia" />
  15. <ul>
  16. <li><a href="{{ path('front') }}">Home</a></li>
  17. <li><a href="{{ url('blog_list') }}">Blog</a></li>
  18. </ul>
  19. {% endblock %}
  20. </div>
  21. <div id="messages">
  22. {% for message in app.flashes('error') %}
  23. <div class="flash-error">
  24. {{ message }}
  25. </div>
  26. {% endfor %}
  27. {% for message in app.flashes('info') %}
  28. <div class="flash-info">
  29. {{ message }}
  30. </div>
  31. {% endfor %}
  32. </div>
  33. <div id="content">
  34. {% block body %}{% endblock %}
  35. </div>
  36. {% block javascripts %}{% endblock %}
  37. </body>
  38. </html>