base.html.twig 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. {% do assets.addCss('theme://css-compiled/theme'~compress) %}
  18. {% do assets.addCss('theme://css/leaflet.css') %}
  19. {% endblock %}
  20. {% block javascripts %}
  21. {% do assets.addJs('jquery', 101) %}
  22. {% do assets.addJs('theme://js/masonry.pkgd.min.js', {group:'bottom'}) %}
  23. {% do assets.addJs('theme://js/imagesloaded.pkgd.min.js', {group:'bottom'}) %}
  24. {% do assets.addJs('theme://js/multipleFilterMasonry.js', {group:'bottom'}) %}
  25. {% do assets.addJs('theme://js/jquery.slides.min.js', {group:'bottom'}) %}
  26. {% do assets.addJs('theme://js/leaflet.js', {group:'bottom'}) %}
  27. {% do assets.addJs('theme://js/site.js', {group:'bottom'}) %}
  28. {% endblock %}
  29. {% block assets deferred %}
  30. {{ assets.css()|raw }}
  31. {{ assets.js()|raw }}
  32. {% endblock %}
  33. {% endblock head %}
  34. </head>
  35. <body id="top" class="{% block body_classes %}{{ body_classes }}{% endblock %}">
  36. {% block header %}
  37. <section id="header" class="section">
  38. <nav class="navbar">
  39. <section class="logo">
  40. <a href="/"><h1>{{site.title}}</h1></a>
  41. </section>
  42. <section class="desktop-menu">
  43. <nav class="dropmenu animated">
  44. {% block header_navigation %}
  45. {% include 'partials/navigation.html.twig' %}
  46. {% endblock %}
  47. </nav>
  48. {% if config.plugins.login.enabled and grav.user.username %}
  49. <span class="login-status-wrapper"><i class="fa fa-user"></i> {% include 'partials/login-status.html.twig' %}</span>
  50. {% endif %}
  51. <div class="reso">
  52. <img src="/user/themes/lecampus/images/fb.svg" alt="">
  53. <img src="/user/themes/lecampus/images/yt.svg" alt="">
  54. </div>
  55. </section>
  56. </nav>
  57. </section>
  58. {% endblock %}
  59. {% block hero %}{% endblock %}
  60. <section id="{{page.template}}" class="start">
  61. {% block body %}
  62. <section id="body-wrapper" class="section">
  63. <section id="item">
  64. {% block content %}{% endblock %}
  65. {% block sidebar %}{% endblock %}
  66. </section>
  67. </section>
  68. {% endblock %}
  69. </section>
  70. {% block footer %}
  71. {% include 'partials/footer.html.twig' %}
  72. {% endblock %}
  73. {% block bottom %}
  74. {{ assets.js('bottom')|raw }}
  75. {% endblock %}
  76. </body>
  77. </html>