base.html.twig 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. {% do assets.addCss('theme://css-compiled/theme'~compress) %}
  18. {% endblock %}
  19. {% block javascripts %}
  20. {% do assets.addJs('jquery', 101) %}
  21. {% do assets.addJs('theme://js/site.js', {group:'bottom'}) %}
  22. {% endblock %}
  23. {% block assets deferred %}
  24. {{ assets.css()|raw }}
  25. {{ assets.js()|raw }}
  26. {% endblock %}
  27. <script id="mcjs">!function(c,h,i,m,p){m=c.createElement(h),p=c.getElementsByTagName(h)[0],m.async=1,m.src=i,p.parentNode.insertBefore(m,p)}(document,"script","https://chimpstatic.com/mcjs-connected/js/users/a98b763288f940083bf28857c/d26d4af6b93e3686e6a245680.js");</script>
  28. {% endblock head %}
  29. </head>
  30. <body id="top" class="{% block body_classes %}{{ body_classes }}{% endblock %}">
  31. {% block header %}
  32. <section id="header" class="section">
  33. <nav class="navbar">
  34. <section class="logo">
  35. <h1>{{site.title}}</h1>
  36. </section>
  37. <section class="desktop-menu">
  38. <nav class="dropmenu animated">
  39. {% block header_navigation %}
  40. {% include 'partials/navigation.html.twig' %}
  41. {% endblock %}
  42. </nav>
  43. {% if config.plugins.login.enabled and grav.user.username %}
  44. <span class="login-status-wrapper"><i class="fa fa-user"></i> {% include 'partials/login-status.html.twig' %}</span>
  45. {% endif %}
  46. </section>
  47. </nav>
  48. </section>
  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. {% block sidebar %}{% endblock %}
  60. </section>
  61. </section>
  62. {% endblock %}
  63. </section>
  64. {% block footer %}
  65. {% include 'partials/footer.html.twig' %}
  66. {% endblock %}
  67. {% block bottom %}
  68. {{ assets.js('bottom')|raw }}
  69. {% endblock %}
  70. </body>
  71. </html>