base.html.twig 2.2 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-compiled/theme'~compress) %}
  17. {% do assets.addCss('theme://css/normelize.css') %}
  18. {% endblock %}
  19. {{ assets.css()|raw }}
  20. {% block javascripts %}
  21. {% do assets.addJs('jquery', 101) %}
  22. {% do assets.addJs('theme://js/jquery.treemenu.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="{% block body_classes %}{{ body_classes }}{% endblock %}">
  29. {% block header %}
  30. <header class="section">
  31. <h1>{{ site.title }}</h1>
  32. <nav class="dropmenu animated">
  33. {% block header_navigation %}
  34. {% include 'partials/navigation.html.twig' %}
  35. {% endblock %}
  36. </nav>
  37. </header>
  38. {% endblock %}
  39. <section id="start">
  40. {% block body %}
  41. <section class="container {{ grid_size }}">
  42. {% block content %}{% endblock %}
  43. </section>
  44. {% block aside %}
  45. {% include 'partials/sidebar.html.twig' %}
  46. {% endblock %}
  47. {% block footer %}
  48. {% include 'partials/footer.html.twig' %}
  49. {% endblock %}
  50. {% endblock %}
  51. </section>
  52. {% block bottom %}
  53. {{ assets.js('bottom')|raw }}
  54. {% endblock %}
  55. </body>
  56. </html>