base.html.twig 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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-compiled/theme'~compress) %}
  17. {% endblock %}
  18. {{ assets.css()|raw }}
  19. {% block javascripts %}
  20. {% do assets.addJs('jquery', 101) %}
  21. {% do assets.addJs('theme://js/site.js', {group:'bottom'}) %}
  22. {% endblock %}
  23. {{ assets.js()|raw }}
  24. {% endblock head %}
  25. </head>
  26. <body id="top" class="{{ header.title|hyphenize }}">
  27. {% block header %}{% endblock %}
  28. <section id="start">
  29. {% block body %}
  30. <div class="body-center" id="text_figli">
  31. {% block content %}
  32. {% endblock %}
  33. </section>
  34. {% block aside %}
  35. {% include 'partials/sidebar.html.twig' %}
  36. {% endblock %}
  37. {% endblock %}
  38. </section>
  39. {% block bottom %}
  40. {{ assets.js('bottom')|raw }}
  41. {% endblock %}
  42. </body>
  43. </html>