blog-item.html.twig 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. {% if not hero_image_name %}
  2. <div class="content-title text-center">
  3. {% include 'partials/blog/title.html.twig' with {title_level: 'h2'} %}
  4. {% if page.header.subtitle %}
  5. <h3 >{{ page.header.subtitle }}</h3>
  6. {% endif %}
  7. {% include 'partials/blog/date.html.twig' %}
  8. {% include 'partials/blog/category.html.twig' %}
  9. {% include 'partials/blog/taxonomy.html.twig' %}
  10. </div>
  11. {% endif %}
  12. <p class="prev-next text-center">
  13. {% if not page.isLast %}
  14. <a class="btn" href="{{ page.prevSibling.url }}">
  15. <span class="title">{{ page.prevSibling.title }}</span>
  16. {% if page.prevSibling.taxonomy.category %}
  17. <span class="tags">
  18. {% for category in page.prevSibling.taxonomy.category %}
  19. {{ category }}
  20. {% endfor %}
  21. </span>
  22. {% endif %}
  23. <span class="blog-date">
  24. <time class="dt-published" datetime="{{ page.date|date("c") }}">
  25. {{ page.prevSibling.date|date("Y") }}
  26. </time>
  27. </span>
  28. </a>
  29. {% endif %}
  30. {% if not page.isFirst %}
  31. <a class="btn" href="{{ page.nextSibling.url }}">
  32. <span class="title">{{ page.nextSibling.title }}</span>
  33. {% if page.nextSibling.taxonomy.category %}
  34. <span class="tags">
  35. {% for category in page.nextSibling.taxonomy.category %}
  36. {{ category }}
  37. {% endfor %}
  38. </span>
  39. {% endif %}
  40. <span class="blog-date">
  41. <time class="dt-published" datetime="{{ page.date|date("c") }}">
  42. {{ page.nextSibling.date|date("Y") }}
  43. </time>
  44. </span>
  45. </a>
  46. {% endif %}
  47. </p>
  48. <div class="e-content">
  49. {{ page.content|raw }}
  50. </div>
  51. <div class="img">
  52. {% set image = page.media.images|first %}
  53. {% if image %}
  54. {{ image.cropZoom(800,400).html }}
  55. {% endif %}
  56. </div>
  57. <div class="top">
  58. <a href="#page-wrapper">
  59. <img src="" alt="">
  60. <p>top</p>
  61. </a>
  62. </div>