blog-item.html.twig 2.2 KB

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