base.html.twig 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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()|raw }}
  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()|raw }}
  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. <header class="section">
  36. <nav class="dropmenu animated">
  37. {% block header_navigation %}
  38. {% include 'partials/navigation.html.twig' %}
  39. {% endblock %}
  40. </nav>
  41. </header>
  42. <div class="mobile-menu">
  43. <div class="button_container" id="toggle">
  44. <span class="top"></span>
  45. <span class="middle"></span>
  46. <span class="bottom"></span>
  47. </div>
  48. </div>
  49. {% endblock %}
  50. {% block hero %}{% endblock %}
  51. <section id="start">
  52. {% block body %}
  53. <section id="body-wrapper" class="section">
  54. <section class="container {{ grid_size }}">
  55. {% block messages %}
  56. {% include 'partials/messages.html.twig' ignore missing %}
  57. {% endblock %}
  58. {% block content %}{% endblock %}
  59. </section>
  60. </section>
  61. {% endblock %}
  62. </section>
  63. </div>
  64. {% block footer %}
  65. {% include 'partials/footer.html.twig' %}
  66. {% endblock %}
  67. <div class="mobile-container">
  68. <div class="overlay" id="overlay">
  69. <div class="mobile-logo">
  70. {% include 'partials/logo.html.twig' with {mobile: true} %}
  71. </div>
  72. <nav class="overlay-menu">
  73. {% include 'partials/navigation.html.twig' with {tree: true} %}
  74. </nav>
  75. </div>
  76. </div>
  77. {% block bottom %}
  78. {{ assets.js('bottom')|raw }}
  79. {% endblock %}
  80. </body>
  81. </html>