base.html.twig 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. {% set extension = config.theme.production ? '.min' : '' %}
  2. <!DOCTYPE html>
  3. <html lang="{{ (grav.language.getActive ?: grav.config.site.default_lang)|e }}">
  4. <head>
  5. {% block head %}
  6. <meta charset="utf-8" />
  7. <title>{% if header.title %}{{ header.title|e }} | {% endif %}{{ site.title|e }}</title>
  8. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9. <meta name="viewport" content="width=device-width, initial-scale=1">
  10. {% include 'partials/metadata.html.twig' %}
  11. <link rel="icon" type="image/png" href="{{ url('theme://images/logo.png')|e }}" />
  12. <link rel="canonical" href="{{ page.url(true, true)|e }}" />
  13. {% endblock head %}
  14. {% block stylesheets %}
  15. {% do assets.addCss('theme://dist/css/site' ~ extension ~ '.css', 98) %}
  16. {% endblock %}
  17. {% block javascripts %}
  18. {% do assets.addJs('theme://js/main' ~ extension ~ '.js', 98) %}
  19. {% endblock %}
  20. {% block assets deferred %}
  21. {{ assets.css()|raw }}
  22. {{ assets.js()|raw }}
  23. {% endblock %}
  24. </head>
  25. <body id="top" class="{{ page.header.body_classes|e }} {{ config.theme.production ?: 'debug-screens' }}">
  26. {% block header %}
  27. <div class="header">
  28. <div class="">
  29. <a class="logo" href="{{ home_url|e }}">
  30. {{ config.site.title|e }}
  31. </a>
  32. {% block header_navigation %}
  33. <nav class="main-nav">
  34. {% include 'partials/navigation.html.twig' %}
  35. </nav>
  36. {% endblock %}
  37. </div>
  38. </div>
  39. {% endblock %}
  40. {% block body %}
  41. <section id="body">
  42. <div class="prose">
  43. {% block content %}{% endblock %}
  44. </div>
  45. </section>
  46. {% endblock %}
  47. {% block footer %}
  48. <div class="footer text-center">
  49. <div class="">
  50. <p><a href="http://getgrav.org">Grav</a>, by <a href="https://trilby.media">Trilby Media, LLC</a>.</p>
  51. </div>
  52. </div>
  53. {% endblock %}
  54. {% block bottom %}
  55. {{ assets.js('bottom')|raw }}
  56. {% endblock %}
  57. </body>
  58. </html>