imio.smartweb.core 1.2.37__py3-none-any.whl → 1.2.79__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. imio/smartweb/core/behaviors/categorization.py +24 -0
  2. imio/smartweb/core/behaviors/configure.zcml +7 -0
  3. imio/smartweb/core/browser/controlpanel.py +43 -0
  4. imio/smartweb/core/browser/faceted/block_view.pt +4 -4
  5. imio/smartweb/core/browser/faceted/summary_view.pt +4 -4
  6. imio/smartweb/core/browser/sitemap.py +10 -3
  7. imio/smartweb/core/browser/static/icons/action-delete.svg +3 -0
  8. imio/smartweb/core/browser/static/icons/action-engagement-2.svg +4 -0
  9. imio/smartweb/core/browser/static/icons/action-panneaux.svg +3 -0
  10. imio/smartweb/core/browser/static/icons/action-vote.svg +3 -0
  11. imio/smartweb/core/browser/static/icons/categorie-attention.svg +3 -0
  12. imio/smartweb/core/browser/static/icons/categorie-infos-travaux-2.svg +4 -0
  13. imio/smartweb/core/browser/static/icons/categorie-nature.svg +3 -0
  14. imio/smartweb/core/browser/static/icons/categorie-parcs-a-conteneurs.svg +4 -0
  15. imio/smartweb/core/browser/static/icons/categorie-plus.svg +3 -0
  16. imio/smartweb/core/browser/static/icons/categorie-primes-2.svg +5 -0
  17. imio/smartweb/core/browser/static/icons/categorie-sport-natation.svg +4 -0
  18. imio/smartweb/core/browser/static/icons/organisation-ecole-sac.svg +4 -0
  19. imio/smartweb/core/browser/static/icons/organisation-scout.svg +3 -0
  20. imio/smartweb/core/browser/static/icons/reseausocial-behance.svg +3 -0
  21. imio/smartweb/core/browser/static/icons/reseausocial-linkedin.svg +3 -0
  22. imio/smartweb/core/browser/static/smartweb-edit-compiled.css +1 -1
  23. imio/smartweb/core/browser/static/smartweb-view-compiled.css +1 -1
  24. imio/smartweb/core/browser/static/src/edit.less +42 -0
  25. imio/smartweb/core/browser/static/src/view.less +109 -56
  26. imio/smartweb/core/browser/vocabulary.py +8 -3
  27. imio/smartweb/core/contents/__init__.py +2 -0
  28. imio/smartweb/core/contents/configure.zcml +1 -0
  29. imio/smartweb/core/contents/folder/block_view.pt +8 -8
  30. imio/smartweb/core/contents/folder/summary_view.pt +4 -4
  31. imio/smartweb/core/contents/pages/cirkwi/content.py +5 -0
  32. imio/smartweb/core/contents/pages/cirkwi/view.py +2 -1
  33. imio/smartweb/core/contents/pages/configure.zcml +1 -0
  34. imio/smartweb/core/contents/pages/portal_page/view.py +3 -0
  35. imio/smartweb/core/contents/pages/views.py +47 -1
  36. imio/smartweb/core/contents/publication/__init__.py +0 -0
  37. imio/smartweb/core/contents/publication/configure.zcml +5 -0
  38. imio/smartweb/core/contents/publication/content.py +23 -0
  39. imio/smartweb/core/contents/rest/base.py +9 -7
  40. imio/smartweb/core/contents/rest/directory/endpoint.py +2 -2
  41. imio/smartweb/core/contents/rest/directory/view.pt +2 -1
  42. imio/smartweb/core/contents/rest/events/content.py +13 -0
  43. imio/smartweb/core/contents/rest/events/endpoint.py +5 -3
  44. imio/smartweb/core/contents/rest/events/view.pt +5 -1
  45. imio/smartweb/core/contents/rest/events/view.py +12 -0
  46. imio/smartweb/core/contents/rest/news/content.py +6 -0
  47. imio/smartweb/core/contents/rest/news/endpoint.py +4 -2
  48. imio/smartweb/core/contents/rest/news/view.pt +4 -1
  49. imio/smartweb/core/contents/rest/news/view.py +8 -0
  50. imio/smartweb/core/contents/rest/utils.py +0 -1
  51. imio/smartweb/core/contents/rest/view.py +4 -0
  52. imio/smartweb/core/contents/sections/common_templates/carousel.pt +5 -1
  53. imio/smartweb/core/contents/sections/common_templates/table.pt +18 -4
  54. imio/smartweb/core/contents/sections/configure.zcml +18 -0
  55. imio/smartweb/core/contents/sections/contact/content.py +2 -2
  56. imio/smartweb/core/contents/sections/contact/macros.pt +28 -3
  57. imio/smartweb/core/contents/sections/contact/utils.py +2 -0
  58. imio/smartweb/core/contents/sections/contact/view.py +28 -12
  59. imio/smartweb/core/contents/sections/events/content.py +12 -4
  60. imio/smartweb/core/contents/sections/events/view.py +20 -2
  61. imio/smartweb/core/contents/sections/external_content/view.pt +4 -4
  62. imio/smartweb/core/contents/sections/external_content/views.py +6 -4
  63. imio/smartweb/core/contents/sections/files/content.py +7 -1
  64. imio/smartweb/core/contents/sections/files/view.py +43 -12
  65. imio/smartweb/core/contents/sections/links/view.py +5 -0
  66. imio/smartweb/core/contents/sections/macros.pt +26 -0
  67. imio/smartweb/core/contents/sections/news/content.py +11 -3
  68. imio/smartweb/core/contents/sections/news/view.py +20 -2
  69. imio/smartweb/core/contents/sections/text/views.py +2 -0
  70. imio/smartweb/core/contents/sections/views.py +73 -10
  71. imio/smartweb/core/interfaces.py +4 -0
  72. imio/smartweb/core/profiles/default/metadata.xml +1 -1
  73. imio/smartweb/core/profiles/default/taxonomies/page_category.xml +16 -0
  74. imio/smartweb/core/profiles/default/taxonomies/procedure_category.xml +26 -0
  75. imio/smartweb/core/profiles/default/types/imio.smartweb.EventsView.xml +1 -0
  76. imio/smartweb/core/profiles/default/types/imio.smartweb.NewsView.xml +1 -0
  77. imio/smartweb/core/profiles/default/types/imio.smartweb.Publication.xml +38 -0
  78. imio/smartweb/core/profiles/default/types/imio.smartweb.SectionEvents.xml +1 -0
  79. imio/smartweb/core/profiles/default/types/imio.smartweb.SectionFiles.xml +2 -0
  80. imio/smartweb/core/profiles/default/types/imio.smartweb.SectionNews.xml +1 -0
  81. imio/smartweb/core/profiles/default/types.xml +1 -0
  82. imio/smartweb/core/profiles/icons/basic/registry.xml +120 -0
  83. imio/smartweb/core/rest/authentic_sources.py +17 -2
  84. imio/smartweb/core/subscribers.py +48 -0
  85. imio/smartweb/core/subscribers.zcml +12 -0
  86. imio/smartweb/core/tests/resources/json_iadeliberations_institutions.json +60 -0
  87. imio/smartweb/core/tests/resources/json_iadeliberations_publication.json +105 -0
  88. imio/smartweb/core/tests/resources/json_iadeliberations_publications.json +270 -0
  89. imio/smartweb/core/tests/resources/json_rest_events.json +6 -2
  90. imio/smartweb/core/tests/resources/json_rest_news.json +2 -2
  91. imio/smartweb/core/tests/resources/json_rest_specific_events.json +1 -1
  92. imio/smartweb/core/tests/test_htmx_in_sections.py +131 -0
  93. imio/smartweb/core/tests/test_iadeliberations.py +136 -0
  94. imio/smartweb/core/tests/test_icons.py +1 -1
  95. imio/smartweb/core/tests/test_rest.py +58 -17
  96. imio/smartweb/core/tests/test_section_contact.py +42 -10
  97. imio/smartweb/core/tests/test_section_events.py +28 -5
  98. imio/smartweb/core/tests/test_section_external_content.py +28 -2
  99. imio/smartweb/core/tests/test_section_news.py +30 -8
  100. imio/smartweb/core/tests/test_sections.py +17 -0
  101. imio/smartweb/core/tests/test_vocabularies.py +60 -3
  102. imio/smartweb/core/tests/test_vocabulary.py +43 -0
  103. imio/smartweb/core/upgrades/configure.zcml +108 -0
  104. imio/smartweb/core/upgrades/profiles/1055_to_1056/types/imio.smartweb.SectionFiles.xml +12 -0
  105. imio/smartweb/core/upgrades/profiles/1056_to_1057/types/imio.smartweb.EventsView.xml +11 -0
  106. imio/smartweb/core/upgrades/profiles/1056_to_1057/types/imio.smartweb.NewsView.xml +11 -0
  107. imio/smartweb/core/upgrades/profiles/1056_to_1057/types/imio.smartweb.SectionEvents.xml +11 -0
  108. imio/smartweb/core/upgrades/profiles/1056_to_1057/types/imio.smartweb.SectionNews.xml +11 -0
  109. imio/smartweb/core/upgrades/profiles/1057_to_1058/taxonomies/page_category.cfg +9 -0
  110. imio/smartweb/core/upgrades/profiles/1057_to_1058/taxonomies/page_category.xml +73 -0
  111. imio/smartweb/core/upgrades/profiles/1057_to_1058/taxonomies/procedure_category.cfg +9 -0
  112. imio/smartweb/core/upgrades/profiles/1057_to_1058/taxonomies/procedure_category.xml +118 -0
  113. imio/smartweb/core/upgrades/profiles/1058_to_1059/registry/linkedin-icon.xml +126 -0
  114. imio/smartweb/core/upgrades/profiles/1059_to_1060/registry/iadeliberation.xml +9 -0
  115. imio/smartweb/core/upgrades/profiles/1060_to_1061/types/imio.smartweb.Publication.xml +38 -0
  116. imio/smartweb/core/upgrades/profiles/1060_to_1061/types/imio.smartweb.SectionFiles.xml +11 -0
  117. imio/smartweb/core/upgrades/profiles/1060_to_1061/types.xml +4 -0
  118. imio/smartweb/core/upgrades/profiles/1060_to_1061/workflows.xml +6 -0
  119. imio/smartweb/core/utils.py +33 -2
  120. imio/smartweb/core/viewlets/configure.zcml +23 -1
  121. imio/smartweb/core/viewlets/footer.pt +5 -0
  122. imio/smartweb/core/viewlets/footer.py +5 -0
  123. imio/smartweb/core/viewlets/htmx.py +15 -0
  124. imio/smartweb/core/viewlets/htmx_js_header.pt +64 -0
  125. imio/smartweb/core/viewlets/ogptags.py +4 -3
  126. imio/smartweb/core/viewlets/social.py +23 -0
  127. imio/smartweb/core/vocabularies.py +65 -3
  128. imio/smartweb/core/vocabularies.zcml +18 -0
  129. imio/smartweb/core/webcomponents/build/1c1605a5fe9a2b10a88f.png +1 -0
  130. imio/smartweb/core/webcomponents/build/524db40e119aa11f4478.png +1 -0
  131. imio/smartweb/core/webcomponents/build/57d3b7cb1ab874660b39.svg +1 -0
  132. imio/smartweb/core/webcomponents/build/6cf03871df23ed2ee8b3.png +1 -0
  133. imio/smartweb/core/webcomponents/build/css/373.smartweb-webcomponents-compiled.css +1 -1
  134. imio/smartweb/core/webcomponents/build/css/486.smartweb-webcomponents-compiled.css +1 -1
  135. imio/smartweb/core/webcomponents/build/css/884.smartweb-webcomponents-compiled.css +1 -0
  136. imio/smartweb/core/webcomponents/build/css/919.smartweb-webcomponents-compiled.css +1 -1
  137. imio/smartweb/core/webcomponents/build/css/smartweb-webcomponents-compiled.css +1 -1
  138. imio/smartweb/core/webcomponents/build/js/218.smartweb-webcomponents-compiled.js +1 -1
  139. imio/smartweb/core/webcomponents/build/js/218.smartweb-webcomponents-compiled.js.LICENSE.txt +10 -8
  140. imio/smartweb/core/webcomponents/build/js/373.smartweb-webcomponents-compiled.js +2 -1
  141. imio/smartweb/core/webcomponents/build/js/{568.smartweb-webcomponents-compiled.js.LICENSE.txt → 373.smartweb-webcomponents-compiled.js.LICENSE.txt} +0 -4
  142. imio/smartweb/core/webcomponents/build/js/486.smartweb-webcomponents-compiled.js +1 -1
  143. imio/smartweb/core/webcomponents/build/js/499.smartweb-webcomponents-compiled.js +2 -0
  144. imio/smartweb/core/webcomponents/build/js/{674.smartweb-webcomponents-compiled.js.LICENSE.txt → 499.smartweb-webcomponents-compiled.js.LICENSE.txt} +1 -8
  145. imio/smartweb/core/webcomponents/build/js/799.smartweb-webcomponents-compiled.js +1 -1
  146. imio/smartweb/core/webcomponents/build/js/824.smartweb-webcomponents-compiled.js +2 -0
  147. imio/smartweb/core/webcomponents/build/js/828.smartweb-webcomponents-compiled.js +2 -0
  148. imio/smartweb/core/webcomponents/build/js/828.smartweb-webcomponents-compiled.js.LICENSE.txt +32 -0
  149. imio/smartweb/core/webcomponents/build/js/884.smartweb-webcomponents-compiled.js +1 -0
  150. imio/smartweb/core/webcomponents/build/js/919.smartweb-webcomponents-compiled.js +1 -1
  151. imio/smartweb/core/webcomponents/build/js/{568.smartweb-webcomponents-compiled.js → 963.smartweb-webcomponents-compiled.js} +2 -2
  152. imio/smartweb/core/webcomponents/build/js/963.smartweb-webcomponents-compiled.js.LICENSE.txt +3 -0
  153. imio/smartweb/core/webcomponents/build/js/smartweb-webcomponents-compiled.js +1 -1
  154. imio/smartweb/core/webcomponents/build/js/smartweb-webcomponents-compiled.js.LICENSE.txt +11 -14
  155. imio/smartweb/core/webcomponents/package.json +42 -40
  156. imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.jsx +146 -79
  157. imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.scss +415 -351
  158. imio/smartweb/core/webcomponents/src/components/Annuaire/ContactCard/ContactCard.jsx +95 -62
  159. imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/ContactContent.jsx +328 -168
  160. imio/smartweb/core/webcomponents/src/components/Annuaire/ContactList/ContactList.jsx +21 -4
  161. imio/smartweb/core/webcomponents/src/components/Annuaire/Filters/Filter.jsx +213 -100
  162. imio/smartweb/core/webcomponents/src/components/Annuaire/index.js +1 -1
  163. imio/smartweb/core/webcomponents/src/components/Events/EventCard/EventCard.jsx +76 -33
  164. imio/smartweb/core/webcomponents/src/components/Events/EventContent/EventContent.jsx +604 -377
  165. imio/smartweb/core/webcomponents/src/components/Events/EventList/EventList.jsx +29 -4
  166. imio/smartweb/core/webcomponents/src/components/Events/Events.jsx +162 -88
  167. imio/smartweb/core/webcomponents/src/components/Events/Events.scss +496 -378
  168. imio/smartweb/core/webcomponents/src/components/Events/Filters/Filter.jsx +259 -91
  169. imio/smartweb/core/webcomponents/src/components/Filters/DateFilter.jsx +62 -55
  170. imio/smartweb/core/webcomponents/src/components/Filters/DateFilter.scss +68 -17
  171. imio/smartweb/core/webcomponents/src/components/Filters/IamData.jsx +42 -0
  172. imio/smartweb/core/webcomponents/src/components/Filters/MainFilter.scss +229 -0
  173. imio/smartweb/core/webcomponents/src/components/Filters/PublicTargetData.jsx +94 -0
  174. imio/smartweb/core/webcomponents/src/components/Filters/SelectStyles.js +58 -0
  175. imio/smartweb/core/webcomponents/src/components/Filters/TaxonomyFilter.jsx +149 -0
  176. imio/smartweb/core/webcomponents/src/components/Filters/TaxonomyFilter.scss +70 -0
  177. imio/smartweb/core/webcomponents/src/components/News/Filters/Filter.jsx +139 -83
  178. imio/smartweb/core/webcomponents/src/components/News/News.jsx +133 -67
  179. imio/smartweb/core/webcomponents/src/components/News/News.scss +170 -127
  180. imio/smartweb/core/webcomponents/src/components/News/NewsCard/NewsCard.jsx +76 -44
  181. imio/smartweb/core/webcomponents/src/components/News/NewsContent/NewsContent.jsx +261 -188
  182. imio/smartweb/core/webcomponents/src/components/News/NewsList/NewsList.jsx +48 -9
  183. imio/smartweb/core/webcomponents/src/components/Search/ContactResult/ContactResult.jsx +21 -10
  184. imio/smartweb/core/webcomponents/src/components/Search/EventsResult/EventsResult.jsx +21 -10
  185. imio/smartweb/core/webcomponents/src/components/Search/Filters/Filter.jsx +8 -9
  186. imio/smartweb/core/webcomponents/src/components/Search/NewsResult/NewsResult.jsx +23 -12
  187. imio/smartweb/core/webcomponents/src/components/Search/Search.jsx +7 -6
  188. imio/smartweb/core/webcomponents/src/components/Search/Search.scss +115 -96
  189. imio/smartweb/core/webcomponents/src/components/Search/WebResult/WebResult.jsx +12 -3
  190. imio/smartweb/core/webcomponents/src/components/Search/index.js +1 -1
  191. imio/smartweb/core/webcomponents/src/hooks/ScrollContext.jsx +3 -0
  192. imio/smartweb/core/webcomponents/src/hooks/useAxios.js +3 -3
  193. imio/smartweb/core/webcomponents/src/hooks/useFilterQuery.js +1 -2
  194. imio/smartweb/core/webcomponents/src/index.scss +255 -211
  195. imio/smartweb/core/webcomponents/src/utils/Map.jsx +26 -19
  196. imio/smartweb/core/webcomponents/src/utils/Map.scss +2 -2
  197. imio/smartweb/core/webcomponents/src/utils/translation.js +129 -9
  198. imio.smartweb.core-1.2.79-py3.8-nspkg.pth +2 -0
  199. {imio.smartweb.core-1.2.37.dist-info → imio.smartweb.core-1.2.79.dist-info}/METADATA +413 -10
  200. {imio.smartweb.core-1.2.37.dist-info → imio.smartweb.core-1.2.79.dist-info}/RECORD +206 -160
  201. {imio.smartweb.core-1.2.37.dist-info → imio.smartweb.core-1.2.79.dist-info}/WHEEL +1 -1
  202. imio/smartweb/core/webcomponents/build/assets/location-bla.1423bcce16ddcb21141430cac1428dc1.svg +0 -1
  203. imio/smartweb/core/webcomponents/build/assets/next-react-white.819cb069ac8eec300a9db6a7707712d6.svg +0 -1
  204. imio/smartweb/core/webcomponents/build/assets/next-react.17bc43ff4a6a86f4520f5782f6a89a72.svg +0 -1
  205. imio/smartweb/core/webcomponents/build/assets/search.57bdbf5b191499cd77514097d1c4972c.svg +0 -1
  206. imio/smartweb/core/webcomponents/build/css/686.smartweb-webcomponents-compiled.css +0 -1
  207. imio/smartweb/core/webcomponents/build/js/209.smartweb-webcomponents-compiled.js +0 -2
  208. imio/smartweb/core/webcomponents/build/js/674.smartweb-webcomponents-compiled.js +0 -2
  209. imio/smartweb/core/webcomponents/build/js/686.smartweb-webcomponents-compiled.js +0 -1
  210. imio/smartweb/core/webcomponents/build/js/804.smartweb-webcomponents-compiled.js +0 -1
  211. imio/smartweb/core/webcomponents/src/assets/facebook-news.svg +0 -1
  212. imio/smartweb/core/webcomponents/src/assets/location-bla.svg +0 -1
  213. imio/smartweb/core/webcomponents/src/assets/next-react.svg +0 -1
  214. imio/smartweb/core/webcomponents/src/assets/search.svg +0 -1
  215. imio/smartweb/core/webcomponents/src/assets/skeleton.svg +0 -1
  216. imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/download.svg +0 -1
  217. imio.smartweb.core-1.2.37-py3.10-nspkg.pth +0 -3
  218. /imio/smartweb/core/webcomponents/build/js/{209.smartweb-webcomponents-compiled.js.LICENSE.txt → 824.smartweb-webcomponents-compiled.js.LICENSE.txt} +0 -0
  219. {imio.smartweb.core-1.2.37.dist-info → imio.smartweb.core-1.2.79.dist-info}/LICENSE.GPL +0 -0
  220. {imio.smartweb.core-1.2.37.dist-info → imio.smartweb.core-1.2.79.dist-info}/LICENSE.rst +0 -0
  221. {imio.smartweb.core-1.2.37.dist-info → imio.smartweb.core-1.2.79.dist-info}/namespace_packages.txt +0 -0
  222. {imio.smartweb.core-1.2.37.dist-info → imio.smartweb.core-1.2.79.dist-info}/top_level.txt +0 -0
