post.html.twig 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. {% extends 'partials/base.html.twig' %}
  2. {% block content %}
  3. {% include 'partials/head.html.twig' %}
  4. <div class="columns large-3 medium-3 medium-offset-0 small-10 small-offset-1 side_container">
  5. {% include 'partials/sidebar.html.twig' %}
  6. </div>
  7. <div class="post columns large-9 medium-9 small-12">
  8. <div class="row">
  9. <div class=" columns large-1 medium-1 medium-offset-0 small-10 small-offset-1" style="height:auto;">
  10. <div class="row post_picto_container">
  11. <div class="columns large-12 medium-12 medium-offset-0 small-1 small-offset-8 ">
  12. <div class="post_picto">
  13. <a href="mailto:mail?subject={{ page.title }}&body={{ uri.url }}">
  14. <img src="{{ url('theme://images/contact.svg') }}" alt="">
  15. </a>
  16. </div>
  17. </div>
  18. <div class="columns large-12 medium-12 small-1">
  19. <div class="post_picto">
  20. <a href="https://www.facebook.com/sharer/sharer.php?u={{uri.url }}" target="_blank">
  21. <img src="{{ url('theme://images/f.svg') }}" alt="">
  22. </a>
  23. </div>
  24. </div>
  25. <div class="columns large-12 medium-12 small-1">
  26. <div class="post_picto">
  27. <a href="https://twitter.com/intent/tweet?url={{ uri.url }}&text={{ page.title }}" target="_blank">
  28. <img src="{{ url('theme://images/t.svg') }}" alt="">
  29. </a>
  30. </div>
  31. </div>
  32. <div class="columns large-12 medium-12 small-1">
  33. <div class="post_picto">
  34. <a href="https://www.linkedin.com/shareArticle?mini=true&url={{ uri.url }}&title={{ page.title }}" target="_blank">
  35. <img src="{{ url('theme://images/in.svg') }}" alt="">
  36. </a>
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. <div class="columns post_content large-11 large-offset-0 medium-11 medium-offset-0 small-10 small-offset-1">
  42. <div class="row info_post">
  43. {% for cat in page.header.taxonomy.tag %}
  44. {% if cat == "Tribune" %}
  45. {% set source = url('theme://images/trib.svg') %}
  46. {% else %}
  47. {% set source = url('theme://images/com.svg') %}
  48. {% endif %}
  49. <div class=" columns large-12"><span class="post_cat"><img src="{{ source }}" alt=""> {{ cat }}</span>&nbsp;&nbsp;{{ (page.header.date != "") ? "Posté le "~page.header.date~", " : '' }} {{ (page.header.publish_date != "") ? "modifié le "~page.header.publish_date : '' }} {{ (page.header.author != "") ? "par "~page.header.author : '' }}</div>
  50. {% endfor %}
  51. </div>
  52. <p>
  53. {{ page.content }}
  54. </p>
  55. </div>
  56. </div>
  57. </div>
  58. <div class="post_bottom columns large-12 ">
  59. <div class="row">
  60. <div class="columns large-12 medium-12 small-12">
  61. <h1 class="inter" >{{ page.find('/actualites').title }}</h1>
  62. </div>
  63. {% for post in page.find('/actualites').children.remove(page.slug).order('date', 'desc').slice(0, 2) %}
  64. {% set source = post.header.media_thumbnail %}
  65. {% if source != null%}
  66. {% set info = "url('"~post.url~"/"~source~"')" %}
  67. {% else %}
  68. {% set info = null %}
  69. {% endif %}
  70. <div class=" columns large-6 medium-6 medium-offset-0 small-8 small-offset-2 recent-posts">
  71. <div class=" row ">
  72. <div class="columns large-12 thumb_news">
  73. <a style="background:{{ info }};" href="{{ post.url }}">
  74. <div class="row">
  75. <div class="columns large-8 align-self-bottom">
  76. <mark>{{ post.title }}</mark>
  77. <span class="tag" ><span>{{ post.header.taxonomy.tag|first }}</span></span>
  78. </div>
  79. </div>
  80. </a>
  81. </div>
  82. </div>
  83. </div>
  84. {% endfor %}
  85. {% for post in page.find('/actualites').children.remove(page.slug).order('date', 'desc').slice(2,3) %}
  86. {% set source = post.header.media_thumbnail %}
  87. {% if source != null%}
  88. {% set info = "url('"~post.url~"/"~source~"')" %}
  89. {% else %}
  90. {% set info = null %}
  91. {% endif %}
  92. <div class="columns large-4 medium-4 medium-offset-0 small-8 small-offset-2 recent-posts">
  93. <div class=" row ">
  94. <div class="columns large-12 thumb_news">
  95. <a style="background:{{ info }};" href="{{ post.url }}">
  96. <div class="row">
  97. <div class="columns large-11 align-self-bottom">
  98. <mark>{{ post.title }}</mark>
  99. <span class="tag" ><span>{{ post.header.taxonomy.tag|first }}</span></span>
  100. </div>
  101. </div>
  102. </a>
  103. </div>
  104. </div>
  105. </div>
  106. {% endfor %}
  107. <div class="columns large-12 medium-12 medium-offset-0 small-8 small-offset-2 ">
  108. <a class="seemore" href="../actualites"> voir toutes les actualités</a>
  109. </div>
  110. </div>
  111. </div>
  112. <script>
  113. $("p img").each(function(){
  114. $(this).attr("src", window.location.href+"/"+$(this).attr("src"))
  115. });
  116. </script>
  117. {% endblock %}