@silexlabs/silex-dashboard 1.0.40 → 1.0.44
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.
- package/.gitmodules +2 -2
- package/11ty/eleventy.config.mjs +62 -0
- package/README.md +8 -2
- package/collections/connectors/en.md +70 -0
- package/collections/connectors/fr.md +72 -0
- package/collections/home/en.md +57 -0
- package/{pages/fr/index.md → collections/home/fr.md} +20 -21
- package/collections/languages/en.json +5 -0
- package/collections/languages/fr.json +5 -0
- package/collections/settings/en.json +127 -0
- package/collections/settings/fr.json +131 -0
- package/package.json +17 -8
- package/silex/client-config.js +24 -0
- package/{.silex.js → silex/server-config.js} +8 -16
- package/templates/connectors-en.11tydata.mjs +56 -0
- package/templates/connectors-en.html +440 -0
- package/templates/connectors-fr.11tydata.mjs +56 -0
- package/templates/connectors-fr.html +440 -0
- package/templates/css/connectors-61bd21c2345101e48cc530cacf3afc0156ce7e089fcef3a34f853a537f0c55f2.css +1 -0
- package/templates/css/websites-4b9b2b0a0a907b33eca109d50c2a3eee97f1955c742cef487110d21a0bbf8f50.css +1 -0
- package/templates/websites-en.11tydata.mjs +108 -0
- package/templates/websites-en.html +478 -0
- package/templates/websites-fr.11tydata.mjs +108 -0
- package/templates/websites-fr.html +478 -0
- package/tina/config.ts +258 -0
- package/tina/tina-lock.json +1 -0
- package/.eleventy.js +0 -11
- package/.silex-client.js +0 -22
- package/_data/languages.json +0 -7
- package/_includes/api-connectors.js.html +0 -96
- package/_includes/api-websites.js.html +0 -189
- package/_includes/connectors.html +0 -253
- package/_includes/websites.html +0 -548
- package/_silex/old/assets/alex-hoyau.jpg +0 -0
- package/_silex/old/assets/alex-small.jpg +0 -0
- package/_silex/old/assets/empty-projects.gif +0 -0
- package/_silex/old/assets/gitlab.svg +0 -13
- package/_silex/old/assets/picto-silex.png +0 -0
- package/_silex/old/assets/silex-icon-2018@200px.png +0 -0
- package/_silex/old/meta.json +0 -1
- package/_silex/old/website.json +0 -1
- package/_site/assets/alex-small.jpg +0 -0
- package/_site/assets/bg-purpel-silex.webp +0 -0
- package/_site/assets/bg-silex-purpel.webp +0 -0
- package/_site/assets/empty-projects-sos.gif +0 -0
- package/_site/assets/gitlab.svg +0 -13
- package/_site/assets/logo-silex.svg +0 -1
- package/_site/assets/picto-silex@3x.png +0 -0
- package/_site/assets/silex-dashboard.png +0 -0
- package/_site/assets/silex-icon-2018@200px.png +0 -0
- package/_site/css/connectors.css +0 -1
- package/_site/css/websites.css +0 -1
- package/_site/en/connectors/index.html +0 -376
- package/_site/en/index.html +0 -795
- package/_site/fr/connectors/index.html +0 -376
- package/_site/fr/index.html +0 -795
- package/assets/alex-small.jpg +0 -0
- package/assets/bg-purpel-silex.webp +0 -0
- package/assets/bg-silex-purpel.webp +0 -0
- package/assets/empty-projects-sos.gif +0 -0
- package/assets/favicon-32x32.png +0 -0
- package/assets/gitlab.svg +0 -13
- package/assets/logo-silex.svg +0 -1
- package/assets/picto-silex@3x.png +0 -0
- package/assets/silex-dashboard.png +0 -0
- package/assets/silex-icon-2018@200px.png +0 -0
- package/pages/connectors.css.liquid +0 -4
- package/pages/en/connectors.md +0 -4
- package/pages/en/en.json +0 -72
- package/pages/en/index.md +0 -28
- package/pages/fr/connectors.md +0 -5
- package/pages/fr/fr.json +0 -72
- package/pages/pages.11tydata.js +0 -5
- package/pages/websites.css.liquid +0 -4
- /package/{_data → 11ty/_data}/api-translations.json +0 -0
- /package/{_data → 11ty/_data}/site.js +0 -0
- /package/{_includes → 11ty/_includes}/alternate.liquid +0 -0
- /package/{_silex/old → templates}/assets/bg-purpel-silex.webp +0 -0
- /package/{_silex/old → templates}/assets/bg-silex-purpel.webp +0 -0
- /package/{_silex/old → templates}/assets/empty-projects-sos.gif +0 -0
- /package/{_site → templates}/assets/favicon-32x32.png +0 -0
- /package/{_silex/old → templates}/assets/logo-silex.svg +0 -0
- /package/{_silex/old → templates}/assets/picto-silex@3x.png +0 -0
|
@@ -0,0 +1,478 @@
|
|
|
1
|
+
---
|
|
2
|
+
permalink: "/{{lang}}/"
|
|
3
|
+
lang: "en"
|
|
4
|
+
collection: "Websites"
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
<!DOCTYPE html>
|
|
8
|
+
<html lang="">
|
|
9
|
+
<head>
|
|
10
|
+
<meta charset="UTF-8">
|
|
11
|
+
<link rel="stylesheet" href="/css/websites-4b9b2b0a0a907b33eca109d50c2a3eee97f1955c742cef487110d21a0bbf8f50.css" />
|
|
12
|
+
<!-- font google -->
|
|
13
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" />
|
|
14
|
+
<link href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;700&display=swap" rel="stylesheet">
|
|
15
|
+
{% render "alternate.liquid" languages: languages lang: lang page: page %}
|
|
16
|
+
<style>
|
|
17
|
+
.before-js > * {
|
|
18
|
+
visibility: hidden;
|
|
19
|
+
opacity: 0;
|
|
20
|
+
transition: opacity .5s ease;
|
|
21
|
+
}
|
|
22
|
+
.before-js[data-gjs-type] > *, /* This is only inside the editor, .before-js needs to be on the body */
|
|
23
|
+
.after-js > * {
|
|
24
|
+
visibility: visible;
|
|
25
|
+
opacity: 1;
|
|
26
|
+
}
|
|
27
|
+
.before-js:before {
|
|
28
|
+
content: 'Loading';
|
|
29
|
+
position: absolute;
|
|
30
|
+
top: 49%;
|
|
31
|
+
left: 49%;
|
|
32
|
+
}
|
|
33
|
+
.before-js[data-gjs-type]:before, /* This is only inside the editor, .before-js needs to be on the body */
|
|
34
|
+
.after-js:before {
|
|
35
|
+
content: none;
|
|
36
|
+
}
|
|
37
|
+
/*BTNS*/
|
|
38
|
+
.button, .pointer {
|
|
39
|
+
cursor: pointer!important}
|
|
40
|
+
.button{
|
|
41
|
+
min-width:110px;
|
|
42
|
+
}
|
|
43
|
+
/*BTNS*/
|
|
44
|
+
a {
|
|
45
|
+
text-decoration: none;
|
|
46
|
+
color:#8873FE;
|
|
47
|
+
}
|
|
48
|
+
a:hover {
|
|
49
|
+
text-decoration: underline;
|
|
50
|
+
}
|
|
51
|
+
.uppercase {
|
|
52
|
+
text-transform: uppercase;
|
|
53
|
+
}
|
|
54
|
+
.underline:hover{
|
|
55
|
+
text-decoration: underline;
|
|
56
|
+
text-decoration-thickness: from-font;
|
|
57
|
+
text-underline-position: under;
|
|
58
|
+
}
|
|
59
|
+
/*footer position*/
|
|
60
|
+
.main-min-height {
|
|
61
|
+
min-height: calc(100vh - 560px);
|
|
62
|
+
}
|
|
63
|
+
/*footer position*/
|
|
64
|
+
/*label*/
|
|
65
|
+
::placeholder {
|
|
66
|
+
color: #8873FE;
|
|
67
|
+
}
|
|
68
|
+
input:focus {
|
|
69
|
+
border: 2px solid #9977FE;
|
|
70
|
+
background-color:#ffffff;
|
|
71
|
+
}
|
|
72
|
+
:focus {
|
|
73
|
+
outline: none;
|
|
74
|
+
}
|
|
75
|
+
/*label*/
|
|
76
|
+
.skeleton-anim:after {
|
|
77
|
+
width: 100%;
|
|
78
|
+
height: 100%;
|
|
79
|
+
position: absolute;
|
|
80
|
+
top: 0;
|
|
81
|
+
left: 0;
|
|
82
|
+
content: "";
|
|
83
|
+
background:
|
|
84
|
+
linear-gradient(0.25turn, transparent, rgba(255,255,255,.75), transparent),
|
|
85
|
+
linear-gradient(transparent, transparent),
|
|
86
|
+
radial-gradient(38px circle at 19px 19px, transparent 50%, transparent 51%),
|
|
87
|
+
linear-gradient(transparent, transparent);
|
|
88
|
+
background-repeat: no-repeat;
|
|
89
|
+
background-size: 315px 250px, 315px 180px, 100px 100px, 225px 30px;
|
|
90
|
+
background-position: -315px 0, 0 0, 0px 190px, 50px 195px;
|
|
91
|
+
animation: loading 1.5s infinite;
|
|
92
|
+
}
|
|
93
|
+
@keyframes loading {
|
|
94
|
+
to {
|
|
95
|
+
background-position: 200% 0, 0 0, 0 190px, 50px 195px;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/*FX ANIMATIONS*/
|
|
99
|
+
/*scale-round-inside_pour-BTN*/
|
|
100
|
+
.fx-scale-round {
|
|
101
|
+
position:relative;
|
|
102
|
+
z-index: 10;
|
|
103
|
+
overflow: hidden;
|
|
104
|
+
}
|
|
105
|
+
.fx-scale-round::after {
|
|
106
|
+
content: "";
|
|
107
|
+
background: #ffffff;
|
|
108
|
+
position: absolute;
|
|
109
|
+
z-index: -1;
|
|
110
|
+
border-radius: 50%;
|
|
111
|
+
left: -50%;
|
|
112
|
+
right: -50%;
|
|
113
|
+
top: -100%;
|
|
114
|
+
bottom: -100%;
|
|
115
|
+
transform: scale(0, 0);
|
|
116
|
+
transform-origin: center bottom;
|
|
117
|
+
transition: all 0.3s ease-out;
|
|
118
|
+
}
|
|
119
|
+
.fx-scale-round:hover {
|
|
120
|
+
transform-origin: center bottom;
|
|
121
|
+
transform: scale(1.1);
|
|
122
|
+
transition: transform 0.2s cubic-bezier(0, -0.530, 0.405, 2.8);
|
|
123
|
+
}
|
|
124
|
+
.fx-scale-round:hover::after {
|
|
125
|
+
transform: scale(1, 1);
|
|
126
|
+
transition: transform 0.2s cubic-bezier(0, -0.530, 0.405, 2.8);
|
|
127
|
+
}
|
|
128
|
+
/*scale-round-inside_pour-BTN*/
|
|
129
|
+
/*scale*/
|
|
130
|
+
.fx-scale:hover {
|
|
131
|
+
transform-origin: center bottom;
|
|
132
|
+
transform: scale(1.1);
|
|
133
|
+
transition: transform 0.2s cubic-bezier(0, -0.530, 0.405, 2.8);
|
|
134
|
+
}
|
|
135
|
+
/*flash*/
|
|
136
|
+
.fx-flash:hover {
|
|
137
|
+
animation: flash-in .25s ;
|
|
138
|
+
}
|
|
139
|
+
/*flash-in animation*/
|
|
140
|
+
@keyframes flash-in{
|
|
141
|
+
0% {
|
|
142
|
+
opacity:.25;
|
|
143
|
+
}
|
|
144
|
+
100% {
|
|
145
|
+
opacity:1;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
/*flash-in animation*/
|
|
149
|
+
/*FX ANIMATIONS*/
|
|
150
|
+
</style>
|
|
151
|
+
<script src="/js/vue.global.prod.js"></script>
|
|
152
|
+
<script src="/js/main.js"></script>
|
|
153
|
+
<script type="module">
|
|
154
|
+
const CONNECTORS_PATH = '/connectors/'
|
|
155
|
+
window.addEventListener('load', function() {
|
|
156
|
+
const { createApp } = Vue;
|
|
157
|
+
const { api, constants, types } = silex;
|
|
158
|
+
const {
|
|
159
|
+
ConnectorType,
|
|
160
|
+
} = types
|
|
161
|
+
const {
|
|
162
|
+
setServerUrl,
|
|
163
|
+
getUser,
|
|
164
|
+
logout,
|
|
165
|
+
websiteDelete,
|
|
166
|
+
websiteDuplicate,
|
|
167
|
+
websiteList,
|
|
168
|
+
websiteCreate,
|
|
169
|
+
websiteMetaWrite,
|
|
170
|
+
} = api
|
|
171
|
+
function toSafeId(name) {
|
|
172
|
+
return name.replace(/[/\\?%*:|"<>]/g, '_')
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
const App = {
|
|
176
|
+
data() {
|
|
177
|
+
return {
|
|
178
|
+
websites: [],
|
|
179
|
+
newWebsiteName: '',
|
|
180
|
+
showCreationForm: false,
|
|
181
|
+
error: null,
|
|
182
|
+
message: null,
|
|
183
|
+
loggedIn: false,
|
|
184
|
+
loading: true,
|
|
185
|
+
storage: null,
|
|
186
|
+
user: null,
|
|
187
|
+
showMenu: false,
|
|
188
|
+
empty: false,
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
mounted() {
|
|
192
|
+
this.init()
|
|
193
|
+
},
|
|
194
|
+
|
|
195
|
+
methods: {
|
|
196
|
+
async init() {
|
|
197
|
+
try {
|
|
198
|
+
// Init Silex server path
|
|
199
|
+
// Go up one level because of the language prefix
|
|
200
|
+
setServerUrl(window.location.origin)
|
|
201
|
+
// Start
|
|
202
|
+
const user = await getUser({type: ConnectorType.STORAGE})
|
|
203
|
+
// Escape single quotes in the picture URL and decode the picture URL
|
|
204
|
+
user.picture = decodeURIComponent(user.picture).replace(/'/g, "\\'")
|
|
205
|
+
if(user) {
|
|
206
|
+
this.user = user
|
|
207
|
+
this.loggedIn = true
|
|
208
|
+
this.websites = await websiteList({connectorId: this.user.storage.connectorId})
|
|
209
|
+
this.empty = this.websites.length === 0
|
|
210
|
+
this.loading = false
|
|
211
|
+
} else {
|
|
212
|
+
this.openLogin()
|
|
213
|
+
}
|
|
214
|
+
} catch (error) {
|
|
215
|
+
console.error(error)
|
|
216
|
+
this.loading = false
|
|
217
|
+
if(error.code === 401 || error.httpStatusCode === 401) {
|
|
218
|
+
this.loggedIn = false
|
|
219
|
+
this.openLogin()
|
|
220
|
+
} else {
|
|
221
|
+
this.error = `{{ api-translations[lang]["Failed to start dashboard"] }} - ${error.message}`
|
|
222
|
+
this.message = ''
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
|
|
227
|
+
openLogin(id, lang) {
|
|
228
|
+
//throw new Error('debug')
|
|
229
|
+
const path = `/{{lang}}${CONNECTORS_PATH}`
|
|
230
|
+
console.log(window.location.pathname, window.location.path, path)
|
|
231
|
+
if(window.location.pathname === path) return
|
|
232
|
+
window.open(path, '_self')
|
|
233
|
+
},
|
|
234
|
+
|
|
235
|
+
openEditor(id, lang) {
|
|
236
|
+
window.open(`/?id=${id}&lang=${lang}&connectorId=${this.user.storage.connectorId}`, '_self')
|
|
237
|
+
},
|
|
238
|
+
|
|
239
|
+
async logout() {
|
|
240
|
+
await logout({
|
|
241
|
+
type: ConnectorType.STORAGE,
|
|
242
|
+
connectorId: this.user.storage.connectorId,
|
|
243
|
+
})
|
|
244
|
+
window.location.reload()
|
|
245
|
+
},
|
|
246
|
+
|
|
247
|
+
async createWebsite() {
|
|
248
|
+
try {
|
|
249
|
+
if (!this.newWebsiteName) throw new Error('{{ api-translations[lang]["You need to provide a website name"] }}')
|
|
250
|
+
this.loading = true
|
|
251
|
+
const websiteId = toSafeId(this.newWebsiteName)
|
|
252
|
+
const result = await websiteCreate({
|
|
253
|
+
websiteId,
|
|
254
|
+
data: {
|
|
255
|
+
name: this.newWebsiteName,
|
|
256
|
+
imageUrl: null,
|
|
257
|
+
},
|
|
258
|
+
connectorId: this.user.storage.connectorId
|
|
259
|
+
})
|
|
260
|
+
this.message = '{{ api-translations[lang]["Website created successfully"] }}'
|
|
261
|
+
this.error = ''
|
|
262
|
+
this.newWebsiteName = ''
|
|
263
|
+
this.showCreationForm = false;
|
|
264
|
+
this.websites = await websiteList({connectorId: this.user.storage.connectorId})
|
|
265
|
+
this.empty = this.websites.length === 0
|
|
266
|
+
this.loading = false
|
|
267
|
+
return result
|
|
268
|
+
} catch (error) {
|
|
269
|
+
this.loading = false
|
|
270
|
+
console.error(error)
|
|
271
|
+
this.error = `{{ api-translations[lang]["Failed to create website"] }} - ${error.message}`
|
|
272
|
+
this.message = ''
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
|
|
276
|
+
async deleteWebsite(websiteId) {
|
|
277
|
+
const ok = confirm('{{ api-translations[lang]["Deleting a website? Are your sure? Really?"] }}')
|
|
278
|
+
if (!ok) return
|
|
279
|
+
this.loading = true
|
|
280
|
+
try {
|
|
281
|
+
const result = await websiteDelete({websiteId, connectorId: this.user.storage.connectorId})
|
|
282
|
+
this.message = '{{ api-translations[lang]["Website deleted successfully"] }}'
|
|
283
|
+
this.error = ''
|
|
284
|
+
this.websites = await websiteList({connectorId: this.user.storage.connectorId})
|
|
285
|
+
this.empty = this.websites.length === 0
|
|
286
|
+
this.loading = false
|
|
287
|
+
return result
|
|
288
|
+
} catch (error) {
|
|
289
|
+
this.loading = false
|
|
290
|
+
this.error = `{{ api-translations[lang]["Failed to delete website"] }} - ${error.message}`
|
|
291
|
+
this.message = ''
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
|
|
295
|
+
async duplicateWebsite(websiteId) {
|
|
296
|
+
this.loading = true
|
|
297
|
+
try {
|
|
298
|
+
await websiteDuplicate({websiteId, connectorId: this.user.storage.connectorId, data: { name }})
|
|
299
|
+
this.error = ''
|
|
300
|
+
this.websites = await websiteList({connectorId: this.user.storage.connectorId})
|
|
301
|
+
this.message = '{{ api-translations[lang]["Website duplicated successfully"] }}'
|
|
302
|
+
this.empty = this.websites.length === 0
|
|
303
|
+
this.loading = false
|
|
304
|
+
} catch (error) {
|
|
305
|
+
this.loading = false
|
|
306
|
+
this.error = `{{ api-translations[lang]["Failed to duplicate website"] }} - ${error.message}`
|
|
307
|
+
this.message = ''
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
|
|
311
|
+
async renameWebsite(websiteId) {
|
|
312
|
+
const website = this.websites.find(w => w.websiteId === websiteId)
|
|
313
|
+
const name = prompt('{{ api-translations[lang]["New name for this website"] }}', website.name)
|
|
314
|
+
if (!name) return
|
|
315
|
+
this.loading = true
|
|
316
|
+
try {
|
|
317
|
+
const result = await websiteMetaWrite({websiteId, connectorId: this.user.storage.connectorId, data: { name }})
|
|
318
|
+
this.message = '{{ api-translations[lang]["Website renamed successfully"] }}'
|
|
319
|
+
this.error = ''
|
|
320
|
+
this.websites = await websiteList({connectorId: this.user.storage.connectorId})
|
|
321
|
+
this.empty = this.websites.length === 0
|
|
322
|
+
this.loading = false
|
|
323
|
+
return result
|
|
324
|
+
} catch (error) {
|
|
325
|
+
this.loading = false
|
|
326
|
+
this.error = `{{ api-translations[lang]["Failed to rename website"] }} - ${error.message}`
|
|
327
|
+
this.message = ''
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
},
|
|
331
|
+
};
|
|
332
|
+
// Prepare elements for vue
|
|
333
|
+
document.querySelectorAll('[v-text], [v-html]')
|
|
334
|
+
.forEach(el => el.innerText = '')
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
// Create the app
|
|
338
|
+
const app = createApp(App);
|
|
339
|
+
|
|
340
|
+
// Mount the app
|
|
341
|
+
app.mount('.app');
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
// Remove loading
|
|
345
|
+
setTimeout(() => {
|
|
346
|
+
document.querySelector('.before-js').classList.add('after-js')
|
|
347
|
+
}, 100)
|
|
348
|
+
})
|
|
349
|
+
</script>
|
|
350
|
+
|
|
351
|
+
<title>{% liquid
|
|
352
|
+
assign var_ik0i_243 = tina.homeConnection.edges | where | first
|
|
353
|
+
assign var_ik0i_244 = var_ik0i_243.node.title
|
|
354
|
+
echo var_ik0i_244
|
|
355
|
+
%}</title>
|
|
356
|
+
<link rel="icon" href="/assets/favicon-32x32.png" />
|
|
357
|
+
<meta name="og:title" property="og:title" content="Silex Dashboard"/>
|
|
358
|
+
<link href="https://www.googleapis.com" rel="preconnect" ><link href="https://fonts.gstatic.com" rel="preconnect" crossorigin ><link href="https://www.googleapis.com/css?family=Ubuntu&display=swap" rel="stylesheet" ></head>
|
|
359
|
+
{% liquid
|
|
360
|
+
assign var_ik0i_146 = tina.settingsConnection.edges | where: "node.lang", page.lang | first
|
|
361
|
+
assign state_ik0i-958_ik0i-e8l061o7k5 = var_ik0i_146
|
|
362
|
+
%}
|
|
363
|
+
{% liquid
|
|
364
|
+
assign var_ik0i_147 = tina.homeConnection.edges | where: "node.lang", page.lang | first
|
|
365
|
+
assign var_ik0i_148 = var_ik0i_147.node
|
|
366
|
+
assign state_ik0i-958_ik0i-24xejc2n0xy = var_ik0i_148
|
|
367
|
+
%}<body id="ik0i" class="body loading app before-js"><HEADER id="igrg" class="menu-bar"><A id="igvu43" href="/"><img src="/assets/favicon-32x32.png" id="iel80b-2" class="nav__logo"/></A><NAV id="i9jq" class="nav">{% liquid
|
|
368
|
+
assign var_iels_74 = tina.settingsConnection.edges | where: "node.lang", page.lang | first
|
|
369
|
+
assign var_iels_75 = var_iels_74.node.nav
|
|
370
|
+
%}
|
|
371
|
+
{% for state_iels-228___data in var_iels_75 %}
|
|
372
|
+
<a id="iels" href="{% liquid
|
|
373
|
+
assign var_iels_76 = state_iels-228___data.url
|
|
374
|
+
echo var_iels_76
|
|
375
|
+
%}" class="nav__item uppercase fx-flash nav_item--active" target="{% liquid
|
|
376
|
+
assign var_iels_77 = state_iels-228___data.target
|
|
377
|
+
echo var_iels_77
|
|
378
|
+
%}">{% liquid
|
|
379
|
+
assign var_iels_73 = state_iels-228___data.label
|
|
380
|
+
echo var_iels_73
|
|
381
|
+
%}</a>{% endfor %}</NAV>{% liquid
|
|
382
|
+
assign var_i2red7_82 = tina.languagesConnection.edges
|
|
383
|
+
%}
|
|
384
|
+
{% for state_i2red7-8291___data in var_i2red7_82 %}
|
|
385
|
+
<div id="i2red7" class="lang"><a href="{% liquid
|
|
386
|
+
assign var_iciz_81 = state_i2red7-8291___data.node.permalink
|
|
387
|
+
echo var_iciz_81
|
|
388
|
+
%}" id="iciz" class="lang__item nav__item uppercase">{% liquid
|
|
389
|
+
assign var_iciz_80 = state_i2red7-8291___data.node.label
|
|
390
|
+
echo var_iciz_80
|
|
391
|
+
%}</a></div>{% endfor %}<div id="i24ew" class="user__wrapper pointer" v-if="user" v-on:click="showMenu = !showMenu"><div id="i5xsbd" class="user-icon__wrapper" v-if="user" v-show="!showMenu || user.storage.disableLogout"><div id="i5wlbq" class="user-icon__image" v-if="user" v-show="!showMenu || user.storage.disableLogout" :style="{ backgroundImage: `url('${user?.picture}')`, backgroundRepeat: 'no-repeat', backgroundSize: 'contain', }"></div></div><div id="ic9eoa" class="" v-show="showMenu && !user.storage.disableLogout"><div id="iksw4d" class="button button--tertiary text-centered" v-on:click="logout()">Logout</div></div></div></HEADER><HEADER id="iy8ax3" class="bg-silex-purpel"><div id="iisz8f" class="section-top text-centered text-white"><h1 id="ic31o" class="title-40" v-if="!empty">{% liquid
|
|
392
|
+
assign var_ic31o_83 = state_ik0i-958_ik0i-24xejc2n0xy.title2
|
|
393
|
+
echo var_ic31o_83
|
|
394
|
+
%}</h1><p id="iyex8" class="subtitle-16" v-if="!empty">{% liquid
|
|
395
|
+
assign var_iyex8_84 = state_ik0i-958_ik0i-24xejc2n0xy.subtitle
|
|
396
|
+
echo var_iyex8_84
|
|
397
|
+
%}</p><h1 id="i4ybc" class="title-40" v-if="empty">{% liquid
|
|
398
|
+
assign var_i4ybc_85 = state_ik0i-958_ik0i-24xejc2n0xy.title2_empty
|
|
399
|
+
echo var_i4ybc_85
|
|
400
|
+
%}</h1><p id="iino6r" class="subtitle-16" v-if="empty">{% liquid
|
|
401
|
+
assign var_iino6r_86 = state_ik0i-958_ik0i-24xejc2n0xy.subtitle_empty
|
|
402
|
+
echo var_iino6r_86
|
|
403
|
+
%}</p></div></HEADER><MAIN id="iz63r" class="padding-normal main-min-height website-max-width margin-80"><section id="iqmx38" class="" v-if="empty"></section><div id="ickx4" class="margin-20" v-if="!empty"><button id="ic92g" class="button button--primary rounded top-space-40 fx-scale-round" v-if="!showCreationForm" v-on:click="showCreationForm = !showCreationForm"><span id="igsxoc" class="icon-font">+</span> <span id="ixu14" class="">{% liquid
|
|
404
|
+
assign var_ixu14_90 = state_ik0i-958_ik0i-24xejc2n0xy.add_button
|
|
405
|
+
echo var_ixu14_90
|
|
406
|
+
%}</span></button><div id="i0ro3" class="button button--secondary rounded">Import</div></div><div id="ihwwxz" class="box top-space-40 padding-30 box_transp" v-if="showCreationForm"><h3 id="i3gd1b" class="box__header text-centered">{% liquid
|
|
407
|
+
assign var_i3gd1b_100 = state_ik0i-958_ik0i-24xejc2n0xy.add_title
|
|
408
|
+
echo var_i3gd1b_100
|
|
409
|
+
%}</h3><form method="get" id="i50acf" class="form" v-on:submit.prevent="createWebsite"><div id="igtg1t" class="v-space"><label id="i1nmbc" class="v-space bold color-2B1B63-80">{% liquid
|
|
410
|
+
assign var_i1nmbc_105 = state_ik0i-958_ik0i-24xejc2n0xy.add_name_label
|
|
411
|
+
echo var_i1nmbc_105
|
|
412
|
+
%}</label><input type="text" id="ij5iwh" placeholder="{% liquid
|
|
413
|
+
assign var_ij5iwh_106 = state_ik0i-958_ik0i-24xejc2n0xy.add_name_placeholder
|
|
414
|
+
echo var_ij5iwh_106
|
|
415
|
+
%}" class="input full-width" v-model="newWebsiteName"></input></div><div id="ie0xes"><button type="submit" id="i021na" class="button rounded button--primary right-space-20 fx-scale-round">{% liquid
|
|
416
|
+
assign var_i021na_107 = state_ik0i-958_ik0i-24xejc2n0xy.add_ok
|
|
417
|
+
echo var_i021na_107
|
|
418
|
+
%}</button><button type="reset" class="button rounded button--secondary fx-scale-round" v-on:click="showCreationForm = !showCreationForm" v-if="!empty">{% liquid
|
|
419
|
+
assign var_inpaq_108 = state_ik0i-958_ik0i-24xejc2n0xy.add_cancel
|
|
420
|
+
echo var_inpaq_108
|
|
421
|
+
%}</button></div></form></div><div id="if80m" class="margin-20"><section id="idgvg" class="button-bar loaded__item" v-if="!loading" v-for="(website, index) in websites" :key="index"><h3 id="i69a7" class="right-space-40 color-2B1B63-80 uppercase pointer fx-flash full-width button-bar__title underline" v-on:click="openEditor(website.websiteId, 'en')" v-text="website.name || website.id">My first website</h3><p id="i65hn" class="button-bar__item--secondary flex-no-shrink right-space-40" v-text="'Updated ' + new Date(website.updatedAt).toLocaleDateString(undefined, { day: 'numeric', month: 'long', year: 'numeric' })">Updated 1h ago by lexoyo</p><p id="i64qa" class="button-bar__item--secondary flex-no-shrink right-space-40" v-text="'Created ' + new Date(website.createdAt).toLocaleDateString(undefined, { day: 'numeric', month: 'long', year: 'numeric' })">Created 2023-02-16 by lexoyo</p><div id="i3b4tr" class="flex-no-shrink"><button id="ifyf6p" title="{% liquid
|
|
422
|
+
assign var_ifyf6p_117 = state_ik0i-958_ik0i-24xejc2n0xy.list_edit
|
|
423
|
+
echo var_ifyf6p_117
|
|
424
|
+
%}" class="button-bar__item--link pointer fx-scale fx-flash button-bar__item--icon" v-on:click="openEditor(website.websiteId, 'en')">{% liquid
|
|
425
|
+
assign var_ifyf6p_116 = state_ik0i-958_ik0i-24xejc2n0xy.list_edit_icon
|
|
426
|
+
echo var_ifyf6p_116
|
|
427
|
+
%}</button><button id="ihf6ew" title="{% liquid
|
|
428
|
+
assign var_ihf6ew_119 = state_ik0i-958_ik0i-24xejc2n0xy.list_rename
|
|
429
|
+
echo var_ihf6ew_119
|
|
430
|
+
%}" class="button-bar__item--link pointer fx-scale fx-flash button-bar__item--icon" v-on:click="renameWebsite(website.websiteId, 'en')">{% liquid
|
|
431
|
+
assign var_ihf6ew_118 = state_ik0i-958_ik0i-24xejc2n0xy.list_rename_icon
|
|
432
|
+
echo var_ihf6ew_118
|
|
433
|
+
%}</button><button id="iol4h" title="{% liquid
|
|
434
|
+
assign var_iol4h_121 = state_ik0i-958_ik0i-24xejc2n0xy.list_duplicate
|
|
435
|
+
echo var_iol4h_121
|
|
436
|
+
%}" class="button-bar__item--link pointer fx-flash fx-scale button-bar__item--icon" v-on:click="duplicateWebsite(website.websiteId, 'en')">{% liquid
|
|
437
|
+
assign var_iol4h_120 = state_ik0i-958_ik0i-24xejc2n0xy.list_duplicate_icon
|
|
438
|
+
echo var_iol4h_120
|
|
439
|
+
%}</button><button id="it5ia" class="button-bar__item--link pointer fx-flash fx-scale" title="{% liquid
|
|
440
|
+
assign var_it5ia_122 = state_ik0i-958_ik0i-24xejc2n0xy.list_delete
|
|
441
|
+
echo var_it5ia_122
|
|
442
|
+
%}" v-on:click="deleteWebsite(website.websiteId)">X</button></div></section><section id="i1fjn" class="button-bar loading__item skeleton-anim skeleton-wrapper" v-if="loading"><H3 id="iwu6a" class="skeleton-text skeleton right-space-40">My first websiteMy first websiteMy first websiteMy first</H3><P id="i26fn" class="button-bar__item--secondary skeleton-text skeleton right-space-40">Updated 1h ago by lexoyo</P><P id="iywbk" class="button-bar__item--secondary skeleton-text skeleton right-space-40">Created 2023-02-16 by lexoyo</P><div id="ixz6c" class="skeleton skeleton-button">Edit</div></section><section id="iwxxo5" class="button-bar loading__item skeleton-anim skeleton-wrapper" v-if="loading"><H3 id="inmp3" class="skeleton-text skeleton right-space-40">My first websiteMy first websiteMy first websiteMy first</H3><P id="icjz8" class="button-bar__item--secondary skeleton-text skeleton right-space-40">Updated 1h ago by lexoyo</P><P id="illbe" class="button-bar__item--secondary skeleton-text skeleton right-space-40">Created 2023-02-16 by lexoyo</P><div id="i9fx3l" class="skeleton skeleton-button">Edit</div></section><section id="isld3r" class="button-bar loading__item skeleton-anim skeleton-wrapper" v-if="loading"><H3 class="button-bar_item button-bar__item--main skeleton-text skeleton right-space-40">My first websiteMy first websiteMy first websiteMy first</H3><P class="button-bar_item button-bar__item--secondary skeleton-text skeleton right-space-40">Updated 1h ago by lexoyo</P><P class="button-bar_item button-bar__item--secondary skeleton-text skeleton right-space-40">Created 2023-02-16 by lexoyo</P><div id="i8oes3" class="button-bar_item skeleton skeleton-button">Edit</div></section></div><div id="ipccl7"><div id="i2fkm9" class="margin-20 empty-image" v-if="empty"></div><div id="i5ydxo" class="box padding-50-30 box--centered" v-if="empty"><p id="ikl1qu" class="text-centered title-26">{% liquid
|
|
443
|
+
assign var_ikl1qu_127 = state_ik0i-958_ik0i-24xejc2n0xy.text_empty1
|
|
444
|
+
echo var_ikl1qu_127
|
|
445
|
+
%}</p><h3 id="iwzrqi" class="text-centered title-26">{% liquid
|
|
446
|
+
assign var_iwzrqi_128 = state_ik0i-958_ik0i-24xejc2n0xy.text_empty2
|
|
447
|
+
echo var_iwzrqi_128
|
|
448
|
+
%}</h3><button id="i2x0l" class="button button--primary rounded top-space-40 fx-scale-round" v-on:click="showCreationForm = !showCreationForm" v-if="!showCreationForm"><span id="ibsgw" class="icon-font">+</span> <span id="itl2n8" class="">{% liquid
|
|
449
|
+
assign var_itl2n8_130 = state_ik0i-958_ik0i-24xejc2n0xy.add_button
|
|
450
|
+
echo var_itl2n8_130
|
|
451
|
+
%}</span></button></div></div><div id="i7ej6j" class="flex-between box-message text-white" v-if="error"><h3 id="iv0eyi" class="box-message-text" v-text="error">Insert your text here</h3><div id="i4656n" class="pointer button-bar__item--link text-white" v-on:click="error = null">{% liquid
|
|
452
|
+
assign var_i4656n_132 = state_ik0i-958_ik0i-24xejc2n0xy.message_dismiss
|
|
453
|
+
echo var_i4656n_132
|
|
454
|
+
%}</div></div><div id="ilteie" class="flex-between box-message text-white" v-if="message"><h3 id="i2d31v" class="box-message-text" v-text="message">Insert your text here</h3><div id="i2urco" class="rounded pointer button-bar__item--link text-white" v-on:click="message = null">{% liquid
|
|
455
|
+
assign var_i2urco_134 = state_ik0i-958_ik0i-24xejc2n0xy.message_dismiss
|
|
456
|
+
echo var_i2urco_134
|
|
457
|
+
%}</div></div></MAIN><FOOTER id="ilzpl" class="footer">{% liquid
|
|
458
|
+
assign var_isucae_145 = state_ik0i-958_ik0i-e8l061o7k5.node.footer_links
|
|
459
|
+
%}
|
|
460
|
+
{% for state_isucae-3308___data in var_isucae_145 %}
|
|
461
|
+
<div id="isucae" class="footer__column"><h3 id="ipa5zg" href="" class="footer__item">{% liquid
|
|
462
|
+
assign var_ipa5zg_140 = state_isucae-3308___data.title
|
|
463
|
+
echo var_ipa5zg_140
|
|
464
|
+
%}</h3>{% liquid
|
|
465
|
+
assign var_ief642_142 = state_isucae-3308___data.columns
|
|
466
|
+
%}
|
|
467
|
+
{% for state_i2u9h4-2642___data in var_ief642_142 %}
|
|
468
|
+
<a href="{% liquid
|
|
469
|
+
assign var_ief642_143 = state_i2u9h4-2642___data.url
|
|
470
|
+
echo var_ief642_143
|
|
471
|
+
%}" class="footer__item" target="{% liquid
|
|
472
|
+
assign var_ief642_144 = state_i2u9h4-2642___data.target
|
|
473
|
+
echo var_ief642_144
|
|
474
|
+
%}">{% liquid
|
|
475
|
+
assign var_ief642_141 = state_i2u9h4-2642___data.label
|
|
476
|
+
echo var_ief642_141
|
|
477
|
+
%}</a>{% endfor %}</div>{% endfor %}</FOOTER></body>
|
|
478
|
+
</html>
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
export default async function (configData) {
|
|
4
|
+
const data = {
|
|
5
|
+
...configData,
|
|
6
|
+
lang: 'fr',
|
|
7
|
+
}
|
|
8
|
+
const result = {}
|
|
9
|
+
try {
|
|
10
|
+
result['tina'] = (await (await fetch(`http://localhost:4001/graphql`, {
|
|
11
|
+
|
|
12
|
+
headers: {
|
|
13
|
+
'Content-Type': `application/json`,
|
|
14
|
+
},
|
|
15
|
+
method: 'POST',
|
|
16
|
+
body: JSON.stringify({
|
|
17
|
+
query: `query {
|
|
18
|
+
__typename
|
|
19
|
+
settingsConnection {
|
|
20
|
+
__typename
|
|
21
|
+
edges {
|
|
22
|
+
__typename
|
|
23
|
+
node {
|
|
24
|
+
__typename
|
|
25
|
+
nav {
|
|
26
|
+
__typename
|
|
27
|
+
label
|
|
28
|
+
url
|
|
29
|
+
target
|
|
30
|
+
|
|
31
|
+
}
|
|
32
|
+
footer_links {
|
|
33
|
+
__typename
|
|
34
|
+
title
|
|
35
|
+
columns {
|
|
36
|
+
__typename
|
|
37
|
+
label
|
|
38
|
+
url
|
|
39
|
+
target
|
|
40
|
+
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
}
|
|
44
|
+
lang
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
}
|
|
51
|
+
homeConnection {
|
|
52
|
+
__typename
|
|
53
|
+
edges {
|
|
54
|
+
__typename
|
|
55
|
+
node {
|
|
56
|
+
__typename
|
|
57
|
+
title2
|
|
58
|
+
subtitle
|
|
59
|
+
title2_empty
|
|
60
|
+
subtitle_empty
|
|
61
|
+
add_title
|
|
62
|
+
add_name_label
|
|
63
|
+
add_name_placeholder
|
|
64
|
+
add_ok
|
|
65
|
+
add_cancel
|
|
66
|
+
list_edit_icon
|
|
67
|
+
list_edit
|
|
68
|
+
list_rename_icon
|
|
69
|
+
list_rename
|
|
70
|
+
list_duplicate
|
|
71
|
+
list_duplicate_icon
|
|
72
|
+
list_delete
|
|
73
|
+
text_empty1
|
|
74
|
+
text_empty2
|
|
75
|
+
add_button
|
|
76
|
+
message_dismiss
|
|
77
|
+
lang
|
|
78
|
+
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
}
|
|
84
|
+
languagesConnection {
|
|
85
|
+
__typename
|
|
86
|
+
edges {
|
|
87
|
+
__typename
|
|
88
|
+
node {
|
|
89
|
+
__typename
|
|
90
|
+
label
|
|
91
|
+
permalink
|
|
92
|
+
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
}`,
|
|
100
|
+
})
|
|
101
|
+
})).json()).data
|
|
102
|
+
} catch (e) {
|
|
103
|
+
console.error('11ty plugin for Silex: error fetching graphql data', e, 'tina', 'http://localhost:4001/graphql')
|
|
104
|
+
throw e
|
|
105
|
+
}
|
|
106
|
+
return result
|
|
107
|
+
}
|
|
108
|
+
|