base.html.twig 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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 logo">
  39. {% include 'partials/logo.html.twig' %}
  40. </section>
  41. <section class="navbar-section">
  42. <nav class="dropmenu animated">
  43. {% block header_navigation %}
  44. {% include 'partials/navigation.html.twig' %}
  45. {% endblock %}
  46. </nav>
  47. {% if config.plugins.login.enabled and grav.user.username %}
  48. <span class="login-status-wrapper"><i class="fa fa-user"></i> {% include 'partials/login-status.html.twig' %}</span>
  49. {% endif %}
  50. </section>
  51. </nav>
  52. </section>
  53. </section>
  54. <div class="mobile-menu">
  55. <div class="button_container" id="toggle">
  56. <span class="top"></span>
  57. <span class="middle"></span>
  58. <span class="bottom"></span>
  59. </div>
  60. </div>
  61. {% endblock %}
  62. {% block hero %}{% endblock %}
  63. <section id="start">
  64. {% block body %}
  65. <section id="body-wrapper" class="section">
  66. <section class="container {{ grid_size }}">
  67. {% block messages %}
  68. {% include 'partials/messages.html.twig' ignore missing %}
  69. {% endblock %}
  70. {% block content %}{% endblock %}
  71. </section>
  72. </section>
  73. {% endblock %}
  74. </section>
  75. </div>
  76. {% block footer %}
  77. <section id="footer" class="section bg-gray">
  78. <section class="container {{ grid_size }}">
  79. <p><a href="http://getgrav.org">Grav</a> was <i class="fa fa-code"></i> with <i class="fa fa-heart-o pulse "></i> by <a href="https://trilby.media">Trilby Media</a>.</p>
  80. </section>
  81. </section>
  82. {% endblock %}
  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. {% block bottom %}
  94. {{ assets.js('bottom') }}
  95. {% endblock %}
  96. </body>