@@ -1,189 +1,232 @@
1
1
  .breadcrumb {
2
- padding: 0;
2
+ padding: 0;
3
3
  }
4
+
4
5
  .r-result-list {
5
- margin-top: 50px;
6
- padding-left: 0;
7
- list-style: none;
6
+ margin-top: 50px;
7
+ padding-left: 0;
8
+ list-style: none;
8
9
  }
10
+
9
11
  #portal-column-content {
10
- h1 {
11
- font-size: 0px;
12
- position: absolute;
13
- }
12
+ h1 {
13
+ font-size: 0px;
14
+ position: absolute;
15
+ }
14
16
  }
17
+
15
18
  #viewlet-below-content-title,
16
19
  #viewlet-below-content-description {
17
- display: none;
20
+ display: none;
18
21
  }
22
+
19
23
  /* image */
20
24
  /* text */
21
25
  .r-item-text {
22
- margin: 20px 30px;
23
- position: relative;
24
- display: flex;
25
- flex-direction: column;
26
+ margin: 20px 30px;
27
+ position: relative;
28
+ display: flex;
29
+ flex-direction: column;
26
30
  }
31
+
27
32
  .r-item-title {
28
- display: block;
33
+ display: block;
29
34
  }
30
35
 
31
- .r-results-numbers {
32
- width: 100%;
33
- margin-bottom: 0.5rem;
34
- span {
35
- font-weight: bold;
36
- }
37
- }
38
36
  // content
