base.html.twig 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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('info') %}
  23. <div class="flash-info">
  24. {{ message }}
  25. </div>
  26. {% endfor %}
  27. </div>
  28. <div id="content">
  29. {% block body %}{% endblock %}
  30. </div>
  31. {% block javascripts %}{% endblock %}
  32. </body>
  33. </html>