blog.html.twig 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. {% extends 'partials/base.html.twig' %}
  2. {% set collection = page.collection() %}
  3. {% block header %}
  4. <header>
  5. <h1>
  6. <a href="/">{{site.title}}</a>
  7. </h1>
  8. </header>
  9. {% endblock %}
  10. {% block body %}
  11. <section class="body-wrapper" id="item_list">
  12. <script type="text/javascript">
  13. var $card = $('.card');
  14. ScrollReveal().reveal($card, {
  15. delay: 1000,
  16. distance: '20px',
  17. interval: 100,
  18. });
  19. var $item_listp = $('#item_list p');
  20. ScrollReveal().reveal($item_listp, {
  21. duration: 1000,
  22. distance: '10px',
  23. interval: 50,
  24. });
  25. </script>
  26. {% block item %}
  27. <!-- <div> -->
  28. {{content}}
  29. {% for child in collection %}
  30. {% include 'partials/blog-list-item.html.twig' with {blog: page, page: child} %}
  31. {% endfor %}
  32. <!-- </div> -->
  33. {% endblock %}
  34. </section>
  35. {% block aside %}
  36. {% include 'partials/sidebar.html.twig' %}
  37. {% endblock %}
  38. {% endblock %}