39
37
 
40
38
  .r-content-img {
41
- padding-bottom: 60%;
39
+ padding-bottom: 60%;
42
40
  }
41
+
43
42
  .new-content {
44
- max-width: 700px;
45
- margin: 0 auto;
43
+ max-width: 700px;
44
+ margin: 0 auto;
46
45
  }
46
+
47
47
  //// for bla ////
48
48
  /* list item */
49
49
  .r-load-more {
50
- text-align: center;
51
- margin-bottom: 2rem;
52
- button {
53
- background: #000;
54
- border: solid 1px transparent;
55
- color: #fff;
56
- padding: 0.4rem 1rem;
57
- border-radius: 10px;
58
- border-bottom-left-radius: 10px;
59
- border-bottom-left-radius: 0px;
60
- font-weight: bold;
61
- font-size: 14px;
62
- margin: 0 auto;
63
- display: block;
64
- &:hover {
65
- background: rgba(0, 0, 0, 0.871);
50
+ text-align: center;
51
+ margin-bottom: 2rem;
52
+
53
+ button {
54
+ background: #000;
55
+ border: solid 1px transparent;
56
+ color: #fff;
57
+ padding: 0.4rem 1rem;
58
+ border-radius: 10px;
59
+ border-bottom-left-radius: 10px;
60
+ border-bottom-left-radius: 0px;
61
+ font-weight: bold;
62
+ font-size: 14px;
63
+ margin: 0 auto;
64
+ display: block;
65
+
66
+ &:hover {
67
+ background: rgba(0, 0, 0, 0.871);
68
+ }
66
69
  }
67
- }
68
70
  }
71
+
69
72
  .r-actu-wrapper {
70
- position: relative;
71
- &:after {
72
- width: 495px;
73
- display: block;
74
- position: absolute;
75
- content: url(../../assets/oeil-big.svg);
76
- z-index: -1;
77
- top: 0;
78
- right: 0;
79
- transform: translateY(-20%);
80
- }
81
- .r-list-item-group {
82
- max-width: 900px;
83
- margin: 30px auto;
84
- background: #fff;
85
- border-radius: 15px 15px 15px 0;
86
- border: 1px solid #D1D1D1;
87
- }
73
+ position: relative;
74
+
75
+ &:after {
76
+ width: 495px;
77
+ display: block;
78
+ position: absolute;
79
+ content: url(../../assets/oeil-big.svg);
80
+ z-index: -1;
81
+ top: 0;
82
+ right: 0;
83
+ transform: translateY(-20%);
84
+ }
85
+
86
+ .r-list-item-group {
87
+ max-width: 900px;
88
+ margin: 30px auto;
89
+ background: #fff;
90
+ border-radius: 15px 15px 15px 0;
91
+ border: 1px solid #d1d1d1;
92
+ }
88
93
  }
94
+
89
95
  /* text */
90
96
  .r-item-title {
91
- font-size: 18px;
92
- font-weight: bold;
97
+ font-size: 18px;
98
+ font-weight: bold;
93
99
  }
100
+
94
101
  .r-item-description {
95
- font-size: 16px;
96
- color: #444444;
97
- margin-top: 10px;
102
+ font-size: 16px;
103
+ color: #444444;
104
+ margin-top: 10px;
98
105
  }
106
+
99
107
  /* image */
100
108
  .r-item-img {
101
- border-radius: 15px 15px 15px 0px;
109
+ border-radius: 15px 15px 15px 0px;
102
110
  }
111
+
103
112
  .r-actu-wrapper {
104
- .r-item-img {
105
- width: 100%;
106
- aspect-ratio: 1.674107142857143;
107
- background-position: top;
108
- background-size: cover;
109
- background-repeat: no-repeat;
110
- @media screen and (min-width:775px) {
111
- width: 323px;
113
+ .r-item-img {
114
+ width: 100%;
115
+ aspect-ratio: 1.674107142857143;
116
+ background-position: top;
117
+ background-size: cover;
118
+ background-repeat: no-repeat;
119
+
120
+ @media screen and (min-width: 775px) {
121
+ width: 323px;
122
+ }
112
123
  }
113
- }
114
124
  }
125
+
115
126
  /* arrow more */
116
127
  .r-item-read-more {
117
- margin-top: auto;
128
+ margin-top: auto;
118
129
  }
130
+
119
131
  .r-item-arrow-more {
120
- width: 50px;
121
- height: 50px;
122
- background: #F9B331;
123
- border-radius: 50px;
124
- flex: 0 0 50px;
125
- margin-left: auto;
126
- align-self: center;
127
- margin-right: 30px;
128
- background: url(../../assets/next-react.svg);
129
- background-repeat: no-repeat;
130
- background-size: 20px;
131
- background-position: center;
132
+ width: 50px;
133
+ height: 50px;
134
+ background: #f9b331;
135
+ border-radius: 50px;
136
+ flex: 0 0 50px;
137
+ margin-left: auto;
138
+ align-self: center;
139
+ margin-right: 30px;
140
+ background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20.44 10'%3E%3Cg id='Calque_2' data-name='Calque 2'%3E%3Cg id='Calque_1-2' data-name='Calque 1'%3E%3Cg id='ui-arrow-right'%3E%3Cg id='arrow'%3E%3Cline id='Ligne_7' data-name='Ligne 7' x1='1' y1='5' x2='19.44' y2='5' style='fill:none;stroke:%23000;stroke-linecap:round;stroke-width:2px'/%3E%3Cline id='Ligne_8' data-name='Ligne 8' x1='14.83' y1='1' x2='19.44' y2='5' style='fill:none;stroke:%23000;stroke-linecap:round;stroke-width:2px'/%3E%3Cline id='Ligne_9' data-name='Ligne 9' x1='14.83' y1='9' x2='19.44' y2='5' style='fill:none;stroke:%23000;stroke-linecap:round;stroke-width:2px'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
141
+ background-repeat: no-repeat;
142
+ background-size: 20px;
143
+ background-position: center;
132
144
  }
145
+
133
146
  .r-list-item-group {
134
- &:hover {
135
- .r-item-arrow-more {
136
- background: url(../../assets/next-react-white.svg), #F9B331;
137
- background-repeat: no-repeat;
138
- background-size: 20px;
139
- background-position: center;
147
+ &:hover {
148
+ .r-item-arrow-more {
149
+ background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20.44 10'%3E%3Cg data-name='Calque 2'%3E%3Cg data-name='Calque 1'%3E%3Cpath d='M1 5h18.44' data-name='Ligne 7' style='fill:none;stroke:%23fff;stroke-linecap:round;stroke-width:2px'/%3E%3Cpath d='m14.83 1 4.61 4' data-name='Ligne 8' style='fill:none;stroke:%23fff;stroke-linecap:round;stroke-width:2px'/%3E%3Cpath d='m14.83 9 4.61-4' data-name='Ligne 9' style='fill:none;stroke:%23fff;stroke-linecap:round;stroke-width:2px'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
150
+ #f9b331;
151
+ background-repeat: no-repeat;
152
+ background-size: 20px;
153
+ background-position: center;
154
+ }
140
155
  }
141
- }
142
156
  }
143
157
 
144
158
  .r-list-item {
145
- @media screen and (max-width:600px) {
146
- flex-direction: column;
147
- }
159
+ @media screen and (max-width: 774px) {
160
+ flex-direction: column;
161
+ }
148
162
  }
163
+
149
164
  .r-item-read-more {
150
- @media screen and (max-width:600px) {
151
- position: relative;
152
- }
165
+ @media screen and (max-width: 600px) {
166
+ position: relative;
167
+ }
153
168
  }
154
169
 
155
170
  .icon-baseline {
156
- display: inline-flex;
157
- align-self: center;
158
- margin-right: 0.4rem;
159
- svg {
160
- top: .125em;
161
- position: relative;
162
- height: 1em;
163
- width: 1em;
164
- }
171
+ display: inline-flex;
172
+ align-self: center;
173
+ margin-right: 0.4rem;
174
+
175
+ svg {
176
+ top: 0.125em;
177
+ position: relative;
178
+ height: 1em;
179
+ width: 1em;
180
+ }
165
181
  }
182
+
166
183
  .dpinlb {
167
- display: inline-block;
168
- vertical-align: top;
184
+ display: inline-block;
185
+ vertical-align: top;
169
186
  }
170
187
 
171
188
  .r-content-news-info-social {
172
- svg {
173
- width: 30px;
174
- height: 30px;
175
- }
176
- ul {
177
- display: flex;
178
- align-items: center;
179
- margin: 0;
180
- li {
181
- list-style: none;
182
- a {
183
- &:hover {
184
- opacity: .7;
189
+ svg {
190
+ width: 30px;
191
+ height: 30px;
192
+ }
193
+
194
+ ul {
195
+ display: flex;
196
+ align-items: center;
197
+ margin: 0;
198
+
199
+ li {
200
+ list-style: none;
201
+
202
+ a {
203
+ &:hover {
204
+ opacity: 0.7;
205
+ }
206
+ }
185
207
  }
186
- }
187
208
  }
188
- }
189
- }
209
+ }
210
+
211
+ .r-item-categorie {
212
+ margin-top: 5px;
213
+ text-transform: uppercase;
214
+ color: #747474;
215
+ font-weight: 400;
216
+ font-size: 13px;
217
+ }
218
+
219
+ .r-content-news-info--video {
220
+ position: relative;
221
+ padding-bottom: 56.25%;
222
+ /* 16:9 */
223
+ padding-top: 25px;
224
+ height: 0;
225
+ iframe {
226
+ position: absolute;
227
+ top: 0;
228
+ left: 0;
229
+ width: 100%;
230
+ height: 100%;
231
+ }
232
+ }
@@ -1,63 +1,95 @@
1
1
  import React, { useEffect, useState, useContext } from "react";
2
2
  import moment from "moment";
3
- import ReactMarkdown from 'react-markdown';
3
+ import ReactMarkdown from "react-markdown";
4
4
  import { Translate } from "react-translated";
5
- import { LanguageContext } from '../News.jsx';
6
- const NewsCard = ({ item }) => {
5
+ import { LanguageContext } from "../News.jsx";
6
+ const NewsCard = ({ item, showCategoriesOrTopics }) => {
7
7
  const [limitDescription, setLimitDescription] = useState();
8
+ const [itemTopic, setItemTopic] = useState(null);
9
+
8
10
  const numberLimit = 150;
9
11
  const title = item.title && item.title;
10
- const description = item.description && item.description;
11
- const category = item.taxonomy_contact_category
12
- ? item.taxonomy_contact_category[0].title
13
- : "";
12
+ const description = item.description || "";
13
+
14
14
  useEffect(() => {
15
15
  if (description.length >= numberLimit) {
16
- setLimitDescription(description.substring(0, numberLimit) + "...");
16
+ let truncatedDescription = description.substring(0, numberLimit);
17
+ if (description.endsWith("**")) {
18
+ truncatedDescription += "**";
19
+ }
20
+ setLimitDescription(truncatedDescription + "...");
17
21
  } else {
18
22
  setLimitDescription(description);
19
23
  }
24
+ if (item.topics && item.topics.length > 0) {
25
+ setItemTopic(item.topics[0].title);
26
+ } else {
27
+ setItemTopic(null);
28
+ }
20
29
  }, [item]);
21
- moment.locale(useContext(LanguageContext))
22
- const created = moment(item.created).startOf('minute').fromNow();
23
- const lastModified = moment(item.modified).startOf('minute').fromNow();
30
+ moment.locale(useContext(LanguageContext));
31
+ const created = moment(item.effective).startOf("minute").fromNow();
32
+ const lastModified = moment(item.modified).startOf("minute").fromNow();
24
33
  return (
25
- <div className="r-list-item">
26
- <div
27
- className={item.image_vignette_scale ? "r-item-img" : "r-item-img r-item-img-placeholder"}
28
- style={{
29
- backgroundImage: item.image_vignette_scale
30
- ? "url(" + item.image_vignette_scale + ")"
31
- : "",
32
- }}
33
- />
34
- <div className="r-item-text">
35
- {category ? <span className="r-item-categorie">{category}</span> : ""}
36
- <span className="r-item-title">{title}</span>
37
- {description ?
38
- <ReactMarkdown className="r-item-description">{limitDescription}</ReactMarkdown>
39
- : ""
40
- }
41
- <div className="r-item-read-more" style={{ textDecoration: "none" }}>
42
- {
43
- created === lastModified ?
44
- (
45
- <div className="r-card-date-last">
46
- <span><Translate text="Publié" /> </span>
47
- <span>{created}</span>
48
- </div>
49
- ) :
50
- (
51
- <div className="r-card-date-last">
52
- <span><Translate text="Actualisé" /> </span>
53
- <span>{lastModified}</span>
54
- </div>
55
- )
34
+ <>
35
+ <div className="r-list-item">
36
+ <div
37
+ className={
38
+ item.image_vignette_scale
39
+ ? "r-item-img"
40
+ : "r-item-img r-item-img-placeholder"
56
41
  }
42
+ style={{
43
+ backgroundImage: item.image_vignette_scale
44
+ ? "url(" + item.image_vignette_scale + ")"
45
+ : "",
46
+ }}
47
+ />
48
+ <div className="r-item-text">
49
+ <span className="r-item-title">{title}</span>
50
+ {showCategoriesOrTopics === "topic" ? (
51
+ itemTopic && (
52
+ <span className="r-item-categorie">{item.topics[0].title}</span>
53
+ )
54
+ ) : showCategoriesOrTopics === "category" ? (
55
+ item.local_category ? (
56
+ <span className="r-item-categorie">{item.local_category.title}</span>
57
+ ) : (
58
+ item.category && (
59
+ <span className="r-item-categorie">{item.category.title}</span>
60
+ )
61
+ )
62
+ ) : (
63
+ ""
64
+ )}
65
+ {description ? (
66
+ <ReactMarkdown className="r-item-description">
67
+ {limitDescription}
68
+ </ReactMarkdown>
69
+ ) : (
70
+ ""
71
+ )}
72
+ <div className="r-item-read-more" style={{ textDecoration: "none" }}>
73
+ {created === lastModified ? (
74
+ <div className="r-card-date-last">
75
+ <span>
76
+ <Translate text="Publié" />{" "}
77
+ </span>
78
+ <span>{created}</span>
79
+ </div>
80
+ ) : (
81
+ <div className="r-card-date-last">
82
+ <span>
83
+ <Translate text="Actualisé" />{" "}
84
+ </span>
85
+ <span>{lastModified}</span>
86
+ </div>
87
+ )}
88
+ </div>
57
89
  </div>
90
+ <div className="r-item-arrow-more"></div>
58
91
  </div>
59
- <div className="r-item-arrow-more"></div>
60
- </div>
92
+ </>
61
93
  );
62
94
  };
63
95