base.html.twig 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. {% endblock %}
  18. {{ assets.css()|raw }}
  19. {% block javascripts %}
  20. {% do assets.addJs('jquery', 101) %}
  21. {% do assets.addJs('theme://js/jquery.easing.1.3.js', {group:'bottom'}) %}
  22. {% do assets.addJs('theme://js/imagesloaded.pkgd.min.js', {group:'bottom'}) %}
  23. {% do assets.addJs('theme://js/masonry.filter.js', {group:'bottom'}) %}
  24. {% do assets.addJs('theme://js/masonry.pkgd.min.js', {group:'bottom'}) %}
  25. {% do assets.addJs('theme://js/jquery.mCustomScrollbar.js', {group:'bottom'}) %}
  26. {% do assets.addJs('theme://js/jquery.mousewheel.min.js', {group:'bottom'}) %}
  27. {% do assets.addJs('theme://js/site.js', {group:'bottom'}) %}
  28. {% endblock %}
  29. {{ assets.js()|raw }}
  30. {% endblock head %}
  31. </head>
  32. <body id="top" class="{{page.template}}">
  33. <div id="page-wrapper" class=" {{page.template}}">
  34. {% block header %}
  35. <header class="section">
  36. <div class="head">
  37. <nav class="title">
  38. <a href="/"><h1>{{site.title|capitalize}}</h1>
  39. <h2>{{site.header.status|upper}}</h2></a>
  40. </nav>
  41. <div class="contact">
  42. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
  43. <polygon points="34.2,87.4 12.3,65.5 12.3,34.5 34.2,12.6 65.2,12.6 87.1,34.5 87.1,65.5 65.2,87.4" fill="black"/>
  44. </svg>
  45. <h3>Contact</h3>
  46. {% include 'partials/navigation.html.twig' %}
  47. </div>
  48. </div>
  49. <div class="works works-mea">
  50. {% for child in collection %}
  51. {% set mea = child.header.mea == 'true' %}
  52. {% if mea %}
  53. {% include 'partials/blog-list-mea.html.twig' with {blog: page, page: child} %}
  54. {% endif %}
  55. {% endfor %}
  56. </div>
  57. <div class="scroll">
  58. <p>scroll</p>
  59. </div>
  60. </header>
  61. {% endblock %}
  62. <section id="start" class="section">
  63. <div class="cat-list btn-toolbar">
  64. <ul>
  65. {% include 'partials/taxonomylist.html.twig' with {base_url: my_url, taxonomy: 'category', children_only: true} %}
  66. </ul>
  67. </div>
  68. {% block body %}
  69. <section id="body-wrapper">
  70. <section>
  71. {% block content %}{% endblock %}
  72. </section>
  73. </section>
  74. {% endblock %}
  75. </section>
  76. </div>
  77. {% block bottom %}
  78. {{ assets.js('bottom')|raw }}
  79. {% endblock %}
  80. </body>
  81. </html>