power.html.twig 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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. <div class="columns large-3 medium-3 medium-offset-0 small-10 small-offset-1 side_container">
  14. <div class="row">
  15. <div class="columns small-12 extra_content">
  16. {% if lang == "fr" %}
  17. <a href="{{page.find('\/home\/lappel').url}}" >L'appel</a>
  18. {% else %}
  19. <a href="{{page.find('\/home\/lappel').url}}" >Our plea</a>
  20. {% endif %}
  21. </div>
  22. <div class="columns small-12 extra_content">
  23. {% if lang == "fr" %}
  24. <a href="{{page.find('\/home\/5-questions').url}}" >5 questions pour comprendre la mobilisation</a>
  25. {% else %}
  26. <a href="{{page.find('\/home\/5-questions').url}}" >5 questions to understand mobilisation</a>
  27. {% endif %}
  28. </div>
  29. <div class="columns small-12 extra_content">
  30. {% if lang == "fr" %}
  31. <a href="{{page.find('\/membres-en-danger').url}}" >Nos membres en danger</a>
  32. {% else %}
  33. <a href="{{page.find('\/membres-en-danger').url}}" >Our members in danger</a>
  34. {% endif %}
  35. </div>
  36. </div>
  37. {% include 'partials/sidebar.html.twig' %}
  38. </div>
  39. <div class="post columns large-9 medium-9 small-12">
  40. <div class="row">
  41. <div class=" columns large-1 medium-1 medium-offset-0 small-10 small-offset-1" style="height:auto;">
  42. <div class="row post_picto_container">
  43. <div class="columns large-12 medium-12 medium-offset-0 small-1 small-offset-8 ">
  44. <div class="post_picto">
  45. <a href="mailto:mail?subject={{ page.title }}&body={{uri.url}}">
  46. <img src="{{ url('theme:\/\/images\/contact.svg') }}" alt="">
  47. </a>
  48. </div>
  49. </div>
  50. <div class="columns large-12 medium-12 small-1">
  51. <div class="post_picto">
  52. <a href="https://www.facebook.com/sharer/sharer.php?u={{uri.url}}" target="_blank">
  53. <img src="{{ url('theme:\/\/images\/f.svg') }}" alt="">
  54. </a>
  55. </div>
  56. </div>
  57. <div class="columns large-12 medium-12 small-1">
  58. <div class="post_picto">
  59. <a href="https://twitter.com/intent/tweet?url={{ uri.url }}&text={{ page.title }}" target="_blank">
  60. <img src="{{ url('theme:\/\/images\/t.svg') }}" alt="">
  61. </a>
  62. </div>
  63. </div>
  64. <div class="columns large-12 medium-12 small-1">
  65. <div class="post_picto">
  66. <a href="https://www.linkedin.com/shareArticle?mini=true&url={{ uri.url }}&title={{ page.title }}" target="_blank">
  67. <img src="{{ url('theme:\/\/images\/in.svg') }}" alt="">
  68. </a>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. <div class="columns post_content podiums large-11 large-offset-0 medium-11 medium-offset-0 small-10 small-offset-1">
  74. {% set this_year = "now"|date('Y')|number_format %}
  75. {% if lang == "fr" %}
  76. <h3 class="inter">TOP 10 DES DICTATEURS AU POUVOIR</h3>
  77. {% else %}
  78. <h3 class="inter">Top 10 dictators in power</h3>
  79. {% endif %}
  80. <p>{{ page.header.dictateurIntro }}</p>
  81. <br>
  82. <div class="row dictateurs">
  83. {% set max = this_year|number_format - page.header.topDic|first.years|number_format %}
  84. {% for dic in page.header.topDic %}
  85. <div class="columns small-5 dicInfo">
  86. <b>
  87. {{ dic.name }},<br/>
  88. {{ dic.country }}
  89. </b>
  90. </div>
  91. <div class="columns small-7 align-self-middle">
  92. {% set c = this_year|number_format - dic.years|number_format %}
  93. {% set p = c * 80 / max %}
  94. <div class="chartBar" style="height:100%; width:{{ p }}%">
  95. <span><b>{{ c * -1 }}</b></span>
  96. </div>
  97. <div class="crown" style="width:calc( 100% - {{ p }}%)">
  98. <img src="{{uri.url}}/{{ dic.dicpic }}" alt="">
  99. <div class="crown_pic" style="content: url({{ url('theme:\/\/images\/crown.svg') }});" ></div>
  100. </div>
  101. </div>
  102. {% endfor %}
  103. <div class="columns small-5 dicInfo"></div>
  104. <div class="columns small-7 align-self-middle">
  105. <div class="" style="height:100%; width:100%">
  106. <b>{{header.classementType}}</b>
  107. </div>
  108. </div>
  109. </div>
  110. <br><br>
  111. {% if land == "fr" %}
  112. <h3 class="inter">Classement - Pourcentage population ayant connu une même famille ou personne au pouvoir</h3>
  113. {% else %}
  114. <h3 class="inter">Ranking - Percentage of population having known the same family or person in power</h3>
  115. {% endif %}
  116. <div class="row countries">
  117. {% for c in page.header.classement %}
  118. <div class="columns small-6 country">
  119. <div class="flag"><div class="percent">{{ c.perc }}%</div><img src="{{uri.url}}\/{{c.flag}}" alt=""></div>
  120. <div class="cinfo">
  121. <span class="orange">{{c.name}}</span><br/>
  122. {{ c.info }}
  123. </div>
  124. </div>
  125. {% endfor %}
  126. </div>
  127. </div>
  128. </div>
  129. </div>
  130. <script type="text/javascript">
  131. if($(".crown_pic").length > 0) {
  132. $(".crown_pic").each(function(){
  133. let angle = Math.random() * 20 - 1;
  134. console.log(angle);
  135. $(this).css("transform", "rotate("+angle+"deg)")
  136. });
  137. }
  138. </script>
  139. {% endblock %}