base.html.twig 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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/scrollreveal.min.js', {group:'bottom'}) %}
  24. {% do assets.addJs('theme://js/site.js', {group:'bottom'}) %}
  25. {% endblock %}
  26. {{ assets.js()|raw }}
  27. {% endblock head %}
  28. </head>
  29. <body id="top" class="{{ header.title|hyphenize }}">
  30. {% block header %}{% endblock %}
  31. <section id="start">
  32. {% block aside %}
  33. {% include 'partials/sidebar.html.twig' %}
  34. {% endblock %}
  35. {% block body %}
  36. <div class="body-center" id="text_figli">
  37. {% block content %}{% endblock %}
  38. </div>
  39. {% endblock %}
  40. </section>
  41. {% block footer %}
  42. {% set options = { items: {'@page.self': '/contact'} } %}
  43. <footer>
  44. {% for item in page.collection(options) %}
  45. {{item.content}}
  46. {% endfor %}
  47. </footer>
  48. {% endblock %}
  49. {% block bottom %}
  50. {{ assets.js('bottom')|raw }}
  51. {% endblock %}
  52. </body>
  53. </html>