imio.smartweb.core 1.2.11__py3-none-any.whl → 1.2.19__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/browser/configure.zcml +1 -1
- imio/smartweb/core/browser/dashboards/configure.zcml +0 -2
- imio/smartweb/core/browser/dashboards/plausible.py +4 -4
- imio/smartweb/core/browser/static/smartweb-edit-compiled.js +1 -1
- imio/smartweb/core/browser/static/src/edit.js +5 -0
- imio/smartweb/core/browser/utils.py +4 -30
- imio/smartweb/core/contents/__init__.py +2 -0
- imio/smartweb/core/contents/rest/base.py +12 -0
- imio/smartweb/core/contents/rest/configure.zcml +7 -0
- imio/smartweb/core/contents/rest/directory/content.py +2 -2
- imio/smartweb/core/contents/rest/directory/view.pt +2 -1
- imio/smartweb/core/contents/rest/directory/view.py +3 -0
- imio/smartweb/core/contents/rest/events/content.py +2 -2
- imio/smartweb/core/contents/rest/events/view.pt +2 -1
- imio/smartweb/core/contents/rest/events/view.py +3 -0
- imio/smartweb/core/contents/rest/news/content.py +2 -2
- imio/smartweb/core/contents/rest/news/view.pt +2 -1
- imio/smartweb/core/contents/rest/news/view.py +3 -0
- imio/smartweb/core/contents/rest/search/endpoint.py +1 -1
- imio/smartweb/core/contents/rest/traversal.py +18 -0
- imio/smartweb/core/contents/rest/view.py +7 -0
- imio/smartweb/core/contents/sections/events/view.py +1 -1
- imio/smartweb/core/contents/sections/news/view.py +1 -1
- imio/smartweb/core/interfaces.py +4 -0
- imio/smartweb/core/profiles/default/actions.xml +15 -0
- imio/smartweb/core/profiles/default/metadata.xml +1 -1
- imio/smartweb/core/rest/authentic_sources.py +47 -10
- imio/smartweb/core/rest/configure.zcml +54 -0
- imio/smartweb/core/tests/test_rest.py +120 -0
- imio/smartweb/core/tests/utils.py +15 -0
- imio/smartweb/core/upgrades/configure.zcml +18 -0
- imio/smartweb/core/upgrades/profiles/1051_to_1052/actions.xml +20 -0
- imio/smartweb/core/utils.py +31 -0
- imio/smartweb/core/viewlets/configure.zcml +11 -0
- imio/smartweb/core/viewlets/httpheaders.py +13 -0
- imio/smartweb/core/viewlets/ogp_tag_header.pt +10 -0
- imio/smartweb/core/viewlets/ogptags.py +8 -0
- imio/smartweb/core/webcomponents/build/css/54.smartweb-webcomponents-compiled.css +1 -0
- imio/smartweb/core/webcomponents/build/css/647.smartweb-webcomponents-compiled.css +1 -0
- imio/smartweb/core/webcomponents/build/js/3.smartweb-webcomponents-compiled.js +2 -0
- imio/smartweb/core/webcomponents/build/js/323.smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/363.smartweb-webcomponents-compiled.js +2 -0
- imio/smartweb/core/webcomponents/build/js/493.smartweb-webcomponents-compiled.js +1 -0
- imio/smartweb/core/webcomponents/build/js/54.smartweb-webcomponents-compiled.js +1 -0
- imio/smartweb/core/webcomponents/build/js/647.smartweb-webcomponents-compiled.js +2 -0
- imio/smartweb/core/webcomponents/build/js/647.smartweb-webcomponents-compiled.js.LICENSE.txt +1 -0
- imio/smartweb/core/webcomponents/build/js/smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/package.json +14 -17
- imio/smartweb/core/webcomponents/src/assets/contentIcon/download.svg +1 -0
- imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.jsx +85 -84
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactCard/ContactCard.jsx +22 -23
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/ContactContent.jsx +109 -93
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/download.svg +1 -0
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactList/ContactList.jsx +7 -7
- imio/smartweb/core/webcomponents/src/components/Events/EventCard/EventCard.jsx +43 -0
- imio/smartweb/core/webcomponents/src/components/Events/{ContactContent/ContactContent.jsx → EventContent/EventContent.jsx} +76 -81
- imio/smartweb/core/webcomponents/src/components/Events/{ContactList/ContactList.jsx → EventList/EventList.jsx} +9 -9
- imio/smartweb/core/webcomponents/src/components/Events/Events.jsx +99 -98
- imio/smartweb/core/webcomponents/src/components/Events/Events.scss +1 -1
- imio/smartweb/core/webcomponents/src/components/News/News.jsx +23 -25
- imio/smartweb/core/webcomponents/src/components/News/News.scss +3 -5
- imio/smartweb/core/webcomponents/src/components/News/{ContactCard/ContactCard.jsx → NewsCard/NewsCard.jsx} +14 -27
- imio/smartweb/core/webcomponents/src/components/News/{ContactContent/ContactContent.jsx → NewsContent/NewsContent.jsx} +37 -40
- imio/smartweb/core/webcomponents/src/components/News/{ContactList/ContactList.jsx → NewsList/NewsList.jsx} +9 -9
- imio/smartweb/core/webcomponents/src/components/Search/ContactResult/ContactResult.jsx +5 -5
- imio/smartweb/core/webcomponents/src/components/Search/EventsResult/EventsResult.jsx +5 -5
- imio/smartweb/core/webcomponents/src/components/Search/NewsResult/NewsResult.jsx +5 -5
- imio/smartweb/core/webcomponents/src/components/Search/WebResult/WebResult.jsx +3 -3
- imio/smartweb/core/webcomponents/src/{components/Events/ContactMap/ContactMap.jsx → utils/Map.jsx} +60 -64
- {imio.smartweb.core-1.2.11.dist-info → imio.smartweb.core-1.2.19.dist-info}/METADATA +72 -1
- {imio.smartweb.core-1.2.11.dist-info → imio.smartweb.core-1.2.19.dist-info}/RECORD +81 -83
- imio/smartweb/core/webcomponents/build/css/267.smartweb-webcomponents-compiled.css +0 -1
- imio/smartweb/core/webcomponents/build/css/779.smartweb-webcomponents-compiled.css +0 -1
- imio/smartweb/core/webcomponents/build/js/267.smartweb-webcomponents-compiled.js +0 -1
- imio/smartweb/core/webcomponents/build/js/552.smartweb-webcomponents-compiled.js +0 -2
- imio/smartweb/core/webcomponents/build/js/565.smartweb-webcomponents-compiled.js +0 -1
- imio/smartweb/core/webcomponents/build/js/612.smartweb-webcomponents-compiled.js +0 -2
- imio/smartweb/core/webcomponents/build/js/779.smartweb-webcomponents-compiled.js +0 -1
- imio/smartweb/core/webcomponents/pnpm-lock.yaml +0 -7066
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactMap/ContactMap.jsx +0 -156
- imio/smartweb/core/webcomponents/src/components/Annuaire/Skeleton/LoaderCss.jsx +0 -7
- imio/smartweb/core/webcomponents/src/components/Annuaire/Skeleton/Skeleton.jsx +0 -20
- imio/smartweb/core/webcomponents/src/components/Events/ContactCard/ContactCard.jsx +0 -49
- imio/smartweb/core/webcomponents/src/components/Events/ContactMap/ContactMap.scss +0 -0
- imio/smartweb/core/webcomponents/src/components/Events/Skeleton/Skeleton.jsx +0 -20
- imio/smartweb/core/webcomponents/src/components/News/ContactMap/ContactMap.jsx +0 -127
- imio/smartweb/core/webcomponents/src/components/News/ContactMap/ContactMap.scss +0 -4
- imio/smartweb/core/webcomponents/src/components/News/Skeleton/Skeleton.jsx +0 -20
- imio/smartweb/core/webcomponents/src/components/Search/Skeleton/Skeleton.jsx +0 -20
- /imio/smartweb/core/webcomponents/build/css/{552.smartweb-webcomponents-compiled.css → 363.smartweb-webcomponents-compiled.css} +0 -0
- /imio/smartweb/core/webcomponents/build/js/{552.smartweb-webcomponents-compiled.js.LICENSE.txt → 3.smartweb-webcomponents-compiled.js.LICENSE.txt} +0 -0
- /imio/smartweb/core/webcomponents/build/js/{612.smartweb-webcomponents-compiled.js.LICENSE.txt → 363.smartweb-webcomponents-compiled.js.LICENSE.txt} +0 -0
- /imio/smartweb/core/webcomponents/src/{components/Annuaire/ContactMap/ContactMap.scss → utils/Map.scss} +0 -0
- /imio.smartweb.core-1.2.11-py3.10-nspkg.pth → /imio.smartweb.core-1.2.19-py3.10-nspkg.pth +0 -0
- {imio.smartweb.core-1.2.11.dist-info → imio.smartweb.core-1.2.19.dist-info}/LICENSE.GPL +0 -0
- {imio.smartweb.core-1.2.11.dist-info → imio.smartweb.core-1.2.19.dist-info}/LICENSE.rst +0 -0
- {imio.smartweb.core-1.2.11.dist-info → imio.smartweb.core-1.2.19.dist-info}/WHEEL +0 -0
- {imio.smartweb.core-1.2.11.dist-info → imio.smartweb.core-1.2.19.dist-info}/namespace_packages.txt +0 -0
- {imio.smartweb.core-1.2.11.dist-info → imio.smartweb.core-1.2.19.dist-info}/top_level.txt +0 -0
@@ -1,8 +1,8 @@
|
|
1
1
|
import React, { useEffect, useState } from "react";
|
2
|
-
import {
|
2
|
+
import { BrowserRouter as Router, Switch, Route } from "react-router-dom";
|
3
3
|
import Filters from "./Filters/Filter";
|
4
|
-
import
|
5
|
-
import
|
4
|
+
import NewsContent from "./NewsContent/NewsContent";
|
5
|
+
import NewsList from "./NewsList/NewsList";
|
6
6
|
import useAxios from "../../hooks/useAxios";
|
7
7
|
import "./News.scss";
|
8
8
|
import useFilterQuery from "../../hooks/useFilterQuery";
|
@@ -11,7 +11,7 @@ import translation from '../../utils/translation';
|
|
11
11
|
|
12
12
|
export default function News(props) {
|
13
13
|
return (
|
14
|
-
<Router>
|
14
|
+
<Router basename={props.viewPath}>
|
15
15
|
<Provider language={props.currentLanguage} translation={translation}>
|
16
16
|
<NewsView
|
17
17
|
queryFilterUrl={props.queryFilterUrl}
|
@@ -29,8 +29,8 @@ const NewsView = (props) => {
|
|
29
29
|
{ b_start: 0, fullobjects: 1 },
|
30
30
|
queryString.parse(useFilterQuery().toString())
|
31
31
|
);
|
32
|
-
const [
|
33
|
-
const [
|
32
|
+
const [itemsArray, setItemsArray] = useState([]);
|
33
|
+
const [itemsNumber, setItemsNumber] = useState([]);
|
34
34
|
const [clickId, setClickId] = useState(null);
|
35
35
|
const [filters, setFilters] = useState(parsed);
|
36
36
|
const [batchStart, setBatchStart] = useState(0);
|
@@ -53,11 +53,11 @@ const NewsView = (props) => {
|
|
53
53
|
useEffect(() => {
|
54
54
|
if (response !== null) {
|
55
55
|
if (isMore) {
|
56
|
-
|
56
|
+
setItemsArray((itemsArray) => [...itemsArray, ...response.items]);
|
57
57
|
} else {
|
58
|
-
|
58
|
+
setItemsArray(response.items);
|
59
59
|
}
|
60
|
-
|
60
|
+
setItemsNumber(response.items_total);
|
61
61
|
}
|
62
62
|
}, [response]);
|
63
63
|
|
@@ -89,8 +89,8 @@ const NewsView = (props) => {
|
|
89
89
|
}, [batchStart]);
|
90
90
|
// coditional list render
|
91
91
|
let listRender;
|
92
|
-
if (
|
93
|
-
listRender = <
|
92
|
+
if (itemsArray && itemsArray.length > 0) {
|
93
|
+
listRender = <NewsList onChange={clickID} itemsArray={itemsArray} />;
|
94
94
|
} else if (!isLoading) {
|
95
95
|
listRender = <p><Translate text="Aucune actualité n'a été trouvée" /></p>;
|
96
96
|
}
|
@@ -99,18 +99,10 @@ const NewsView = (props) => {
|
|
99
99
|
|
100
100
|
return (
|
101
101
|
<div>
|
102
|
-
<Router>
|
103
102
|
<div className="r-wrapper r-actu-wrapper">
|
104
103
|
<div className="r-result r-annuaire-result">
|
105
104
|
<Switch>
|
106
|
-
<Route path=
|
107
|
-
<ContactContent
|
108
|
-
onChange={clickID}
|
109
|
-
onReturn={filtersChange}
|
110
|
-
queryUrl={props.queryUrl}
|
111
|
-
/>
|
112
|
-
</Route>
|
113
|
-
<Route exact path="*">
|
105
|
+
<Route exact path="/">
|
114
106
|
<div className="r-result-filter actu-result-filter">
|
115
107
|
<Filters
|
116
108
|
url={props.queryFilterUrl}
|
@@ -124,10 +116,10 @@ const NewsView = (props) => {
|
|
124
116
|
</div>
|
125
117
|
)
|
126
118
|
}
|
127
|
-
{
|
119
|
+
{itemsNumber > 0 ? (
|
128
120
|
<p className="r-results-numbers">
|
129
|
-
<span>{
|
130
|
-
{
|
121
|
+
<span>{itemsNumber}</span>{" "}
|
122
|
+
{itemsNumber > 1
|
131
123
|
? <Translate text='Actualités trouvées' />
|
132
124
|
: <Translate text='Actualité trouvée' />}
|
133
125
|
</p>
|
@@ -137,7 +129,7 @@ const NewsView = (props) => {
|
|
137
129
|
</div>
|
138
130
|
<div>{listRender}</div>
|
139
131
|
<div className="r-load-more">
|
140
|
-
{
|
132
|
+
{itemsNumber - props.batchSize > batchStart ? (
|
141
133
|
<div>
|
142
134
|
<span className="no-more-result">
|
143
135
|
{isLoading ? divLoader : ""}
|
@@ -153,10 +145,16 @@ const NewsView = (props) => {
|
|
153
145
|
)}
|
154
146
|
</div>
|
155
147
|
</Route>
|
148
|
+
<Route path={"/:name"}>
|
149
|
+
<NewsContent
|
150
|
+
onChange={clickID}
|
151
|
+
onReturn={filtersChange}
|
152
|
+
queryUrl={props.queryUrl}
|
153
|
+
/>
|
154
|
+
</Route>
|
156
155
|
</Switch>
|
157
156
|
</div>
|
158
157
|
</div>
|
159
|
-
</Router>
|
160
158
|
</div>
|
161
159
|
);
|
162
160
|
};
|
@@ -38,7 +38,7 @@
|
|
38
38
|
// content
|
39
39
|
|
40
40
|
.r-content-img {
|
41
|
-
padding-bottom:
|
41
|
+
padding-bottom: 60%;
|
42
42
|
}
|
43
43
|
.new-content {
|
44
44
|
max-width: 700px;
|
@@ -102,15 +102,13 @@
|
|
102
102
|
}
|
103
103
|
.r-actu-wrapper {
|
104
104
|
.r-item-img {
|
105
|
-
|
106
|
-
|
105
|
+
width: 100%;
|
106
|
+
aspect-ratio: 1.674107142857143;
|
107
107
|
background-position: top;
|
108
108
|
background-size: cover;
|
109
109
|
background-repeat: no-repeat;
|
110
110
|
@media screen and (min-width:775px) {
|
111
111
|
width: 323px;
|
112
|
-
height: 220px;
|
113
|
-
flex: 0 0 323px;
|
114
112
|
}
|
115
113
|
}
|
116
114
|
}
|
@@ -1,17 +1,16 @@
|
|
1
1
|
import React, { useEffect, useState } from "react";
|
2
2
|
import moment from "moment";
|
3
3
|
import Moment from "react-moment";
|
4
|
-
import { Link } from "react-router-dom";
|
5
4
|
import removeAccents from "remove-accents";
|
6
5
|
import ReactMarkdown from 'react-markdown';
|
7
6
|
|
8
|
-
const
|
7
|
+
const NewsCard = ({ item }) => {
|
9
8
|
const [limitDescription, setLimitDescription] = useState();
|
10
9
|
const numberLimit = 150;
|
11
|
-
const title =
|
12
|
-
const description =
|
13
|
-
const category =
|
14
|
-
?
|
10
|
+
const title = item.title && item.title;
|
11
|
+
const description = item.description && item.description;
|
12
|
+
const category = item.taxonomy_contact_category
|
13
|
+
? item.taxonomy_contact_category[0].title
|
15
14
|
: "";
|
16
15
|
useEffect(() => {
|
17
16
|
if (description.length >= numberLimit) {
|
@@ -19,17 +18,17 @@ const ContactCard = ({ contactItem }) => {
|
|
19
18
|
} else {
|
20
19
|
setLimitDescription(description);
|
21
20
|
}
|
22
|
-
}, [
|
21
|
+
}, [item]);
|
23
22
|
moment.locale('fr')
|
24
|
-
const created = moment(
|
25
|
-
const lastModified = moment(
|
23
|
+
const created = moment(item.created).startOf('minute').fromNow();
|
24
|
+
const lastModified = moment(item.modified).startOf('minute').fromNow();
|
26
25
|
return (
|
27
26
|
<div className="r-list-item">
|
28
27
|
<div
|
29
|
-
className={
|
28
|
+
className={item.image_vignette_scale?"r-item-img":"r-item-img r-item-img-placeholder"}
|
30
29
|
style={{
|
31
|
-
backgroundImage:
|
32
|
-
? "url(" +
|
30
|
+
backgroundImage: item.image_vignette_scale
|
31
|
+
? "url(" + item.image_vignette_scale + ")"
|
33
32
|
: "",
|
34
33
|
}}
|
35
34
|
/>
|
@@ -40,19 +39,7 @@ const ContactCard = ({ contactItem }) => {
|
|
40
39
|
<ReactMarkdown className="r-item-description">{limitDescription}</ReactMarkdown>
|
41
40
|
: ""
|
42
41
|
}
|
43
|
-
<
|
44
|
-
className="r-item-read-more"
|
45
|
-
style={{ textDecoration: "none" }}
|
46
|
-
to={{
|
47
|
-
pathname: removeAccents(
|
48
|
-
contactItem.title.replace(/\s/g, "-").toLowerCase()
|
49
|
-
),
|
50
|
-
search: `?u=${contactItem.UID}`,
|
51
|
-
state: {
|
52
|
-
idItem: contactItem.UID,
|
53
|
-
},
|
54
|
-
}}
|
55
|
-
>
|
42
|
+
<div className="r-item-read-more" style={{ textDecoration: "none" }}>
|
56
43
|
{
|
57
44
|
created === lastModified ?
|
58
45
|
(
|
@@ -68,11 +55,11 @@ const ContactCard = ({ contactItem }) => {
|
|
68
55
|
</div>
|
69
56
|
)
|
70
57
|
}
|
71
|
-
</
|
58
|
+
</div>
|
72
59
|
</div>
|
73
60
|
<div className="r-item-arrow-more"></div>
|
74
61
|
</div>
|
75
62
|
);
|
76
63
|
};
|
77
64
|
|
78
|
-
export default
|
65
|
+
export default NewsCard;
|
@@ -14,9 +14,9 @@ const ContactContent = ({ queryUrl, onChange }) => {
|
|
14
14
|
const parsed = queryString.parse(useFilterQuery().toString());
|
15
15
|
const parsed2 = { ...parsed, UID: parsed["u"], fullobjects: 1 };
|
16
16
|
const [params, setParams] = useState(parsed2);
|
17
|
-
const [
|
18
|
-
const [files, setFiles] = useState(
|
19
|
-
const [gallery, setGallery] = useState(
|
17
|
+
const [item, setitem] = useState({});
|
18
|
+
const [files, setFiles] = useState();
|
19
|
+
const [gallery, setGallery] = useState();
|
20
20
|
const { response, error, isLoading } = useAxios(
|
21
21
|
{
|
22
22
|
method: "get",
|
@@ -31,26 +31,26 @@ const ContactContent = ({ queryUrl, onChange }) => {
|
|
31
31
|
);
|
32
32
|
useEffect(() => {
|
33
33
|
if (response !== null) {
|
34
|
-
|
34
|
+
setitem(response.items[0]);
|
35
35
|
}
|
36
36
|
window.scrollTo(0, 0);
|
37
37
|
}, [response]);
|
38
38
|
|
39
39
|
/// use to set file and gallery items
|
40
40
|
useEffect(() => {
|
41
|
-
if (
|
42
|
-
setFiles(
|
43
|
-
setGallery(
|
41
|
+
if (item.items && item.items.length > 0) {
|
42
|
+
setFiles(item.items.filter(files => files['@type'] === 'File'));
|
43
|
+
setGallery(item.items.filter(files => files['@type'] === 'Image'));
|
44
44
|
}
|
45
|
-
}, [
|
45
|
+
}, [item]);
|
46
46
|
|
47
47
|
function handleClick() {
|
48
48
|
history.push("./");
|
49
49
|
onChange(null);
|
50
50
|
}
|
51
51
|
moment.locale('fr')
|
52
|
-
const created = moment(
|
53
|
-
const lastModified = moment(
|
52
|
+
const created = moment(item.created).startOf('minute').fromNow();
|
53
|
+
const lastModified = moment(item.modified).startOf('minute').fromNow();
|
54
54
|
|
55
55
|
return (
|
56
56
|
<div className="new-content r-content">
|
@@ -59,17 +59,17 @@ const ContactContent = ({ queryUrl, onChange }) => {
|
|
59
59
|
</button>
|
60
60
|
<article>
|
61
61
|
<header>
|
62
|
-
<h2 className="r-content-title">{
|
62
|
+
<h2 className="r-content-title">{item.title}</h2>
|
63
63
|
<div className="r-content-description">
|
64
|
-
<ReactMarkdown>{
|
64
|
+
<ReactMarkdown>{item.description}</ReactMarkdown>
|
65
65
|
</div>
|
66
66
|
</header>
|
67
67
|
<figure>
|
68
68
|
<div
|
69
69
|
className="r-content-img"
|
70
70
|
style={{
|
71
|
-
backgroundImage:
|
72
|
-
? "url(" +
|
71
|
+
backgroundImage: item.image_affiche_scale
|
72
|
+
? "url(" + item.image_affiche_scale + ")"
|
73
73
|
: "",
|
74
74
|
}}
|
75
75
|
/>
|
@@ -113,8 +113,8 @@ const ContactContent = ({ queryUrl, onChange }) => {
|
|
113
113
|
</div>
|
114
114
|
</div>
|
115
115
|
{/* link */}
|
116
|
-
{
|
117
|
-
|
116
|
+
{item.site_url === null &&
|
117
|
+
item.video_url === null ? (
|
118
118
|
""
|
119
119
|
) : (
|
120
120
|
<div className="r-content-news-info-link">
|
@@ -127,36 +127,36 @@ const ContactContent = ({ queryUrl, onChange }) => {
|
|
127
127
|
</svg>
|
128
128
|
</div>
|
129
129
|
<div className="dpinlb">
|
130
|
-
{
|
130
|
+
{item.site_url === null ? (
|
131
131
|
""
|
132
132
|
) : (
|
133
133
|
<div className="r-content-news-info-event_link">
|
134
|
-
<a href={
|
134
|
+
<a href={item.site_url}>{item.site_url}</a>
|
135
135
|
</div>
|
136
136
|
)}
|
137
|
-
{
|
137
|
+
{item.video_url === null ? (
|
138
138
|
""
|
139
139
|
) : (
|
140
140
|
<div className="r-content-news-info--video">
|
141
|
-
<a href={
|
141
|
+
<a href={item.video_url}>Lien vers la vidéo</a>
|
142
142
|
</div>
|
143
143
|
)}
|
144
144
|
</div>
|
145
145
|
</div>
|
146
146
|
)}
|
147
147
|
{/* Social */}
|
148
|
-
{
|
149
|
-
|
150
|
-
|
148
|
+
{item.facebook === null &&
|
149
|
+
item.instagram === null &&
|
150
|
+
item.twitter === null ? (
|
151
151
|
""
|
152
152
|
) : (
|
153
153
|
<div className="r-content-news-info-social">
|
154
154
|
<ul>
|
155
|
-
{!
|
155
|
+
{!item.facebook ? (
|
156
156
|
""
|
157
157
|
) : (
|
158
158
|
<li>
|
159
|
-
<a href={
|
159
|
+
<a href={item.facebook} target="_blank">
|
160
160
|
<svg
|
161
161
|
xmlns="http://www.w3.org/2000/svg"
|
162
162
|
height="800"
|
@@ -175,11 +175,11 @@ const ContactContent = ({ queryUrl, onChange }) => {
|
|
175
175
|
</a>
|
176
176
|
</li>
|
177
177
|
)}
|
178
|
-
{!
|
178
|
+
{!item.instagram ? (
|
179
179
|
""
|
180
180
|
) : (
|
181
181
|
<li>
|
182
|
-
<a href={
|
182
|
+
<a href={item.instagram} target="_blank">
|
183
183
|
<svg
|
184
184
|
xmlns="http://www.w3.org/2000/svg"
|
185
185
|
height="800"
|
@@ -194,11 +194,11 @@ const ContactContent = ({ queryUrl, onChange }) => {
|
|
194
194
|
</a>
|
195
195
|
</li>
|
196
196
|
)}
|
197
|
-
{!
|
197
|
+
{!item.twitter ? (
|
198
198
|
""
|
199
199
|
) : (
|
200
200
|
<li>
|
201
|
-
<a href={
|
201
|
+
<a href={item.twitter} target="_blank">
|
202
202
|
<svg
|
203
203
|
xmlns="http://www.w3.org/2000/svg"
|
204
204
|
height="800"
|
@@ -221,38 +221,35 @@ const ContactContent = ({ queryUrl, onChange }) => {
|
|
221
221
|
<div
|
222
222
|
className="r-content-text"
|
223
223
|
dangerouslySetInnerHTML={{
|
224
|
-
__html:
|
224
|
+
__html: item.text && item.text.data,
|
225
225
|
}}
|
226
226
|
></div>
|
227
227
|
{/* add files to download */}
|
228
228
|
{
|
229
|
-
files
|
229
|
+
files &&
|
230
230
|
<div className="r-content-files">
|
231
|
-
{files.map((file) => (
|
231
|
+
{files.map((file, i) => (
|
232
232
|
<div className="r-content-file">
|
233
|
-
<a href={file.targetUrl} className="r-content-file-link" rel="nofollow">
|
233
|
+
<a key={i} href={file.targetUrl} className="r-content-file-link" rel="nofollow">
|
234
234
|
<span className="r-content-file-title">{file.title}</span>
|
235
|
-
{/* <span className="r-content-file-size">{file.file.size}</span> */}
|
236
235
|
<span className="r-content-file-icon"><svg width="21" height="21" viewBox="0 0 24 24" fill="none" stroke="#8899a4" stroke-width="2" stroke-linecap="square" stroke-linejoin="arcs"><path d="M3 15v4c0 1.1.9 2 2 2h14a2 2 0 0 0 2-2v-4M17 9l-5 5-5-5M12 12.8V2.5"></path></svg> </span>
|
237
236
|
</a>
|
238
237
|
</div>
|
239
238
|
))}
|
240
239
|
</div>
|
241
|
-
) : ("")
|
242
240
|
}
|
243
241
|
{/* add gallery */}
|
244
242
|
{
|
245
|
-
gallery
|
243
|
+
gallery &&
|
246
244
|
<div className="r-content-gallery">
|
247
245
|
<div class="spotlight-group flexbin r-content-gallery">
|
248
|
-
{gallery.map((image) => (
|
249
|
-
<a class="spotlight" href={image.
|
250
|
-
<img src={image.
|
246
|
+
{gallery.map((image,i) => (
|
247
|
+
<a key={i} class="spotlight" href={image.image_extralarge_scale} >
|
248
|
+
<img src={image.image_vignette_scale} />
|
251
249
|
</a>
|
252
250
|
))}
|
253
251
|
</div>
|
254
252
|
</div>
|
255
|
-
) : ("")
|
256
253
|
}
|
257
254
|
</article>
|
258
255
|
</div>
|
@@ -1,32 +1,32 @@
|
|
1
|
-
import
|
1
|
+
import NewsCard from "../NewsCard/NewsCard";
|
2
2
|
import { Link } from "react-router-dom";
|
3
3
|
import React from "react";
|
4
4
|
import removeAccents from "remove-accents";
|
5
|
-
const
|
5
|
+
const NewsList = ({ itemsArray, onChange, parentCallback }) => {
|
6
6
|
function handleClick(event) {
|
7
7
|
onChange(event);
|
8
8
|
}
|
9
9
|
return (
|
10
10
|
<React.Fragment>
|
11
11
|
<ul className="r-result-list actu-result-list">
|
12
|
-
{
|
12
|
+
{itemsArray.map((item, i) => (
|
13
13
|
<li
|
14
14
|
key={i}
|
15
15
|
className="r-list-item-group"
|
16
|
-
onClick={() => handleClick(
|
16
|
+
onClick={() => handleClick(item.UID)}
|
17
17
|
>
|
18
18
|
<Link
|
19
19
|
className="r-news-list-item-link"
|
20
20
|
style={{ textDecoration: "none" }}
|
21
21
|
to={{
|
22
|
-
pathname: removeAccents(
|
23
|
-
search: `?u=${
|
22
|
+
pathname: removeAccents(item.title).replace(/[^a-zA-Z ]/g, "").replace(/\s/g, "-").toLowerCase(),
|
23
|
+
search: `?u=${item.UID}`,
|
24
24
|
state: {
|
25
|
-
idItem:
|
25
|
+
idItem: item.UID,
|
26
26
|
},
|
27
27
|
}}
|
28
28
|
>
|
29
|
-
<
|
29
|
+
<NewsCard item={item} key={item.created} />
|
30
30
|
</Link>
|
31
31
|
</li>
|
32
32
|
))}
|
@@ -34,4 +34,4 @@ const ContactList = ({ contactArray, onChange, parentCallback }) => {
|
|
34
34
|
</React.Fragment>
|
35
35
|
);
|
36
36
|
};
|
37
|
-
export default
|
37
|
+
export default NewsList;
|
@@ -33,14 +33,14 @@ const ContactResult = (props) => {
|
|
33
33
|
</p>
|
34
34
|
</div>
|
35
35
|
<ul className="r-search-list">
|
36
|
-
{resultArray.map((
|
36
|
+
{resultArray.map((item, i) => (
|
37
37
|
<li key={i} className="r-search-item">
|
38
|
-
<a href={
|
38
|
+
<a href={item["_url"]}>
|
39
39
|
<div className="r-search-img">
|
40
40
|
{
|
41
|
-
|
41
|
+
item.has_leadimage[0] ? (
|
42
42
|
<div className="r-search-img" style={{
|
43
|
-
backgroundImage:"url(" +
|
43
|
+
backgroundImage:"url(" + item.image_url +")"
|
44
44
|
}}></div>
|
45
45
|
):(
|
46
46
|
<div className="r-search-img no-search-item-img"></div>
|
@@ -50,7 +50,7 @@ const ContactResult = (props) => {
|
|
50
50
|
<Highlighter
|
51
51
|
highlightClassName="r-search-highlighter"
|
52
52
|
searchWords={[props.urlParams.SearchableText]}
|
53
|
-
textToHighlight={
|
53
|
+
textToHighlight={item.title}
|
54
54
|
/>
|
55
55
|
</a>
|
56
56
|
</li>
|
@@ -33,14 +33,14 @@ const EventsResult = (props) => {
|
|
33
33
|
</p>
|
34
34
|
</div>
|
35
35
|
<ul className="r-search-list">
|
36
|
-
{resultArray.map((
|
36
|
+
{resultArray.map((item, i) => (
|
37
37
|
<li key={i} className="r-search-item">
|
38
|
-
<a href={
|
38
|
+
<a href={item["_url"]}>
|
39
39
|
<div className="r-search-img">
|
40
40
|
{
|
41
|
-
|
41
|
+
item.has_leadimage[0] ? (
|
42
42
|
<div className="r-search-img" style={{
|
43
|
-
backgroundImage:"url(" +
|
43
|
+
backgroundImage:"url(" + item.image_url +")"
|
44
44
|
}}></div>
|
45
45
|
):(
|
46
46
|
<div className="r-search-img no-search-item-img"></div>
|
@@ -50,7 +50,7 @@ const EventsResult = (props) => {
|
|
50
50
|
<Highlighter
|
51
51
|
highlightClassName="r-search-highlighter"
|
52
52
|
searchWords={[props.urlParams.SearchableText]}
|
53
|
-
textToHighlight={
|
53
|
+
textToHighlight={item.title}
|
54
54
|
/>
|
55
55
|
</a>
|
56
56
|
</li>
|
@@ -33,14 +33,14 @@ const NewsResult = (props) => {
|
|
33
33
|
</p>
|
34
34
|
</div>
|
35
35
|
<ul className="r-search-list">
|
36
|
-
{resultArray.map((
|
36
|
+
{resultArray.map((item, i) => (
|
37
37
|
<li key={i} className="r-search-item">
|
38
|
-
<a href={
|
38
|
+
<a href={item["_url"]}>
|
39
39
|
<div className="r-search-img">
|
40
40
|
{
|
41
|
-
|
41
|
+
item.has_leadimage[0] ? (
|
42
42
|
<div className="r-search-img" style={{
|
43
|
-
backgroundImage:"url(" +
|
43
|
+
backgroundImage:"url(" + item.image_url +")"
|
44
44
|
}}></div>
|
45
45
|
):(
|
46
46
|
<div className="r-search-img no-search-item-img"></div>
|
@@ -50,7 +50,7 @@ const NewsResult = (props) => {
|
|
50
50
|
<Highlighter
|
51
51
|
highlightClassName="r-search-highlighter"
|
52
52
|
searchWords={[props.urlParams.SearchableText]}
|
53
|
-
textToHighlight={
|
53
|
+
textToHighlight={item.title}
|
54
54
|
/>
|
55
55
|
</a>
|
56
56
|
</li>
|
@@ -33,13 +33,13 @@ const WebResult = (props) => {
|
|
33
33
|
</p>
|
34
34
|
</div>
|
35
35
|
<ul className="r-search-list">
|
36
|
-
{resultArray.map((
|
36
|
+
{resultArray.map((item, i) => (
|
37
37
|
<li key={i} className="r-search-item">
|
38
|
-
<a href={
|
38
|
+
<a href={item["@id"]}>
|
39
39
|
<Highlighter
|
40
40
|
highlightClassName="r-search-highlighter"
|
41
41
|
searchWords={[props.urlParams.SearchableText]}
|
42
|
-
textToHighlight={
|
42
|
+
textToHighlight={item.title}
|
43
43
|
/>
|
44
44
|
</a>
|
45
45
|
</li>
|