imio.smartweb.core 1.2.38__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.
- imio/smartweb/core/behaviors/categorization.py +24 -0
- imio/smartweb/core/behaviors/configure.zcml +7 -0
- imio/smartweb/core/browser/controlpanel.py +43 -0
- imio/smartweb/core/browser/faceted/block_view.pt +4 -4
- imio/smartweb/core/browser/faceted/summary_view.pt +4 -4
- imio/smartweb/core/browser/sitemap.py +10 -3
- imio/smartweb/core/browser/static/icons/action-delete.svg +3 -0
- imio/smartweb/core/browser/static/icons/action-engagement-2.svg +4 -0
- imio/smartweb/core/browser/static/icons/action-panneaux.svg +3 -0
- imio/smartweb/core/browser/static/icons/action-vote.svg +3 -0
- imio/smartweb/core/browser/static/icons/categorie-attention.svg +3 -0
- imio/smartweb/core/browser/static/icons/categorie-infos-travaux-2.svg +4 -0
- imio/smartweb/core/browser/static/icons/categorie-nature.svg +3 -0
- imio/smartweb/core/browser/static/icons/categorie-parcs-a-conteneurs.svg +4 -0
- imio/smartweb/core/browser/static/icons/categorie-plus.svg +3 -0
- imio/smartweb/core/browser/static/icons/categorie-primes-2.svg +5 -0
- imio/smartweb/core/browser/static/icons/categorie-sport-natation.svg +4 -0
- imio/smartweb/core/browser/static/icons/organisation-ecole-sac.svg +4 -0
- imio/smartweb/core/browser/static/icons/organisation-scout.svg +3 -0
- imio/smartweb/core/browser/static/icons/reseausocial-behance.svg +3 -0
- imio/smartweb/core/browser/static/icons/reseausocial-linkedin.svg +3 -0
- imio/smartweb/core/browser/static/smartweb-edit-compiled.css +1 -1
- imio/smartweb/core/browser/static/smartweb-view-compiled.css +1 -1
- imio/smartweb/core/browser/static/src/edit.less +42 -0
- imio/smartweb/core/browser/static/src/view.less +109 -56
- imio/smartweb/core/browser/vocabulary.py +8 -3
- imio/smartweb/core/contents/__init__.py +2 -0
- imio/smartweb/core/contents/configure.zcml +1 -0
- imio/smartweb/core/contents/folder/block_view.pt +8 -8
- imio/smartweb/core/contents/folder/summary_view.pt +4 -4
- imio/smartweb/core/contents/pages/cirkwi/content.py +5 -0
- imio/smartweb/core/contents/pages/cirkwi/view.py +2 -1
- imio/smartweb/core/contents/pages/configure.zcml +1 -0
- imio/smartweb/core/contents/pages/portal_page/view.py +3 -0
- imio/smartweb/core/contents/pages/views.py +47 -1
- imio/smartweb/core/contents/publication/__init__.py +0 -0
- imio/smartweb/core/contents/publication/configure.zcml +5 -0
- imio/smartweb/core/contents/publication/content.py +23 -0
- imio/smartweb/core/contents/rest/base.py +9 -7
- imio/smartweb/core/contents/rest/directory/endpoint.py +2 -2
- imio/smartweb/core/contents/rest/directory/view.pt +2 -1
- imio/smartweb/core/contents/rest/events/content.py +13 -0
- imio/smartweb/core/contents/rest/events/endpoint.py +5 -3
- imio/smartweb/core/contents/rest/events/view.pt +5 -1
- imio/smartweb/core/contents/rest/events/view.py +12 -0
- imio/smartweb/core/contents/rest/news/content.py +6 -0
- imio/smartweb/core/contents/rest/news/endpoint.py +4 -2
- imio/smartweb/core/contents/rest/news/view.pt +4 -1
- imio/smartweb/core/contents/rest/news/view.py +8 -0
- imio/smartweb/core/contents/rest/utils.py +0 -1
- imio/smartweb/core/contents/rest/view.py +4 -0
- imio/smartweb/core/contents/sections/common_templates/carousel.pt +5 -1
- imio/smartweb/core/contents/sections/common_templates/table.pt +18 -4
- imio/smartweb/core/contents/sections/configure.zcml +18 -0
- imio/smartweb/core/contents/sections/contact/content.py +2 -2
- imio/smartweb/core/contents/sections/contact/macros.pt +28 -3
- imio/smartweb/core/contents/sections/contact/utils.py +2 -0
- imio/smartweb/core/contents/sections/contact/view.py +28 -12
- imio/smartweb/core/contents/sections/events/content.py +12 -4
- imio/smartweb/core/contents/sections/events/view.py +20 -2
- imio/smartweb/core/contents/sections/external_content/view.pt +4 -4
- imio/smartweb/core/contents/sections/external_content/views.py +6 -4
- imio/smartweb/core/contents/sections/files/content.py +7 -1
- imio/smartweb/core/contents/sections/files/view.py +43 -12
- imio/smartweb/core/contents/sections/links/view.py +5 -0
- imio/smartweb/core/contents/sections/macros.pt +26 -0
- imio/smartweb/core/contents/sections/news/content.py +11 -3
- imio/smartweb/core/contents/sections/news/view.py +20 -2
- imio/smartweb/core/contents/sections/text/views.py +2 -0
- imio/smartweb/core/contents/sections/views.py +73 -10
- imio/smartweb/core/interfaces.py +4 -0
- imio/smartweb/core/profiles/default/metadata.xml +1 -1
- imio/smartweb/core/profiles/default/taxonomies/page_category.xml +16 -0
- imio/smartweb/core/profiles/default/taxonomies/procedure_category.xml +26 -0
- imio/smartweb/core/profiles/default/types/imio.smartweb.EventsView.xml +1 -0
- imio/smartweb/core/profiles/default/types/imio.smartweb.NewsView.xml +1 -0
- imio/smartweb/core/profiles/default/types/imio.smartweb.Publication.xml +38 -0
- imio/smartweb/core/profiles/default/types/imio.smartweb.SectionEvents.xml +1 -0
- imio/smartweb/core/profiles/default/types/imio.smartweb.SectionFiles.xml +2 -0
- imio/smartweb/core/profiles/default/types/imio.smartweb.SectionNews.xml +1 -0
- imio/smartweb/core/profiles/default/types.xml +1 -0
- imio/smartweb/core/profiles/icons/basic/registry.xml +120 -0
- imio/smartweb/core/rest/authentic_sources.py +17 -2
- imio/smartweb/core/subscribers.py +48 -0
- imio/smartweb/core/subscribers.zcml +12 -0
- imio/smartweb/core/tests/resources/json_iadeliberations_institutions.json +60 -0
- imio/smartweb/core/tests/resources/json_iadeliberations_publication.json +105 -0
- imio/smartweb/core/tests/resources/json_iadeliberations_publications.json +270 -0
- imio/smartweb/core/tests/resources/json_rest_events.json +6 -2
- imio/smartweb/core/tests/resources/json_rest_news.json +2 -2
- imio/smartweb/core/tests/resources/json_rest_specific_events.json +1 -1
- imio/smartweb/core/tests/test_htmx_in_sections.py +131 -0
- imio/smartweb/core/tests/test_iadeliberations.py +136 -0
- imio/smartweb/core/tests/test_icons.py +1 -1
- imio/smartweb/core/tests/test_rest.py +58 -17
- imio/smartweb/core/tests/test_section_contact.py +42 -10
- imio/smartweb/core/tests/test_section_events.py +28 -5
- imio/smartweb/core/tests/test_section_external_content.py +28 -2
- imio/smartweb/core/tests/test_section_news.py +30 -8
- imio/smartweb/core/tests/test_sections.py +17 -0
- imio/smartweb/core/tests/test_vocabularies.py +60 -3
- imio/smartweb/core/tests/test_vocabulary.py +43 -0
- imio/smartweb/core/upgrades/configure.zcml +108 -0
- imio/smartweb/core/upgrades/profiles/1055_to_1056/types/imio.smartweb.SectionFiles.xml +12 -0
- imio/smartweb/core/upgrades/profiles/1056_to_1057/types/imio.smartweb.EventsView.xml +11 -0
- imio/smartweb/core/upgrades/profiles/1056_to_1057/types/imio.smartweb.NewsView.xml +11 -0
- imio/smartweb/core/upgrades/profiles/1056_to_1057/types/imio.smartweb.SectionEvents.xml +11 -0
- imio/smartweb/core/upgrades/profiles/1056_to_1057/types/imio.smartweb.SectionNews.xml +11 -0
- imio/smartweb/core/upgrades/profiles/1057_to_1058/taxonomies/page_category.cfg +9 -0
- imio/smartweb/core/upgrades/profiles/1057_to_1058/taxonomies/page_category.xml +73 -0
- imio/smartweb/core/upgrades/profiles/1057_to_1058/taxonomies/procedure_category.cfg +9 -0
- imio/smartweb/core/upgrades/profiles/1057_to_1058/taxonomies/procedure_category.xml +118 -0
- imio/smartweb/core/upgrades/profiles/1058_to_1059/registry/linkedin-icon.xml +126 -0
- imio/smartweb/core/upgrades/profiles/1059_to_1060/registry/iadeliberation.xml +9 -0
- imio/smartweb/core/upgrades/profiles/1060_to_1061/types/imio.smartweb.Publication.xml +38 -0
- imio/smartweb/core/upgrades/profiles/1060_to_1061/types/imio.smartweb.SectionFiles.xml +11 -0
- imio/smartweb/core/upgrades/profiles/1060_to_1061/types.xml +4 -0
- imio/smartweb/core/upgrades/profiles/1060_to_1061/workflows.xml +6 -0
- imio/smartweb/core/utils.py +33 -2
- imio/smartweb/core/viewlets/configure.zcml +23 -1
- imio/smartweb/core/viewlets/footer.pt +5 -0
- imio/smartweb/core/viewlets/footer.py +5 -0
- imio/smartweb/core/viewlets/htmx.py +15 -0
- imio/smartweb/core/viewlets/htmx_js_header.pt +64 -0
- imio/smartweb/core/viewlets/ogptags.py +4 -3
- imio/smartweb/core/viewlets/social.py +23 -0
- imio/smartweb/core/vocabularies.py +65 -3
- imio/smartweb/core/vocabularies.zcml +18 -0
- imio/smartweb/core/webcomponents/build/1c1605a5fe9a2b10a88f.png +1 -0
- imio/smartweb/core/webcomponents/build/524db40e119aa11f4478.png +1 -0
- imio/smartweb/core/webcomponents/build/57d3b7cb1ab874660b39.svg +1 -0
- imio/smartweb/core/webcomponents/build/6cf03871df23ed2ee8b3.png +1 -0
- imio/smartweb/core/webcomponents/build/css/373.smartweb-webcomponents-compiled.css +1 -1
- imio/smartweb/core/webcomponents/build/css/486.smartweb-webcomponents-compiled.css +1 -1
- imio/smartweb/core/webcomponents/build/css/884.smartweb-webcomponents-compiled.css +1 -0
- imio/smartweb/core/webcomponents/build/css/919.smartweb-webcomponents-compiled.css +1 -1
- imio/smartweb/core/webcomponents/build/css/smartweb-webcomponents-compiled.css +1 -1
- imio/smartweb/core/webcomponents/build/js/218.smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/218.smartweb-webcomponents-compiled.js.LICENSE.txt +10 -8
- imio/smartweb/core/webcomponents/build/js/373.smartweb-webcomponents-compiled.js +2 -1
- imio/smartweb/core/webcomponents/build/js/{568.smartweb-webcomponents-compiled.js.LICENSE.txt → 373.smartweb-webcomponents-compiled.js.LICENSE.txt} +0 -4
- imio/smartweb/core/webcomponents/build/js/486.smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/499.smartweb-webcomponents-compiled.js +2 -0
- imio/smartweb/core/webcomponents/build/js/{674.smartweb-webcomponents-compiled.js.LICENSE.txt → 499.smartweb-webcomponents-compiled.js.LICENSE.txt} +1 -8
- imio/smartweb/core/webcomponents/build/js/799.smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/824.smartweb-webcomponents-compiled.js +2 -0
- imio/smartweb/core/webcomponents/build/js/828.smartweb-webcomponents-compiled.js +2 -0
- imio/smartweb/core/webcomponents/build/js/828.smartweb-webcomponents-compiled.js.LICENSE.txt +32 -0
- imio/smartweb/core/webcomponents/build/js/884.smartweb-webcomponents-compiled.js +1 -0
- imio/smartweb/core/webcomponents/build/js/919.smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/{568.smartweb-webcomponents-compiled.js → 963.smartweb-webcomponents-compiled.js} +2 -2
- imio/smartweb/core/webcomponents/build/js/963.smartweb-webcomponents-compiled.js.LICENSE.txt +3 -0
- imio/smartweb/core/webcomponents/build/js/smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/smartweb-webcomponents-compiled.js.LICENSE.txt +11 -14
- imio/smartweb/core/webcomponents/package.json +42 -40
- imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.jsx +146 -79
- imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.scss +415 -351
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactCard/ContactCard.jsx +95 -62
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/ContactContent.jsx +328 -168
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactList/ContactList.jsx +21 -4
- imio/smartweb/core/webcomponents/src/components/Annuaire/Filters/Filter.jsx +213 -100
- imio/smartweb/core/webcomponents/src/components/Annuaire/index.js +1 -1
- imio/smartweb/core/webcomponents/src/components/Events/EventCard/EventCard.jsx +76 -33
- imio/smartweb/core/webcomponents/src/components/Events/EventContent/EventContent.jsx +604 -377
- imio/smartweb/core/webcomponents/src/components/Events/EventList/EventList.jsx +29 -4
- imio/smartweb/core/webcomponents/src/components/Events/Events.jsx +162 -88
- imio/smartweb/core/webcomponents/src/components/Events/Events.scss +496 -378
- imio/smartweb/core/webcomponents/src/components/Events/Filters/Filter.jsx +259 -91
- imio/smartweb/core/webcomponents/src/components/Filters/DateFilter.jsx +62 -55
- imio/smartweb/core/webcomponents/src/components/Filters/DateFilter.scss +68 -17
- imio/smartweb/core/webcomponents/src/components/Filters/IamData.jsx +42 -0
- imio/smartweb/core/webcomponents/src/components/Filters/MainFilter.scss +229 -0
- imio/smartweb/core/webcomponents/src/components/Filters/PublicTargetData.jsx +94 -0
- imio/smartweb/core/webcomponents/src/components/Filters/SelectStyles.js +58 -0
- imio/smartweb/core/webcomponents/src/components/Filters/TaxonomyFilter.jsx +149 -0
- imio/smartweb/core/webcomponents/src/components/Filters/TaxonomyFilter.scss +70 -0
- imio/smartweb/core/webcomponents/src/components/News/Filters/Filter.jsx +139 -83
- imio/smartweb/core/webcomponents/src/components/News/News.jsx +133 -67
- imio/smartweb/core/webcomponents/src/components/News/News.scss +170 -127
- imio/smartweb/core/webcomponents/src/components/News/NewsCard/NewsCard.jsx +76 -44
- imio/smartweb/core/webcomponents/src/components/News/NewsContent/NewsContent.jsx +261 -188
- imio/smartweb/core/webcomponents/src/components/News/NewsList/NewsList.jsx +48 -9
- imio/smartweb/core/webcomponents/src/components/Search/ContactResult/ContactResult.jsx +21 -10
- imio/smartweb/core/webcomponents/src/components/Search/EventsResult/EventsResult.jsx +21 -10
- imio/smartweb/core/webcomponents/src/components/Search/Filters/Filter.jsx +8 -9
- imio/smartweb/core/webcomponents/src/components/Search/NewsResult/NewsResult.jsx +23 -12
- imio/smartweb/core/webcomponents/src/components/Search/Search.jsx +7 -6
- imio/smartweb/core/webcomponents/src/components/Search/Search.scss +115 -96
- imio/smartweb/core/webcomponents/src/components/Search/WebResult/WebResult.jsx +12 -3
- imio/smartweb/core/webcomponents/src/components/Search/index.js +1 -1
- imio/smartweb/core/webcomponents/src/hooks/ScrollContext.jsx +3 -0
- imio/smartweb/core/webcomponents/src/hooks/useAxios.js +3 -3
- imio/smartweb/core/webcomponents/src/hooks/useFilterQuery.js +1 -2
- imio/smartweb/core/webcomponents/src/index.scss +255 -211
- imio/smartweb/core/webcomponents/src/utils/Map.jsx +26 -19
- imio/smartweb/core/webcomponents/src/utils/Map.scss +2 -2
- imio/smartweb/core/webcomponents/src/utils/translation.js +129 -9
- imio.smartweb.core-1.2.79-py3.8-nspkg.pth +2 -0
- {imio.smartweb.core-1.2.38.dist-info → imio.smartweb.core-1.2.79.dist-info}/METADATA +403 -10
- {imio.smartweb.core-1.2.38.dist-info → imio.smartweb.core-1.2.79.dist-info}/RECORD +206 -160
- {imio.smartweb.core-1.2.38.dist-info → imio.smartweb.core-1.2.79.dist-info}/WHEEL +1 -1
- imio/smartweb/core/webcomponents/build/assets/location-bla.1423bcce16ddcb21141430cac1428dc1.svg +0 -1
- imio/smartweb/core/webcomponents/build/assets/next-react-white.819cb069ac8eec300a9db6a7707712d6.svg +0 -1
- imio/smartweb/core/webcomponents/build/assets/next-react.17bc43ff4a6a86f4520f5782f6a89a72.svg +0 -1
- imio/smartweb/core/webcomponents/build/assets/search.57bdbf5b191499cd77514097d1c4972c.svg +0 -1
- imio/smartweb/core/webcomponents/build/css/686.smartweb-webcomponents-compiled.css +0 -1
- imio/smartweb/core/webcomponents/build/js/209.smartweb-webcomponents-compiled.js +0 -2
- imio/smartweb/core/webcomponents/build/js/40.smartweb-webcomponents-compiled.js +0 -1
- imio/smartweb/core/webcomponents/build/js/674.smartweb-webcomponents-compiled.js +0 -2
- imio/smartweb/core/webcomponents/build/js/686.smartweb-webcomponents-compiled.js +0 -1
- imio/smartweb/core/webcomponents/src/assets/facebook-news.svg +0 -1
- imio/smartweb/core/webcomponents/src/assets/location-bla.svg +0 -1
- imio/smartweb/core/webcomponents/src/assets/next-react.svg +0 -1
- imio/smartweb/core/webcomponents/src/assets/search.svg +0 -1
- imio/smartweb/core/webcomponents/src/assets/skeleton.svg +0 -1
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/download.svg +0 -1
- imio.smartweb.core-1.2.38-py3.8-nspkg.pth +0 -3
- /imio/smartweb/core/webcomponents/build/js/{209.smartweb-webcomponents-compiled.js.LICENSE.txt → 824.smartweb-webcomponents-compiled.js.LICENSE.txt} +0 -0
- {imio.smartweb.core-1.2.38.dist-info → imio.smartweb.core-1.2.79.dist-info}/LICENSE.GPL +0 -0
- {imio.smartweb.core-1.2.38.dist-info → imio.smartweb.core-1.2.79.dist-info}/LICENSE.rst +0 -0
- {imio.smartweb.core-1.2.38.dist-info → imio.smartweb.core-1.2.79.dist-info}/namespace_packages.txt +0 -0
- {imio.smartweb.core-1.2.38.dist-info → imio.smartweb.core-1.2.79.dist-info}/top_level.txt +0 -0
@@ -1,189 +1,232 @@
|
|
1
1
|
.breadcrumb {
|
2
|
-
|
2
|
+
padding: 0;
|
3
3
|
}
|
4
|
+
|
4
5
|
.r-result-list {
|
5
|
-
|
6
|
-
|
7
|
-
|
6
|
+
margin-top: 50px;
|
7
|
+
padding-left: 0;
|
8
|
+
list-style: none;
|
8
9
|
}
|
10
|
+
|
9
11
|
#portal-column-content {
|
10
|
-
|
11
|
-
|
12
|
-
|
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
|
-
|
20
|
+
display: none;
|
18
21
|
}
|
22
|
+
|
19
23
|
/* image */
|
20
24
|
/* text */
|
21
25
|
.r-item-text {
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
+
margin: 20px 30px;
|
27
|
+
position: relative;
|
28
|
+
display: flex;
|
29
|
+
flex-direction: column;
|
26
30
|
}
|
31
|
+
|
27
32
|
.r-item-title {
|
28
|
-
|
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
|
-
|
39
|
+
padding-bottom: 60%;
|
42
40
|
}
|
41
|
+
|
43
42
|
.new-content {
|
44
|
-
|
45
|
-
|
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
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
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
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
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
|
-
|
92
|
-
|
97
|
+
font-size: 18px;
|
98
|
+
font-weight: bold;
|
93
99
|
}
|
100
|
+
|
94
101
|
.r-item-description {
|
95
|
-
|
96
|
-
|
97
|
-
|
102
|
+
font-size: 16px;
|
103
|
+
color: #444444;
|
104
|
+
margin-top: 10px;
|
98
105
|
}
|
106
|
+
|
99
107
|
/* image */
|
100
108
|
.r-item-img {
|
101
|
-
|
109
|
+
border-radius: 15px 15px 15px 0px;
|
102
110
|
}
|
111
|
+
|
103
112
|
.r-actu-wrapper {
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
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
|
-
|
128
|
+
margin-top: auto;
|
118
129
|
}
|
130
|
+
|
119
131
|
.r-item-arrow-more {
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
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
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
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
|
-
|
146
|
-
|
147
|
-
|
159
|
+
@media screen and (max-width: 774px) {
|
160
|
+
flex-direction: column;
|
161
|
+
}
|
148
162
|
}
|
163
|
+
|
149
164
|
.r-item-read-more {
|
150
|
-
|
151
|
-
|
152
|
-
|
165
|
+
@media screen and (max-width: 600px) {
|
166
|
+
position: relative;
|
167
|
+
}
|
153
168
|
}
|
154
169
|
|
155
170
|
.icon-baseline {
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
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
|
-
|
168
|
-
|
184
|
+
display: inline-block;
|
185
|
+
vertical-align: top;
|
169
186
|
}
|
170
187
|
|
171
188
|
.r-content-news-info-social {
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
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
|
3
|
+
import ReactMarkdown from "react-markdown";
|
4
4
|
import { Translate } from "react-translated";
|
5
|
-
import { LanguageContext } from
|
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
|
11
|
-
|
12
|
-
? item.taxonomy_contact_category[0].title
|
13
|
-
: "";
|
12
|
+
const description = item.description || "";
|
13
|
+
|
14
14
|
useEffect(() => {
|
15
15
|
if (description.length >= numberLimit) {
|
16
|
-
|
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.
|
23
|
-
const lastModified = moment(item.modified).startOf(
|
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
|
-
|
26
|
-
<div
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
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
|
-
|
60
|
-
</div>
|
92
|
+
</>
|
61
93
|
);
|
62
94
|
};
|
63
95
|
|