imio.smartweb.core 1.2.44__py3-none-any.whl → 1.2.46__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/static/smartweb-edit-compiled.css +1 -1
- imio/smartweb/core/browser/static/src/edit.less +42 -0
- imio/smartweb/core/contents/pages/cirkwi/content.py +5 -0
- imio/smartweb/core/contents/pages/cirkwi/view.py +2 -1
- imio/smartweb/core/contents/rest/events/endpoint.py +1 -0
- imio/smartweb/core/contents/rest/events/view.pt +2 -1
- imio/smartweb/core/contents/rest/events/view.py +4 -0
- imio/smartweb/core/contents/rest/news/endpoint.py +1 -0
- imio/smartweb/core/contents/rest/news/view.pt +2 -1
- imio/smartweb/core/contents/rest/news/view.py +4 -0
- imio/smartweb/core/contents/sections/configure.zcml +1 -1
- imio/smartweb/core/contents/sections/events/view.py +11 -1
- imio/smartweb/core/contents/sections/macros.pt +3 -2
- imio/smartweb/core/contents/sections/news/view.py +11 -1
- imio/smartweb/core/contents/sections/views.py +4 -4
- imio/smartweb/core/profiles/default/metadata.xml +1 -1
- 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.SectionEvents.xml +1 -0
- imio/smartweb/core/profiles/default/types/imio.smartweb.SectionNews.xml +1 -0
- imio/smartweb/core/tests/resources/json_rest_events.json +2 -1
- 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 +8 -1
- imio/smartweb/core/tests/test_rest.py +36 -0
- imio/smartweb/core/tests/test_section_events.py +27 -5
- imio/smartweb/core/tests/test_section_news.py +16 -3
- imio/smartweb/core/tests/test_vocabularies.py +3 -0
- imio/smartweb/core/upgrades/configure.zcml +18 -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/utils.py +0 -23
- imio/smartweb/core/vocabularies.py +17 -0
- imio/smartweb/core/vocabularies.zcml +6 -0
- imio/smartweb/core/webcomponents/build/css/373.smartweb-webcomponents-compiled.css +1 -1
- imio/smartweb/core/webcomponents/build/css/686.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 +1 -1
- 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/686.smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/736.smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/736.smartweb-webcomponents-compiled.js.LICENSE.txt +3 -3
- 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/package.json +1 -0
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/ContactContent.jsx +265 -161
- imio/smartweb/core/webcomponents/src/components/Events/EventCard/EventCard.jsx +34 -21
- imio/smartweb/core/webcomponents/src/components/Events/EventList/EventList.jsx +2 -2
- imio/smartweb/core/webcomponents/src/components/Events/Events.jsx +2 -1
- imio/smartweb/core/webcomponents/src/components/Events/Events.scss +1 -0
- imio/smartweb/core/webcomponents/src/components/News/News.jsx +2 -1
- imio/smartweb/core/webcomponents/src/components/News/News.scss +9 -1
- imio/smartweb/core/webcomponents/src/components/News/NewsCard/NewsCard.jsx +22 -5
- imio/smartweb/core/webcomponents/src/components/News/NewsList/NewsList.jsx +2 -2
- imio/smartweb/core/webcomponents/src/utils/Map.jsx +1 -3
- imio/smartweb/core/webcomponents/src/utils/translation.js +49 -1
- imio.smartweb.core-1.2.46-py3.8-nspkg.pth +2 -0
- {imio.smartweb.core-1.2.44.dist-info → imio.smartweb.core-1.2.46.dist-info}/METADATA +29 -3
- {imio.smartweb.core-1.2.44.dist-info → imio.smartweb.core-1.2.46.dist-info}/RECORD +74 -70
- {imio.smartweb.core-1.2.44.dist-info → imio.smartweb.core-1.2.46.dist-info}/WHEEL +1 -1
- imio/smartweb/core/webcomponents/build/assets/next-react-white.819cb069ac8eec300a9db6a7707712d6.svg +0 -1
- imio/smartweb/core/webcomponents/build/f79b479fdc5c0fe0d553.svg +0 -1
- imio/smartweb/core/webcomponents/build/js/496.smartweb-webcomponents-compiled.js +0 -2
- imio.smartweb.core-1.2.44-py3.10-nspkg.pth +0 -3
- /imio/smartweb/core/webcomponents/build/js/{496.smartweb-webcomponents-compiled.js.LICENSE.txt → 499.smartweb-webcomponents-compiled.js.LICENSE.txt} +0 -0
- {imio.smartweb.core-1.2.44.dist-info → imio.smartweb.core-1.2.46.dist-info}/LICENSE.GPL +0 -0
- {imio.smartweb.core-1.2.44.dist-info → imio.smartweb.core-1.2.46.dist-info}/LICENSE.rst +0 -0
- {imio.smartweb.core-1.2.44.dist-info → imio.smartweb.core-1.2.46.dist-info}/namespace_packages.txt +0 -0
- {imio.smartweb.core-1.2.44.dist-info → imio.smartweb.core-1.2.46.dist-info}/top_level.txt +0 -0
@@ -2,18 +2,18 @@ import { useNavigate } from "react-router-dom";
|
|
2
2
|
import React, { useEffect, useState } from "react";
|
3
3
|
import useAxios from "../../../hooks/useAxios";
|
4
4
|
import useFilterQuery from "../../../hooks/useFilterQuery";
|
5
|
-
import ReactMarkdown from
|
5
|
+
import ReactMarkdown from "react-markdown";
|
6
6
|
import "spotlight.js";
|
7
|
-
import "../../../../node_modules/flexbin/flexbin.css"
|
7
|
+
import "../../../../node_modules/flexbin/flexbin.css";
|
8
8
|
import { Translate } from "react-translated";
|
9
|
-
import queryString from
|
10
|
-
|
9
|
+
import queryString from "query-string";
|
11
10
|
|
12
11
|
const ContactContent = ({ queryUrl, onChange }) => {
|
13
12
|
const navigate = useNavigate();
|
14
|
-
const { u, ...parsed } = Object.assign(
|
15
|
-
|
16
|
-
|
13
|
+
const { u, ...parsed } = Object.assign({
|
14
|
+
UID: queryString.parse(useFilterQuery().toString())["u"],
|
15
|
+
fullobjects: 1,
|
16
|
+
});
|
17
17
|
const [params, setParams] = useState(parsed);
|
18
18
|
const [item, setitem] = useState({});
|
19
19
|
const [files, setFiles] = useState();
|
@@ -35,8 +35,8 @@ const ContactContent = ({ queryUrl, onChange }) => {
|
|
35
35
|
[]
|
36
36
|
);
|
37
37
|
useEffect(() => {
|
38
|
-
setParams(parsed)
|
39
|
-
}, [queryString.parse(useFilterQuery().toString())[
|
38
|
+
setParams(parsed);
|
39
|
+
}, [queryString.parse(useFilterQuery().toString())["u"]]);
|
40
40
|
|
41
41
|
// set all contacts state
|
42
42
|
useEffect(() => {
|
@@ -50,24 +50,23 @@ const ContactContent = ({ queryUrl, onChange }) => {
|
|
50
50
|
useEffect(() => {
|
51
51
|
if (item.image_affiche_scale) {
|
52
52
|
const img = new Image();
|
53
|
-
img.src = item.image_affiche_scale
|
53
|
+
img.src = item.image_affiche_scale;
|
54
54
|
img.onload = () => {
|
55
55
|
setImage(img);
|
56
56
|
};
|
57
57
|
}
|
58
58
|
}, [item]);
|
59
59
|
|
60
|
-
|
61
60
|
// set social link
|
62
61
|
useEffect(() => {
|
63
|
-
item.urls && setSocial(item.urls.filter(urls => urls.type !==
|
62
|
+
item.urls && setSocial(item.urls.filter((urls) => urls.type !== "website"));
|
64
63
|
}, [item]);
|
65
64
|
|
66
65
|
/// use to set file and gallery items
|
67
66
|
useEffect(() => {
|
68
67
|
if (item.items && item.items.length > 0) {
|
69
|
-
setFiles(item.items.filter(files => files[
|
70
|
-
setGallery(item.items.filter(files => files[
|
68
|
+
setFiles(item.items.filter((files) => files["@type"] === "File"));
|
69
|
+
setGallery(item.items.filter((files) => files["@type"] === "Image"));
|
71
70
|
}
|
72
71
|
}, [item]);
|
73
72
|
|
@@ -75,7 +74,7 @@ const ContactContent = ({ queryUrl, onChange }) => {
|
|
75
74
|
navigate("..");
|
76
75
|
onChange(null);
|
77
76
|
}
|
78
|
-
let countryTitle = item.country && item.country.title
|
77
|
+
let countryTitle = item.country && item.country.title;
|
79
78
|
let itineraryLink =
|
80
79
|
"https://www.google.com/maps/dir/?api=1&destination=" +
|
81
80
|
item.street +
|
@@ -88,9 +87,9 @@ const ContactContent = ({ queryUrl, onChange }) => {
|
|
88
87
|
"+" +
|
89
88
|
item.city +
|
90
89
|
"+" +
|
91
|
-
countryTitle
|
90
|
+
countryTitle;
|
92
91
|
|
93
|
-
itineraryLink = itineraryLink.replaceAll(
|
92
|
+
itineraryLink = itineraryLink.replaceAll("+null", "");
|
94
93
|
|
95
94
|
const toggleSchedul = () => {
|
96
95
|
setSchedulVisibility(!isSchedulVisible);
|
@@ -103,24 +102,25 @@ const ContactContent = ({ queryUrl, onChange }) => {
|
|
103
102
|
<article>
|
104
103
|
<header>
|
105
104
|
<h2 className="r-content-title">{item.title}</h2>
|
106
|
-
{item.subtitle ?
|
107
|
-
<h3 className="r-content-subtitle">{item.subtitle}</h3>
|
108
|
-
) : (
|
109
|
-
""
|
110
|
-
)}
|
105
|
+
{item.subtitle ? <h3 className="r-content-subtitle">{item.subtitle}</h3> : ""}
|
111
106
|
</header>
|
112
107
|
{item.image_affiche_scale && (
|
113
108
|
<figure className="r-content-figure">
|
114
109
|
<div
|
115
110
|
className="r-content-figure-blur"
|
116
|
-
style={{ backgroundImage: "url(" + item.image_affiche_scale + ")" }}
|
117
|
-
|
111
|
+
style={{ backgroundImage: "url(" + item.image_affiche_scale + ")" }}
|
112
|
+
/>
|
113
|
+
<img
|
114
|
+
className="r-content-figure-img"
|
118
115
|
src={item.image_affiche_scale}
|
119
|
-
style={{
|
120
|
-
|
116
|
+
style={{
|
117
|
+
objectFit:
|
118
|
+
image && image.width >= image.height ? "cover" : "contain",
|
119
|
+
}}
|
120
|
+
alt=""
|
121
|
+
/>
|
121
122
|
</figure>
|
122
123
|
)}
|
123
|
-
|
124
124
|
</article>
|
125
125
|
<div className="contactCard">
|
126
126
|
<div className="contactText">
|
@@ -133,7 +133,13 @@ const ContactContent = ({ queryUrl, onChange }) => {
|
|
133
133
|
{item.street ? (
|
134
134
|
<div className="annaire-adresse">
|
135
135
|
<div className="annaire-adresse-icon">
|
136
|
-
<svg
|
136
|
+
<svg
|
137
|
+
xmlns="http://www.w3.org/2000/svg"
|
138
|
+
width="16"
|
139
|
+
height="16"
|
140
|
+
fill="currentColor"
|
141
|
+
viewBox="0 0 16 16"
|
142
|
+
>
|
137
143
|
<path d="M8 16s6-5.686 6-10A6 6 0 0 0 2 6c0 4.314 6 10 6 10zm0-7a3 3 0 1 1 0-6 3 3 0 0 1 0 6z" />
|
138
144
|
</svg>
|
139
145
|
</div>
|
@@ -150,28 +156,50 @@ const ContactContent = ({ queryUrl, onChange }) => {
|
|
150
156
|
{item.city ? <span>{item.city}</span> : ""}
|
151
157
|
</a>
|
152
158
|
</div>
|
153
|
-
|
154
159
|
</div>
|
155
|
-
|
156
160
|
) : (
|
157
161
|
""
|
158
162
|
)}
|
159
163
|
{/* schedule */}
|
160
|
-
{
|
161
|
-
|
162
|
-
|
164
|
+
{item.table_date && (
|
165
|
+
<div
|
166
|
+
onClick={toggleSchedul}
|
167
|
+
className="annuaire-schedul"
|
168
|
+
role="button"
|
169
|
+
aria-expanded="false"
|
170
|
+
>
|
163
171
|
<div className="annuaire-schedul-icon">
|
164
|
-
<svg
|
172
|
+
<svg
|
173
|
+
xmlns="http://www.w3.org/2000/svg"
|
174
|
+
width="16"
|
175
|
+
height="16"
|
176
|
+
fill="currentColor"
|
177
|
+
class="bi bi-clock-fill"
|
178
|
+
viewBox="0 0 16 16"
|
179
|
+
>
|
165
180
|
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M8 3.5a.5.5 0 0 0-1 0V9a.5.5 0 0 0 .252.434l3.5 2a.5.5 0 0 0 .496-.868L8 8.71z" />
|
166
181
|
</svg>
|
167
182
|
</div>
|
168
183
|
<div className="annuaire-schedul-content">
|
169
184
|
{isSchedulVisible ? (
|
170
185
|
<>
|
171
|
-
<span
|
186
|
+
<span
|
187
|
+
className={
|
188
|
+
item.schedule_for_today === "Fermé"
|
189
|
+
? "annuaire-day-close"
|
190
|
+
: "annuaire-day-open"
|
191
|
+
}
|
192
|
+
>
|
172
193
|
{item.schedule_for_today}
|
173
194
|
</span>
|
174
|
-
<svg
|
195
|
+
<svg
|
196
|
+
xmlns="http://www.w3.org/2000/svg"
|
197
|
+
width="10"
|
198
|
+
height="10"
|
199
|
+
fill="currentColor"
|
200
|
+
class="bi bi-caret-down-fill"
|
201
|
+
viewBox="0 0 16 16"
|
202
|
+
>
|
175
203
|
<path d="M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z" />
|
176
204
|
</svg>
|
177
205
|
</>
|
@@ -184,7 +212,10 @@ const ContactContent = ({ queryUrl, onChange }) => {
|
|
184
212
|
|
185
213
|
return (
|
186
214
|
<li key={index}>
|
187
|
-
<strong>
|
215
|
+
<strong>
|
216
|
+
<Translate text={dayOfWeek} />:
|
217
|
+
</strong>{" "}
|
218
|
+
{status}
|
188
219
|
</li>
|
189
220
|
);
|
190
221
|
})}
|
@@ -192,32 +223,19 @@ const ContactContent = ({ queryUrl, onChange }) => {
|
|
192
223
|
</div>
|
193
224
|
)}
|
194
225
|
</div>
|
195
|
-
{/* <div className="annuaire-schedul-content">
|
196
|
-
<span className={item.schedule_for_today === "Fermé" ? "annuaire-day-close" : "annuaire-day-open"}>
|
197
|
-
{item.schedule_for_today}
|
198
|
-
</span>
|
199
|
-
<div class="">
|
200
|
-
<ul>
|
201
|
-
{item.table_date.map((day, index) => {
|
202
|
-
const dayOfWeek = Object.keys(day)[0];
|
203
|
-
const status = day[dayOfWeek];
|
204
|
-
|
205
|
-
return (
|
206
|
-
<li key={index}>
|
207
|
-
<strong>{dayOfWeek}:</strong> {status}
|
208
|
-
</li>
|
209
|
-
);
|
210
|
-
})}
|
211
|
-
</ul>
|
212
|
-
</div>
|
213
|
-
</div> */}
|
214
226
|
</div>
|
215
|
-
}
|
227
|
+
)}
|
216
228
|
|
217
|
-
{item.phones && item.phones.length > 0
|
218
|
-
|
229
|
+
{item.phones && item.phones.length > 0 ? (
|
230
|
+
<div className="annuaire-phone">
|
219
231
|
<div className="annuaire-phone-icon">
|
220
|
-
<svg
|
232
|
+
<svg
|
233
|
+
xmlns="http://www.w3.org/2000/svg"
|
234
|
+
width="16"
|
235
|
+
height="16"
|
236
|
+
fill="currentColor"
|
237
|
+
viewBox="0 0 16 16"
|
238
|
+
>
|
221
239
|
<path d="M1.885.511a1.745 1.745 0 0 1 2.61.163L6.29 2.98c.329.423.445.974.315 1.494l-.547 2.19a.678.678 0 0 0 .178.643l2.457 2.457a.678.678 0 0 0 .644.178l2.189-.547a1.745 1.745 0 0 1 1.494.315l2.306 1.794c.829.645.905 1.87.163 2.611l-1.034 1.034c-.74.74-1.846 1.065-2.877.702a18.634 18.634 0 0 1-7.01-4.42 18.634 18.634 0 0 1-4.42-7.009c-.362-1.03-.037-2.137.703-2.877L1.885.511z" />
|
222
240
|
</svg>
|
223
241
|
</div>
|
@@ -226,20 +244,26 @@ const ContactContent = ({ queryUrl, onChange }) => {
|
|
226
244
|
return (
|
227
245
|
<span key={i}>
|
228
246
|
{phone.label ? phone.label + ": " : ""}
|
229
|
-
<a href={"tel:" + phone.number}>
|
230
|
-
{phone.number}
|
231
|
-
</a>
|
247
|
+
<a href={"tel:" + phone.number}>{phone.number}</a>
|
232
248
|
</span>
|
233
249
|
);
|
234
250
|
})}
|
235
251
|
</div>
|
236
|
-
</div>
|
237
|
-
|
252
|
+
</div>
|
253
|
+
) : (
|
254
|
+
""
|
255
|
+
)}
|
238
256
|
|
239
|
-
{item.mails && item.mails.length > 0
|
240
|
-
|
257
|
+
{item.mails && item.mails.length > 0 ? (
|
258
|
+
<div className="annuaire-website-mails">
|
241
259
|
<div className="annuaire-website-mails-icon">
|
242
|
-
<svg
|
260
|
+
<svg
|
261
|
+
xmlns="http://www.w3.org/2000/svg"
|
262
|
+
width="16"
|
263
|
+
height="16"
|
264
|
+
fill="currentColor"
|
265
|
+
viewBox="0 0 16 16"
|
266
|
+
>
|
243
267
|
<path d="M.05 3.555A2 2 0 0 1 2 2h12a2 2 0 0 1 1.95 1.555L8 8.414.05 3.555ZM0 4.697v7.104l5.803-3.558L0 4.697ZM6.761 8.83l-6.57 4.027A2 2 0 0 0 2 14h12a2 2 0 0 0 1.808-1.144l-6.57-4.027L8 9.586l-1.239-.757Zm3.436-.586L16 11.801V4.697l-5.803 3.546Z" />
|
244
268
|
</svg>
|
245
269
|
</div>
|
@@ -256,157 +280,237 @@ const ContactContent = ({ queryUrl, onChange }) => {
|
|
256
280
|
})}
|
257
281
|
</div>
|
258
282
|
</div>
|
259
|
-
|
283
|
+
) : (
|
284
|
+
""
|
285
|
+
)}
|
260
286
|
|
261
|
-
{item.urls && item.urls.length > 0
|
262
|
-
|
287
|
+
{item.urls && item.urls.length > 0 ? (
|
288
|
+
<div className="annuaire-website-link">
|
263
289
|
<div className="annuaire-website-link-icon">
|
264
|
-
<svg
|
290
|
+
<svg
|
291
|
+
xmlns="http://www.w3.org/2000/svg"
|
292
|
+
width="16"
|
293
|
+
height="16"
|
294
|
+
viewBox="0 0 16 16"
|
295
|
+
>
|
265
296
|
<path d="M2.5 2A1.5 1.5 0 0 0 1 3.5V12h14V3.5A1.5 1.5 0 0 0 13.5 2h-11zM0 12.5h16a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 0 12.5z" />
|
266
297
|
</svg>
|
267
298
|
</div>
|
268
299
|
<ul className="annuaire-website-link-content">
|
269
|
-
{item.urls
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
300
|
+
{item.urls
|
301
|
+
.filter((url) => url.type === "website")
|
302
|
+
.map((website, i) => {
|
303
|
+
return (
|
304
|
+
<>
|
305
|
+
<li key={i}>
|
306
|
+
<a
|
307
|
+
href={website.url}
|
308
|
+
target="_blank"
|
309
|
+
rel="noreferrer"
|
310
|
+
>
|
311
|
+
{website.url}
|
312
|
+
</a>
|
313
|
+
</li>
|
314
|
+
</>
|
315
|
+
);
|
316
|
+
})}
|
280
317
|
</ul>
|
281
318
|
</div>
|
282
|
-
|
319
|
+
) : (
|
320
|
+
""
|
321
|
+
)}
|
283
322
|
|
284
323
|
{/* add social icons */}
|
285
|
-
{social &&
|
324
|
+
{social && (
|
286
325
|
<div className="annuaire-social-link">
|
287
326
|
{social.length > 1 ? (
|
288
327
|
<ul>
|
289
328
|
{social.map((url, i) => {
|
290
329
|
return (
|
291
330
|
<li key={i}>
|
292
|
-
<a
|
331
|
+
<a
|
332
|
+
href={url.url}
|
333
|
+
target="_blank"
|
334
|
+
rel="noreferrer"
|
335
|
+
>
|
293
336
|
{url.type === "facebook" ? (
|
294
|
-
<svg
|
337
|
+
<svg
|
338
|
+
xmlns="http://www.w3.org/2000/svg"
|
339
|
+
width="25"
|
340
|
+
height="25"
|
341
|
+
fill="currentColor"
|
342
|
+
viewBox="0 0 16 16"
|
343
|
+
>
|
295
344
|
<path d="M16 8.049c0-4.446-3.582-8.05-8-8.05C3.58 0-.002 3.603-.002 8.05c0 4.017 2.926 7.347 6.75 7.951v-5.625h-2.03V8.05H6.75V6.275c0-2.017 1.195-3.131 3.022-3.131.876 0 1.791.157 1.791.157v1.98h-1.009c-.993 0-1.303.621-1.303 1.258v1.51h2.218l-.354 2.326H9.25V16c3.824-.604 6.75-3.934 6.75-7.951z" />
|
296
345
|
</svg>
|
297
|
-
)
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
346
|
+
) : url.type === "instagram" ? (
|
347
|
+
<svg
|
348
|
+
xmlns="http://www.w3.org/2000/svg"
|
349
|
+
width="25"
|
350
|
+
height="25"
|
351
|
+
fill="currentColor"
|
352
|
+
viewBox="0 0 16 16"
|
353
|
+
>
|
354
|
+
<path d="M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334z" />
|
355
|
+
</svg>
|
356
|
+
) : url.type === "twitter" ? (
|
357
|
+
<svg
|
358
|
+
xmlns="http://www.w3.org/2000/svg"
|
359
|
+
width="25"
|
360
|
+
height="25"
|
361
|
+
fill="currentColor"
|
362
|
+
viewBox="0 0 16 16"
|
363
|
+
>
|
364
|
+
<path d="M5.026 15c6.038 0 9.341-5.003 9.341-9.334 0-.14 0-.282-.006-.422A6.685 6.685 0 0 0 16 3.542a6.658 6.658 0 0 1-1.889.518 3.301 3.301 0 0 0 1.447-1.817 6.533 6.533 0 0 1-2.087.793A3.286 3.286 0 0 0 7.875 6.03a9.325 9.325 0 0 1-6.767-3.429 3.289 3.289 0 0 0 1.018 4.382A3.323 3.323 0 0 1 .64 6.575v.045a3.288 3.288 0 0 0 2.632 3.218 3.203 3.203 0 0 1-.865.115 3.23 3.23 0 0 1-.614-.057 3.283 3.283 0 0 0 3.067 2.277A6.588 6.588 0 0 1 .78 13.58a6.32 6.32 0 0 1-.78-.045A9.344 9.344 0 0 0 5.026 15z" />
|
365
|
+
</svg>
|
366
|
+
) : url.type === "youtube" ? (
|
367
|
+
<svg
|
368
|
+
xmlns="http://www.w3.org/2000/svg"
|
369
|
+
width="25"
|
370
|
+
height="25"
|
371
|
+
fill="currentColor"
|
372
|
+
viewBox="0 0 16 16"
|
373
|
+
>
|
374
|
+
<path d="M8.051 1.999h.089c.822.003 4.987.033 6.11.335a2.01 2.01 0 0 1 1.415 1.42c.101.38.172.883.22 1.402l.01.104.022.26.008.104c.065.914.073 1.77.074 1.957v.075c-.001.194-.01 1.108-.082 2.06l-.008.105-.009.104c-.05.572-.124 1.14-.235 1.558a2.007 2.007 0 0 1-1.415 1.42c-1.16.312-5.569.334-6.18.335h-.142c-.309 0-1.587-.006-2.927-.052l-.17-.006-.087-.004-.171-.007-.171-.007c-1.11-.049-2.167-.128-2.654-.26a2.007 2.007 0 0 1-1.415-1.419c-.111-.417-.185-.986-.235-1.558L.09 9.82l-.008-.104A31.4 31.4 0 0 1 0 7.68v-.123c.002-.215.01-.958.064-1.778l.007-.103.003-.052.008-.104.022-.26.01-.104c.048-.519.119-1.023.22-1.402a2.007 2.007 0 0 1 1.415-1.42c.487-.13 1.544-.21 2.654-.26l.17-.007.172-.006.086-.003.171-.007A99.788 99.788 0 0 1 7.858 2h.193zM6.4 5.209v4.818l4.157-2.408L6.4 5.209z" />
|
375
|
+
</svg>
|
376
|
+
) : url.type === "pinterest" ? (
|
377
|
+
<svg
|
378
|
+
xmlns="http://www.w3.org/2000/svg"
|
379
|
+
width="25"
|
380
|
+
height="25"
|
381
|
+
fill="currentColor"
|
382
|
+
viewBox="0 0 16 16"
|
383
|
+
>
|
384
|
+
<path d="M8 0a8 8 0 0 0-2.915 15.452c-.07-.633-.134-1.606.027-2.297.146-.625.938-3.977.938-3.977s-.239-.479-.239-1.187c0-1.113.645-1.943 1.448-1.943.682 0 1.012.512 1.012 1.127 0 .686-.437 1.712-.663 2.663-.188.796.4 1.446 1.185 1.446 1.422 0 2.515-1.5 2.515-3.664 0-1.915-1.377-3.254-3.342-3.254-2.276 0-3.612 1.707-3.612 3.471 0 .688.265 1.425.595 1.826a.24.24 0 0 1 .056.23c-.061.252-.196.796-.222.907-.035.146-.116.177-.268.107-1-.465-1.624-1.926-1.624-3.1 0-2.523 1.834-4.84 5.286-4.84 2.775 0 4.932 1.977 4.932 4.62 0 2.757-1.739 4.976-4.151 4.976-.811 0-1.573-.421-1.834-.919l-.498 1.902c-.181.695-.669 1.566-.995 2.097A8 8 0 1 0 8 0z" />
|
385
|
+
</svg>
|
386
|
+
) : (
|
387
|
+
""
|
388
|
+
)}
|
320
389
|
</a>
|
321
|
-
</li>
|
390
|
+
</li>
|
391
|
+
);
|
322
392
|
})}
|
323
393
|
</ul>
|
324
394
|
) : (
|
325
395
|
<div>
|
326
|
-
<a
|
396
|
+
<a
|
397
|
+
href={social[0] && social[0].url}
|
398
|
+
target="_blank"
|
399
|
+
rel="noreferrer"
|
400
|
+
>
|
327
401
|
{social[0] && social[0].type === "facebook" ? (
|
328
|
-
<svg
|
402
|
+
<svg
|
403
|
+
xmlns="http://www.w3.org/2000/svg"
|
404
|
+
width="25"
|
405
|
+
height="25"
|
406
|
+
fill="currentColor"
|
407
|
+
viewBox="0 0 16 16"
|
408
|
+
>
|
329
409
|
<path d="M16 8.049c0-4.446-3.582-8.05-8-8.05C3.58 0-.002 3.603-.002 8.05c0 4.017 2.926 7.347 6.75 7.951v-5.625h-2.03V8.05H6.75V6.275c0-2.017 1.195-3.131 3.022-3.131.876 0 1.791.157 1.791.157v1.98h-1.009c-.993 0-1.303.621-1.303 1.258v1.51h2.218l-.354 2.326H9.25V16c3.824-.604 6.75-3.934 6.75-7.951z" />
|
330
410
|
</svg>
|
331
|
-
)
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
411
|
+
) : social[0] && social[0].type === "instagram" ? (
|
412
|
+
<svg
|
413
|
+
xmlns="http://www.w3.org/2000/svg"
|
414
|
+
width="25"
|
415
|
+
height="25"
|
416
|
+
fill="currentColor"
|
417
|
+
viewBox="0 0 16 16"
|
418
|
+
>
|
419
|
+
<path d="M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334z" />
|
420
|
+
</svg>
|
421
|
+
) : social[0] && social[0].type === "twitter" ? (
|
422
|
+
<svg
|
423
|
+
xmlns="http://www.w3.org/2000/svg"
|
424
|
+
width="25"
|
425
|
+
height="25"
|
426
|
+
fill="currentColor"
|
427
|
+
viewBox="0 0 16 16"
|
428
|
+
>
|
429
|
+
<path d="M5.026 15c6.038 0 9.341-5.003 9.341-9.334 0-.14 0-.282-.006-.422A6.685 6.685 0 0 0 16 3.542a6.658 6.658 0 0 1-1.889.518 3.301 3.301 0 0 0 1.447-1.817 6.533 6.533 0 0 1-2.087.793A3.286 3.286 0 0 0 7.875 6.03a9.325 9.325 0 0 1-6.767-3.429 3.289 3.289 0 0 0 1.018 4.382A3.323 3.323 0 0 1 .64 6.575v.045a3.288 3.288 0 0 0 2.632 3.218 3.203 3.203 0 0 1-.865.115 3.23 3.23 0 0 1-.614-.057 3.283 3.283 0 0 0 3.067 2.277A6.588 6.588 0 0 1 .78 13.58a6.32 6.32 0 0 1-.78-.045A9.344 9.344 0 0 0 5.026 15z" />
|
430
|
+
</svg>
|
431
|
+
) : social[0] && social[0].type === "youtube" ? (
|
432
|
+
<svg
|
433
|
+
xmlns="http://www.w3.org/2000/svg"
|
434
|
+
width="25"
|
435
|
+
height="25"
|
436
|
+
fill="currentColor"
|
437
|
+
viewBox="0 0 16 16"
|
438
|
+
>
|
439
|
+
<path d="M8.051 1.999h.089c.822.003 4.987.033 6.11.335a2.01 2.01 0 0 1 1.415 1.42c.101.38.172.883.22 1.402l.01.104.022.26.008.104c.065.914.073 1.77.074 1.957v.075c-.001.194-.01 1.108-.082 2.06l-.008.105-.009.104c-.05.572-.124 1.14-.235 1.558a2.007 2.007 0 0 1-1.415 1.42c-1.16.312-5.569.334-6.18.335h-.142c-.309 0-1.587-.006-2.927-.052l-.17-.006-.087-.004-.171-.007-.171-.007c-1.11-.049-2.167-.128-2.654-.26a2.007 2.007 0 0 1-1.415-1.419c-.111-.417-.185-.986-.235-1.558L.09 9.82l-.008-.104A31.4 31.4 0 0 1 0 7.68v-.123c.002-.215.01-.958.064-1.778l.007-.103.003-.052.008-.104.022-.26.01-.104c.048-.519.119-1.023.22-1.402a2.007 2.007 0 0 1 1.415-1.42c.487-.13 1.544-.21 2.654-.26l.17-.007.172-.006.086-.003.171-.007A99.788 99.788 0 0 1 7.858 2h.193zM6.4 5.209v4.818l4.157-2.408L6.4 5.209z" />
|
440
|
+
</svg>
|
441
|
+
) : social[0] && social[0].type === "pinterest" ? (
|
442
|
+
<svg
|
443
|
+
xmlns="http://www.w3.org/2000/svg"
|
444
|
+
width="25"
|
445
|
+
height="25"
|
446
|
+
fill="currentColor"
|
447
|
+
viewBox="0 0 16 16"
|
448
|
+
>
|
449
|
+
<path d="M8 0a8 8 0 0 0-2.915 15.452c-.07-.633-.134-1.606.027-2.297.146-.625.938-3.977.938-3.977s-.239-.479-.239-1.187c0-1.113.645-1.943 1.448-1.943.682 0 1.012.512 1.012 1.127 0 .686-.437 1.712-.663 2.663-.188.796.4 1.446 1.185 1.446 1.422 0 2.515-1.5 2.515-3.664 0-1.915-1.377-3.254-3.342-3.254-2.276 0-3.612 1.707-3.612 3.471 0 .688.265 1.425.595 1.826a.24.24 0 0 1 .056.23c-.061.252-.196.796-.222.907-.035.146-.116.177-.268.107-1-.465-1.624-1.926-1.624-3.1 0-2.523 1.834-4.84 5.286-4.84 2.775 0 4.932 1.977 4.932 4.62 0 2.757-1.739 4.976-4.151 4.976-.811 0-1.573-.421-1.834-.919l-.498 1.902c-.181.695-.669 1.566-.995 2.097A8 8 0 1 0 8 0z" />
|
450
|
+
</svg>
|
451
|
+
) : (
|
452
|
+
""
|
453
|
+
)}
|
354
454
|
</a>
|
355
455
|
</div>
|
356
|
-
)
|
357
|
-
}
|
456
|
+
)}
|
358
457
|
</div>
|
359
|
-
}
|
458
|
+
)}
|
360
459
|
|
361
460
|
{item.logo_thumb_scale ? (
|
362
|
-
<img
|
363
|
-
className="annuaire-logo"
|
364
|
-
src={item.logo_thumb_scale}
|
365
|
-
alt="Logo"
|
366
|
-
/>
|
461
|
+
<img className="annuaire-logo" src={item.logo_thumb_scale} alt="Logo" />
|
367
462
|
) : (
|
368
463
|
""
|
369
464
|
)}
|
370
|
-
{item.logo_thumb_scale &&
|
371
|
-
<img
|
372
|
-
|
373
|
-
src={item.logo_thumb_scale}
|
374
|
-
alt="Logo"
|
375
|
-
/>
|
376
|
-
}
|
465
|
+
{item.logo_thumb_scale && (
|
466
|
+
<img className="annuaire-logo" src={item.logo_thumb_scale} alt="Logo" />
|
467
|
+
)}
|
377
468
|
</div>
|
378
469
|
</div>
|
379
470
|
{/* add files to download */}
|
380
|
-
{
|
381
|
-
files &&
|
471
|
+
{files && (
|
382
472
|
<div className="r-content-files">
|
383
473
|
{files.map((file, i) => (
|
384
474
|
<div key={i} className="r-content-file">
|
385
|
-
<a
|
475
|
+
<a
|
476
|
+
href={file.targetUrl}
|
477
|
+
className="r-content-file-link"
|
478
|
+
rel="nofollow"
|
479
|
+
>
|
386
480
|
<span className="r-content-file-title">{file.title}</span>
|
387
481
|
<span className="r-content-file-icon">
|
388
|
-
<svg
|
482
|
+
<svg
|
483
|
+
width="21"
|
484
|
+
height="21"
|
485
|
+
viewBox="0 0 24 24"
|
486
|
+
fill="none"
|
487
|
+
stroke="#8899a4"
|
488
|
+
stroke-width="2"
|
489
|
+
stroke-linecap="square"
|
490
|
+
stroke-linejoin="arcs"
|
491
|
+
>
|
492
|
+
<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>
|
493
|
+
</svg>
|
389
494
|
</span>
|
390
495
|
</a>
|
391
496
|
</div>
|
392
497
|
))}
|
393
498
|
</div>
|
394
|
-
}
|
499
|
+
)}
|
395
500
|
{/* add gallery */}
|
396
|
-
{
|
397
|
-
gallery &&
|
501
|
+
{gallery && (
|
398
502
|
<div className="r-content-gallery">
|
399
503
|
<div className="spotlight-group flexbin r-content-gallery">
|
400
504
|
{gallery.map((image, i) => (
|
401
|
-
<a key={i} className="spotlight" href={image.image_full_scale}
|
505
|
+
<a key={i} className="spotlight" href={image.image_full_scale}>
|
402
506
|
<img src={image.image_preview_scale} alt="" />
|
403
507
|
</a>
|
404
508
|
))}
|
405
509
|
</div>
|
406
510
|
</div>
|
407
|
-
}
|
511
|
+
)}
|
408
512
|
</div>
|
409
513
|
</div>
|
410
514
|
);
|
411
515
|
};
|
412
|
-
export default ContactContent;
|
516
|
+
export default ContactContent;
|