base.html.twig 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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/script_k.js', {group:'bottom'}) %}
  23. {% endblock %}
  24. {{ assets.js()|raw }}
  25. {% endblock head %}
  26. </head>
  27. <body id="top">
  28. {% block header %}
  29. <header>
  30. <a href="/"><h1>{{ site.title }}</h1></a>
  31. </header>
  32. {% endblock %}
  33. <section id="start">
  34. {% block body %}
  35. <section>
  36. {% block content %}{% endblock %}
  37. </section>
  38. {% block aside %}
  39. {% include 'partials/sidebar.html.twig' %}
  40. {% endblock %}
  41. {% endblock %}
  42. </section>
  43. {% block bottom %}
  44. {{ assets.js('bottom')|raw }}
  45. {% endblock %}
  46. </body>
  47. </html>