base.html.twig 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. {% set body_classes = body_class(['header-fixed', 'header-animated', 'header-dark', 'header-transparent', 'sticky-footer']) %}
  2. {% set grid_size = theme_var('grid-size') %}
  3. {% set compress = theme_var('production-mode') ? '.min.css' : '.css' %}
  4. <!DOCTYPE html>
  5. <html lang="{{ grav.language.getActive ?: grav.config.site.default_lang }}">
  6. <head>
  7. {% block head %}
  8. <meta charset="utf-8" />
  9. <title>{% if header.title %}{{ header.title|e('html') }} | {% endif %}{{ site.title|e('html') }}</title>
  10. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  11. <meta name="viewport" content="width=device-width, initial-scale=1">
  12. {% include 'partials/metadata.html.twig' %}
  13. <link rel="icon" type="image/png" href="{{ url('theme://images/favicon.png') }}" />
  14. <link rel="canonical" href="{{ page.url(true, true) }}" />
  15. {% block stylesheets %}
  16. {% do assets.addCss('theme://css/hamburgers.css') %}
  17. {% do assets.addCss('theme://css-compiled/theme'~compress) %}
  18. {% endblock %}
  19. {{ assets.css()|raw }}
  20. {% block javascripts %}
  21. {% do assets.addJs('theme://js/jquery-3.4.1.min.js', {group:'bottom'}) %}
  22. {% do assets.addJs('theme://js/jquery.lazy.min.js', {group:'bottom'}) %}
  23. {% do assets.addJs('theme://js/site.js', {group:'bottom'}) %}
  24. {% endblock %}
  25. {{ assets.js()|raw }}
  26. {% endblock head %}
  27. </head>
  28. <body id="top" class="{{ header.title|hyphenize }}">
  29. {% block header %}{% endblock %}
  30. <section id="start">
  31. {% block body %}
  32. <div class="body-center" id="text_figli">
  33. {% block content %}{% endblock %}
  34. </div>
  35. {% endblock %}
  36. {% block aside %}
  37. {% include 'partials/sidebar.html.twig' %}
  38. {% endblock %}
  39. </section>
  40. {% block footer %}
  41. {% set options = { items: {'@page.self': '/contact'} } %}
  42. <footer>
  43. {% for item in page.collection(options) %}
  44. {{item.content}}
  45. {% endfor %}
  46. </footer>
  47. {% endblock %}
  48. {% block bottom %}
  49. {{ assets.js('bottom')|raw }}
  50. {% endblock %}
  51. </body>
  52. </html>