base.html.twig 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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/theme'~compress) %}
  17. {% do assets.addCss('theme://css/jquery.mCustomScrollbar.min.css') %}
  18. <!-- and (max-device-width: 812px) -->
  19. {% endblock %}
  20. {{ assets.css() }}
  21. {% block javascripts %}
  22. {% do assets.addJs('jquery', 101) %}
  23. {% do assets.add('theme://js/midnight.jquery.min.js') %}
  24. {% do assets.add('theme://js/jquery.scrollify.js') %}
  25. {% do assets.add('theme://js/jquery.mCustomScrollbar.js') %}
  26. {% do assets.add('theme://js/script.js') %}
  27. {% endblock %}
  28. {{ assets.js() }}
  29. {% endblock head %}
  30. </head>
  31. <body id="top" class="{% block body_classes %}{{ body_classes }}{% endblock %}">
  32. <div id="page-wrapper">
  33. {% block header %}
  34. <section id="header" class="section">
  35. <section class="container {{ grid_size }}">
  36. <nav class="navbar">
  37. <section class="navbar-section">
  38. <nav class="dropmenu animated">
  39. {% block header_navigation %}
  40. {% include 'partials/navigation.html.twig' %}
  41. {% endblock %}
  42. </nav>
  43. </section>
  44. </nav>
  45. </section>
  46. </section>
  47. {% endblock %}
  48. <section id="start">
  49. {% block body %}
  50. <section id="body-wrapper" class="section">
  51. <section class="container {{ grid_size }}">
  52. {% block content %}{% endblock %}
  53. </section>
  54. </section>
  55. {% endblock %}
  56. </section>
  57. </div>
  58. {% block bottom %}
  59. {{ assets.js('bottom') }}
  60. {% endblock %}
  61. </body>