base.html.twig 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. {% use 'blocks/base.html.twig' %}
  5. <!DOCTYPE html>
  6. <html lang="{{ grav.language.getActive ?: grav.config.site.default_lang }}">
  7. <head>
  8. {% block head deferred %}
  9. <meta charset="utf-8" />
  10. <title>{% if page.title %}{{ page.title|e('html') }} | {% endif %}{{ site.title|e('html') }}</title>
  11. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  12. <meta name="viewport" content="width=device-width, initial-scale=1">
  13. {% include 'partials/metadata.html.twig' %}
  14. <link rel="icon" type="image/png" href="{{ url('theme://images/favicon.png') }}" />
  15. <link rel="canonical" href="{{ page.url(true, true) }}" />
  16. {% endblock head %}
  17. {% block stylesheets %}
  18. {% do assets.addCss('theme://css-compiled/spectre'~compress) %}
  19. {% if theme_var('spectre.exp') %}{% do assets.addCss('theme://css-compiled/spectre-exp'~compress) %}{% endif %}
  20. {% if theme_var('spectre.icons') %}{% do assets.addCss('theme://css-compiled/spectre-icons'~compress) %}{% endif %}
  21. {% do assets.addCss('theme://css-compiled/theme'~compress) %}
  22. {% do assets.addCss('theme://css/custom.css') %}
  23. {% do assets.addCss('theme://css/line-awesome.min.css') %}
  24. {% endblock %}
  25. {% block javascripts %}
  26. {% do assets.addJs('jquery', 101) %}
  27. {% do assets.addJs('theme://js/jquery.treemenu.js', {group:'bottom'}) %}
  28. {% do assets.addJs('theme://js/site.js', {group:'bottom'}) %}
  29. {% endblock %}
  30. {% block assets deferred %}
  31. {{ assets.css()|raw }}
  32. {{ assets.js()|raw }}
  33. {% endblock %}
  34. </head>
  35. <body id="top" class="{% block body_classes %}{{ body_classes }}{% endblock %}">
  36. <div id="page-wrapper">
  37. {% block header %}
  38. <section id="header" class="section">
  39. <section class="container {{ grid_size }}">
  40. <nav class="navbar">
  41. <section class="navbar-section logo">
  42. {% include 'partials/logo.html.twig' %}
  43. </section>
  44. <section class="navbar-section desktop-menu">
  45. <nav class="dropmenu animated">
  46. {% block header_navigation %}
  47. {% include 'partials/navigation.html.twig' %}
  48. {% endblock %}
  49. </nav>
  50. {% if config.plugins.login.enabled and grav.user.username %}
  51. <span class="login-status-wrapper"><i class="fa fa-user"></i> {% include 'partials/login-status.html.twig' %}</span>
  52. {% endif %}
  53. </section>
  54. </nav>
  55. </section>
  56. </section>
  57. <div class="mobile-menu">
  58. <div class="button_container" id="toggle">
  59. <span class="top"></span>
  60. <span class="middle"></span>
  61. <span class="bottom"></span>
  62. </div>
  63. </div>
  64. {% endblock %}
  65. {% block hero %}{% endblock %}
  66. <section id="start">
  67. {% block body %}
  68. <section id="body-wrapper" class="section">
  69. <section class="container {{ grid_size }}">
  70. {% block messages %}
  71. {% include 'partials/messages.html.twig' ignore missing %}
  72. {% endblock %}
  73. {{ block('content_surround') }}
  74. </section>
  75. </section>
  76. {% endblock %}
  77. </section>
  78. </div>
  79. {% block footer %}
  80. {% include 'partials/footer.html.twig' %}
  81. {% endblock %}
  82. {% block mobile %}
  83. <div class="mobile-container">
  84. <div class="overlay" id="overlay">
  85. <div class="mobile-logo">
  86. {% include 'partials/logo.html.twig' with {mobile: true} %}
  87. </div>
  88. <nav class="overlay-menu">
  89. {% include 'partials/navigation.html.twig' with {tree: true} %}
  90. </nav>
  91. </div>
  92. </div>
  93. {% endblock %}
  94. {% block bottom %}
  95. {{ assets.js('bottom')|raw }}
  96. {% endblock %}
  97. </body>
  98. </html>