base.html.twig 2.7 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/spectre'~compress) %}
  17. {% if theme_var('spectre.exp') %}{% do assets.addCss('theme://css-compiled/spectre-exp'~compress) %}{% endif %}
  18. {% if theme_var('spectre.icons') %}{% do assets.addCss('theme://css-compiled/spectre-icons'~compress) %}{% endif %}
  19. {% do assets.addCss('theme://css-compiled/theme'~compress) %}
  20. {% do assets.addCss('theme://css/custom.css') %}
  21. {% do assets.addCss('theme://css/line-awesome.min.css') %}
  22. {% endblock %}
  23. {{ assets.css() }}
  24. {% block javascripts %}
  25. {% do assets.addJs('jquery', 101) %}
  26. {% do assets.addJs('theme://js/jquery.treemenu.js', {group:'bottom'}) %}
  27. {% do assets.addJs('theme://js/site.js', {group:'bottom'}) %}
  28. {% endblock %}
  29. {{ assets.js() }}
  30. {% endblock head %}
  31. </head>
  32. <body id="top" class="{% block body_classes %}{{ body_classes }}{% endblock %}">
  33. <div id="page-wrapper">
  34. {% block header %}
  35. <section id="header" class="section">
  36. <section class="container {{ grid_size }}">
  37. <nav class="navbar">
  38. <section class="navbar-section">
  39. <nav class="dropmenu animated">
  40. {% block header_navigation %}
  41. {% include 'partials/navigation.html.twig' %}
  42. {% endblock %}
  43. </nav>
  44. </section>
  45. </nav>
  46. </section>
  47. </section>
  48. {% endblock %}
  49. <section id="start">
  50. {% block body %}
  51. <section id="body-wrapper" class="section">
  52. <section class="container {{ grid_size }}">
  53. {% block content %}{% endblock %}
  54. </section>
  55. </section>
  56. {% endblock %}
  57. </section>
  58. </div>
  59. {% block bottom %}
  60. {{ assets.js('bottom') }}
  61. {% endblock %}
  62. </body>