base.html.twig 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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/hehe_logo.jpg') }}" />
  14. <link rel="canonical" href="{{ page.url(true, true) }}" />
  15. {% block stylesheets %}
  16. {% do assets.addCss('theme://css-compiled/template.css') %}
  17. {% endblock %}
  18. {{ assets.css() }}
  19. {% block javascripts %}
  20. {% do assets.addJs('jquery', 101) %}
  21. {% do assets.addJs('theme://js/site.js', {group:'bottom'}) %}
  22. {% do assets.addJs('theme://js/scrollreveal.min.js', {group:'bottom'}) %}
  23. {% endblock %}
  24. {{ assets.js() }}
  25. {% endblock head %}
  26. </head>
  27. <body id="top" class="{% block body_classes %}{{ body_classes }}{% endblock %}">
  28. {% block header %}
  29. <header class="section">
  30. <h1><a href="{{ base_url == '' ? '/' : base_url }}">{{ config.site.title }}</a></h1>
  31. <nav class="navbar">
  32. {% block header_navigation %}
  33. {% include 'partials/navigation.html.twig' %}
  34. {% include 'partials/taxonomylist.html.twig' with { taxonomy: 'category'} %}
  35. {% endblock %}
  36. <div class="col">
  37. <div class="burger">
  38. <div class="bar top"></div>
  39. <div class="bar middle"></div>
  40. <div class="bar bottom"></div>
  41. </div>
  42. </div>
  43. </nav>
  44. </header>
  45. {% endblock %}
  46. <section id="start">
  47. {% block body %}
  48. <section id="body-wrapper" class="section">
  49. <section class="container {{ grid_size }}">
  50. {% block content %}{% endblock %}
  51. </section>
  52. </section>
  53. {% endblock %}
  54. </section>
  55. </div>
  56. {% block footer %}{% endblock %}
  57. {% block bottom %}
  58. {{ assets.js('bottom') }}
  59. {% endblock %}
  60. </body>