base.html.twig 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. {% set theme_config = attribute(config.themes, config.system.pages.theme) %}
  2. <!DOCTYPE html>
  3. <html lang="{{ grav.language.getActive ?: grav.config.site.default_lang }}">
  4. <head>
  5. {% block head %}
  6. <meta charset="utf-8" />
  7. <title>{% if header.title %}{{ header.title|e('html') }} | {% endif %}{{ site.title|e('html') }}</title>
  8. {% include 'partials/metadata.html.twig' %}
  9. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  10. <link rel="icon" type="image/png" href="{{ url('theme://images/favicon.png') }}" />
  11. <link rel="canonical" href="{{ page.url(true, true) }}" />
  12. {% block stylesheets %}
  13. {% do assets.addCss('theme://css/pure-0.5.0/grids-min.css', 103) %}
  14. {% do assets.addCss('theme://css-compiled/nucleus.css', 102) %}
  15. {% do assets.addCss('theme://css-compiled/template.css', 101) %}
  16. {% do assets.addCss('theme://css/custom.css', 100) %}
  17. {% do assets.addCss('theme://css/font-awesome.min.css', 100) %}
  18. {% do assets.addCss('theme://css/slidebars.min.css') %}
  19. {% if browser.getBrowser == 'msie' and browser.getVersion == 10 %}
  20. {% do assets.addCss('theme://css/nucleus-ie10.css') %}
  21. {% endif %}
  22. {% if browser.getBrowser == 'msie' and browser.getVersion >= 8 and browser.getVersion <= 9 %}
  23. {% do assets.addCss('theme://css/nucleus-ie9.css') %}
  24. {% do assets.addJs('theme://js/html5shiv-printshiv.min.js') %}
  25. {% endif %}
  26. {% endblock %}
  27. {% block javascripts %}
  28. {% do assets.addJs('jquery', 101) %}
  29. {% do assets.addJs('theme://js/modernizr.custom.71422.js', 100) %}
  30. {% do assets.addJs('theme://js/antimatter.js') %}
  31. {% do assets.addJs('theme://js/parallax.js') %}
  32. {% do assets.addJs('theme://js/slidebars.min.js') %}
  33. {% endblock %}
  34. {% block assets deferred %}
  35. {{ assets.css()|raw }}
  36. {{ assets.js()|raw }}
  37. {% endblock %}
  38. {% endblock head %}
  39. </head>
  40. <body id="top" class="{{ page.header.body_classes }}">
  41. <div id="sb-site">
  42. {% block header %}
  43. <header id="header">
  44. <div id="logo">
  45. <img id="gouv" src="user/pages/01.home/Republique-francaise-logo-sans-text.svg" alt="logo République Française">
  46. <img id="epau" src="user/pages/01.home/EPAU_logo_EPAU_vecto-seul.svg" alt="logo EPAU">
  47. </div>
  48. <div id="navbar">
  49. {% block header_extra %}{% endblock %}
  50. {% if config.plugins.langswitcher.enabled %}
  51. {% include 'partials/langswitcher.html.twig' %}
  52. {% endif %}
  53. {% block header_navigation %}
  54. {% include 'partials/navigation.html.twig' %}
  55. {% endblock %}
  56. <!-- <span class="panel-activation sb-toggle-left navbar-left menu-btn fa fa-bars"></span> -->
  57. </div>
  58. </header>
  59. {% endblock %}
  60. {% block showcase %}{% endblock %}
  61. {% block body %}
  62. <section id="body" class="{{ class }} parallax-window"
  63. data-parallax="scroll"
  64. data-image-src="{{ url('theme://images/04_photo_ AE_PlanDAou_36.jpg') }}">
  65. {% block content %}{% endblock %}
  66. </section>
  67. {% endblock %}
  68. <!-- {% block footer %}
  69. <footer id="footer">
  70. <div class="totop">
  71. <span><a href="#" id="toTop"><i class="fa fa-arrow-up"></i></a></span>
  72. </div>
  73. </footer>
  74. {% endblock %} -->
  75. </div>
  76. {% block sidebar_navigation %}
  77. <div class="sb-slidebar sb-left sb-width-thin">
  78. <div id="panel">
  79. {% import _self as macros %}
  80. {% macro loop(page) %}
  81. {% import _self as macros %}
  82. {% for p in page.children.visible %}
  83. {% set current_page = (p.active or p.activeChild) ? 'active' : '' %}
  84. {% if p.children.visible.count > 0 %}
  85. <li class="has-children {{ current_page }}">
  86. <a href="{{ p.url }}">
  87. {% if p.header.icon %}<i class="fa fa-{{ p.header.icon }}"></i>{% endif %}
  88. {{ p.menu }}
  89. <span></span>
  90. </a>
  91. <ul>
  92. {{ macros.loop(p) }}
  93. </ul>
  94. </li>
  95. {% else %}
  96. <li class="{{ current_page }}">
  97. <a href="{{ p.url }}">
  98. {% if p.header.icon %}<i class="fa fa-{{ p.header.icon }}"></i>{% endif %}
  99. {{ p.menu }}
  100. </a>
  101. </li>
  102. {% endif %}
  103. {% endfor %}
  104. {% endmacro %}
  105. <ul class="navigation">
  106. {% if theme_config.dropdown.enabled %}
  107. {{ macros.loop(pages) }}
  108. {% else %}
  109. {% for page in pages.children.visible %}
  110. {% set current_page = (page.active or page.activeChild) ? 'active' : '' %}
  111. <li class="{{ current_page }}">
  112. <a href="{{ page.url }}">
  113. {% if page.header.icon %}<i class="fa fa-{{ page.header.icon }}"></i>{% endif %}
  114. {{ page.menu }}
  115. </a>
  116. </li>
  117. {% endfor %}
  118. {% endif %}
  119. {% for mitem in site.menu %}
  120. <li>
  121. <a href="{{ mitem.url }}">
  122. {% if mitem.icon %}<i class="fa fa-{{ mitem.icon }}"></i>{% endif %}
  123. {{ mitem.text }}
  124. </a>
  125. </li>
  126. {% endfor %}
  127. {% if config.plugins.login.enabled and grav.user.username %}
  128. <li><i class="fa fa-lock"></i> {% include 'partials/login-status.html.twig' %}</li>
  129. {% endif %}
  130. </ul>
  131. <!-- {% include 'partials/navigation.html.twig' %} -->
  132. </div>
  133. </div>
  134. {% endblock %}
  135. {% block bottom %}
  136. <script>
  137. $(function () {
  138. $(document).ready(function() {
  139. $.slidebars({
  140. hideControlClasses: true,
  141. scrollLock: true
  142. });
  143. });
  144. });
  145. </script>
  146. {{ assets.js('bottom')|raw }}
  147. {% endblock %}
  148. </body>
  149. </html>