danger.html.twig 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. {% extends 'partials/base.html.twig' %}
  2. {% block content %}
  3. {% include 'partials/head.html.twig' %}
  4. <div class="columns medium-12 medium-offset-0 small-11 small-offset-1 ss_menu">
  5. <div class="row">
  6. {% for module in page.header.sections %}
  7. <div class="">
  8. <a href="#{{module.title|hyphenize}}" >{{module.title}}</a>
  9. </div>
  10. {% endfor %}
  11. </div>
  12. </div>
  13. {% include 'partials/sidebar.html.twig' %}
  14. <div class="post columns small-12">
  15. <div class="row">
  16. <div class="columns post_content large-12 large-offset-0 medium-12 medium-offset-0 small-10 small-offset-1">
  17. <div class="row">
  18. <div class="columns small-8 small-offset-4">
  19. {{ page.header.intro}}
  20. </div>
  21. {% for member in page.header.memberList %}
  22. <div class="columns medium-4 medium-offset-0 small-12 membre" id="{{member.membre|replace({' ': '_'})}}">
  23. {% if page.find(member.article).url %}
  24. <a href="{{page.find(member.article).url}}">
  25. {% else %}
  26. <a href="">
  27. {% endif %}
  28. <div class="pays">
  29. <mark>{{member.pays}}</mark>
  30. </div>
  31. <div class="picture">
  32. <img src="{{ uri.url }}/{{member.photo}}" alt="">
  33. <mark>{{member.membre}}</mark>
  34. </div>
  35. <div class="info">
  36. <div class="row">
  37. {% set stat = member.statut %}
  38. {% switch stat %}
  39. {% case 'menace' %}
  40. <div class="columns small-3 pic">
  41. <img src="{{ url('theme://images/menace.png') }}" alt="">
  42. </div>
  43. <div class="columns small-8">
  44. <p class="date">{{t('DANGER.MENACE')|e}}
  45. {% if lang == "fr" %}
  46. {{member.menace|date('d')}} {{'GRAV.MONTHS_OF_THE_YEAR'|ta(member.menace|date('n') - 1)}} {{member.menace|date('Y')}}
  47. {% else %}
  48. {{'GRAV.MONTHS_OF_THE_YEAR'|ta(member.menace|date('n') - 1)}} {{member.menace|date('d')}}, {{member.menace|date('Y')}}
  49. {% endif %}
  50. </p>
  51. <p>
  52. <b>{{member.menace_type}}</b>
  53. </p>
  54. </div>
  55. {% case 'prison' %}
  56. <div class="columns small-3 pic">
  57. <img src="{{ url('theme://images/prison.png') }}" alt="">
  58. </div>
  59. <div class="columns small-8">
  60. <p class="date">{{t('DANGER.PRISON')|e}}
  61. {% if lang == "fr" %}
  62. {{member.prison|date('d')}} {{'GRAV.MONTHS_OF_THE_YEAR'|ta(member.prison|date('n') - 1)}} {{member.prison|date('Y')}}
  63. {% else %}
  64. {{'GRAV.MONTHS_OF_THE_YEAR'|ta(member.prison|date('n') - 1)}} {{member.prison|date('d')}}, {{member.prison|date('Y')}}
  65. {% endif %}
  66. </p>
  67. <p><b>{{t('DANGER.PRISON')|e}}<br/> {{nicetime(member.prison, true, false)}}</b></p>
  68. </div>
  69. {% case 'free' %}
  70. <div class="columns small-3 pic">
  71. <img src="{{ url('theme://images/free.png') }}" alt="">
  72. </div>
  73. <div class="columns small-8">
  74. <p class="date">{{t('DANGER.FREE')|e}}
  75. {% if lang == "fr" %}
  76. {{member.free|date('d')}} {{'GRAV.MONTHS_OF_THE_YEAR'|ta(member.free|date('n') - 1)}} {{member.free|date('Y')}}
  77. {% else %}
  78. {{'GRAV.MONTHS_OF_THE_YEAR'|ta(member.free|date('n') - 1)}} {{member.free|date('d')}}, {{member.free|date('Y')}}
  79. {% endif %}
  80. </p>
  81. <p><b>Encore en danger</b></p>
  82. </div>
  83. {% default %}
  84. <p>error</p>
  85. {% endswitch %}
  86. </div>
  87. </div>
  88. <div class="resume">
  89. {{member.text}}
  90. </div>
  91. <div class="act">
  92. {% if member.textreso %}
  93. {% if lang == "fr" %}
  94. <h5>Comment agir ?</h5>
  95. {{ member.textreso }}
  96. {% else %}
  97. <h5>How to act ?</h5>
  98. {{ member.textreso }}
  99. {% endif %}
  100. {% endif %}
  101. {% if lang == "fr" %}
  102. <h5>Partager sur les réseaux</h5>
  103. {% else %}
  104. <h5>Share on social media</h5>
  105. {% endif %}
  106. <div class="row">
  107. <div class="columns small-3 post_picto">
  108. <a href="mailto:mail?subject={{ page.title }}&body={{ uri.url }}#{{member.membre|replace({' ': '_'})}}">
  109. <img src="{{ url('theme://images/contact.svg') }}" alt="">
  110. </a>
  111. </div>
  112. <div class="columns small-3 post_picto">
  113. <a href="https://www.facebook.com/sharer/sharer.php?u={{uri.url}}#{{member.membre|replace({' ': '_'})}}" target="_blank">
  114. <img src="{{ url('theme://images/f.svg') }}" alt="">
  115. </a>
  116. </div>
  117. <div class="columns small-3 post_picto">
  118. <a href="https://twitter.com/intent/tweet?url={{uri.url}}#{{member.membre|replace({' ': '_'})}}&text={{ page.title }}" target="_blank">
  119. <img src="{{ url('theme://images/t.svg') }}" alt="">
  120. </a>
  121. </div>
  122. <div class="columns small-3 post_picto">
  123. <a href="https://www.linkedin.com/shareArticle?mini=true&url={{ uri.url }}#{{member.membre|replace({' ': '_'})}}&title={{ page.title }}" target="_blank">
  124. <img src="{{ url('theme://images/in.svg') }}" alt="">
  125. </a>
  126. </div>
  127. </div>
  128. </div>
  129. </a>
  130. </div>
  131. {% endfor %}
  132. </div>
  133. {% if page.header.datavis == 1 %}
  134. <div id="datavis" class="columns large-12 large-offset-0 medium-12 medium-offset-0 small-10 small-offset-1" >
  135. <h2>{{ page.header.datavis_title}}</h2>
  136. <p>{{ page.header.datavis_text}}</p>
  137. {% set data = getJson() %}
  138. </div>
  139. {% endif %}
  140. </div>
  141. </div>
  142. </div>
  143. {% if page.header.datavis == 1 %}
  144. <div class="overlay_danger">
  145. <div class="row">
  146. {% set coa_page = page.find("/coalitions") %}
  147. {% set c = 0 %}
  148. {% for coa in coa_page.children %}
  149. {% if coa.header.member|length > 0 %}
  150. {% for activist in coa.header.member %}
  151. <div class="columns small-10 small-offset-1 fiche" data-ref="{{c}}_{{activist.membre|replace({' ': ''})}}">
  152. <div class="row ">
  153. <div class="large-1 close-btn large-offset-11"></div>
  154. <div class="small-12">
  155. <div class=" row description">
  156. <div class="small-12 medium-6">
  157. <img class="member_pic" src="{{coa.url}}/{{activist.photo}}" alt="">
  158. </div>
  159. <div class="small-12 medium-6">
  160. <h3> {{coa.title}} </h3>
  161. <mark class="act_name"> {{activist.membre}} </mark>
  162. <p>
  163. <span class="info_date" >Arrêté·e le {{activist.prison|date('d')}} {{'GRAV.MONTHS_OF_THE_YEAR'|ta(activist.prison|date('n') - 1)}} {{activist.prison|date('Y')}} </span><br/>
  164. {% if activist.free %}
  165. <span class="info_date" >Libéré·e le {{activist.free|date('d')}} {{'GRAV.MONTHS_OF_THE_YEAR'|ta(activist.free|date('n') - 1)}} {{activist.free|date('Y')}} </span><br/>
  166. {% else %}
  167. <span class="info_date" >Toujours en prison </span><br/>
  168. {% endif %}
  169. <br/>
  170. {{activist.text}}
  171. </p>
  172. </div>
  173. </div>
  174. </div>
  175. </div>
  176. </div>
  177. {% set c = c + 1 %}
  178. {% endfor %}
  179. {% endif %}
  180. {% endfor %}
  181. </div>
  182. </div>
  183. {% endif %}
  184. {% if page.header.datavis == 1 %}
  185. <script type="text/javascript">
  186. let data = {{ data|json_encode|raw }};
  187. displayDataviz(data);
  188. $( window ).resize(function() {
  189. $(".chart").remove();
  190. displayDataviz(data);
  191. });
  192. $(".close-btn").on("click", function(){
  193. /* console.log($(".overlay_danger"));*/
  194. $(".overlay_danger").hide();
  195. $("body").find('.fiche').fadeOut();
  196. $("body").removeClass("no-scroll");
  197. });
  198. $(".overlay_danger").on("click", function(){
  199. /* console.log($(".overlay_danger"));*/
  200. $(".overlay_danger").hide();
  201. $("body").find('.fiche').fadeOut();
  202. $("body").removeClass("no-scroll");
  203. });
  204. $("#datavis").on("click",".label_info", function(){
  205. let ref = $(this).data("ref");
  206. $("body").find('.fiche[data-ref="'+ref+'"]').fadeIn();
  207. $(".overlay_danger").show();
  208. $("body").addClass("no-scroll");
  209. });
  210. $("#datavis").on("click",".miniItem", function(){
  211. let ref = $(this).data("ref");
  212. $("body").find('.fiche[data-ref="'+ref+'"]').fadeIn();
  213. $(".overlay_danger").show();
  214. $("body").addClass("no-scroll");
  215. });
  216. </script>
  217. {% endif %}
  218. {% endblock %}