blog.html.twig 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. {% embed 'partials/base.html.twig' %}
  2. {% set collection = page.collection() %}
  3. {% block content %}
  4. {% set blog_image = page.media.images|first.grayscale().contrast(20).brightness(-100).colorize(-35,81,122) %}
  5. {% if blog_image %}
  6. <div class="flush-top blog-header blog-header-image" style="background-image: url({{ blog_image.url }});">
  7. {% else %}
  8. <div class="blog-header">
  9. {% endif %}
  10. {{ page.content }}
  11. </div>
  12. {% if config.plugins.breadcrumbs.enabled %}
  13. {% include 'partials/breadcrumbs.html.twig' %}
  14. {% endif %}
  15. <div class="content-wrapper blog-content-list grid pure-g">
  16. <div id="listing" class="block pure-u-2-3">
  17. {% for child in collection %}
  18. {% include 'partials/blog_item.html.twig' with {'blog':page, 'page':child, 'truncate':true} %}
  19. {% endfor %}
  20. {% if config.plugins.pagination.enabled and collection.params.pagination %}
  21. {% include 'partials/pagination.html.twig' with {'base_url':page.url, 'pagination':collection.params.pagination} %}
  22. {% endif %}
  23. </div>
  24. <div id="sidebar" class="block size-1-3 pure-u-1-3">
  25. {% include 'partials/sidebar.html.twig' with {'blog':page} %}
  26. </div>
  27. </div>
  28. {% endblock %}
  29. {% endembed %}