-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
358 lines (343 loc) · 14.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
<!DOCTYPE html>
<html id="bg">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Menu Web</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css">
<link rel="stylesheet" href="src/css/animate.css" />
<link rel="stylesheet" href="src/css/style.css" />
<script src="https://kit.fontawesome.com/269b5f41a7.js" crossorigin="anonymous"></script>
<!-- development version, includes helpful console warnings -->
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<!-- production version, optimized for size and speed --
<script src="https://cdn.jsdelivr.net/npm/vue"></script>-->
</head>
<body>
<div id="app">
<section class="hero has-background-image is-fullheight" id="main">
<!-- Navbar -->
<div class="hero-head">
<header class="navbar">
<div class="container">
<div class="navbar-brand">
<!--
<div class="navbar-item has-dropdown is-hoverable" id="links">
<a class="navbar-link">
Favoris
</a>
<div class="navbar-dropdown">
<a class="navbar-item" v-for="link in links" v-bind:href="link.url">
<img class="favImg"
v-bind:src="'https://s2.googleusercontent.com/s2/favicons?domain_url=' + link.url">
{{ link.name }}
</a>
<hr class="navbar-divider">
<a class="navbar-item add-link">
<i class="fas fa-plus"></i> Ajouter un lien
</a>
</div>
</div>
-->
<span class="navbar-item">
<form id="search" method="GET" v-bind:action="searchEngineUrl" v-if="enable">
<div class="field">
<p class="control has-icons-left">
<input autofocus name="q" class="input is-rounded" type="text" id="googleSearch"
v-bind:placeholder="'Rechercher sur '+searchEngineName" />
<span class="icon is-small is-left">
<i class="fas fa-search"></i>
</span>
</p>
</div>
</form>
</span>
</div>
<div id="navbarMenuHeroC" class="navbar-menu">
<div class="navbar-end">
<div class="navbar-item animated fadeIn" id="weather" v-if="enable">
<span id="wIcon"></span> {{ temperature }}{{ unite }}
</div>
</div>
</div>
</div>
</header>
</div>
<!-- Title & Message -->
<div class="hero-body" id="mainText">
<div class="container has-text-centered animated fadeIn">
<h1 class="title" id="time" v-if="enable">{{ time }}</h1>
<h2 class="subtitle" id="welcomeMessage" v-if="enable">{{ message }}</h2>
</div>
</div>
<!-- Footer -->
<div class="hero-foot">
<div class="citationBox animated fadeIn" id="quotes" v-if="enable">
<p class="quote">{{ quote.text }}</p>
-
<i class="quoteCredit">{{ quote.personnage }}, {{ quote.saison }} épisode {{
quote.episode }}</i>
</div>
<div class="creditBox" id="backgroundCredits">
<div id="settingButton">
<i class="fas fa-cog" onclick="toogleSettings()" id="optionCog"></i><br />
</div>
Photo par
<a target="_blank" v-bind:href="currentBackgroundImage.link">{{ currentBackgroundImage.author }}</a>
/
<a target="_blank"
v-bind:href="currentBackgroundImage.siteurl">{{currentBackgroundImage.site}}</a>
</div>
<div class="rightBox"></div>
</div>
</section>
<!-- Settings -->
<div id="vue_settings">
<a href="javascript:void(0)" class="closebtn" onclick="toogleSettings()">×</a>
<div class="columns">
<div class="column is-one-third">
<aside class="menu">
<span v-for="Cat in Category">
<p class="menu-label" style="margin: 6px 0 0 0">
{{ Cat.name }}
</p>
<ul class="menu-list">
<li v-for="Pagename in Cat.Pages">
<a id="module-button" class="is-active" v-if="Pagename == activePage">{{ Pagename }}</a>
<a id="module-button" v-else v-on:click="changeActivePage(Pagename)">{{ Pagename }}</a>
</li>
</ul>
</span>
</aside>
</div>
<div class="column">
<h4 class="title">{{activePage}}</h4>
<!-- Apparence > Background -->
<div v-if="activePage === 'Background'">
<button class="button is-danger is-small is-rounded" onclick="WebMenu.refreshBackground()">
Fond d'écran aléatoire
</button>
<div class="columns is-multiline mt-4 is-variable is-3">
<div class="column is-one-quarter card m-1" style="padding:2px; " v-for="(bg, index) in backgroundList">
<div class="card-image" v-on:click="setBackground(index)">
<figure class="image is-16by9">
<img v-bind:src="bg.url" v-bind:alt="bg.user + ' image'">
</figure>
</div>
</div>
</div>
</div>
<!-- Modules > Favoris -->
<div v-else-if="activePage === 'Favoris'">
<label class="label">
<input v-on:change="setLinksDisplay(false)" v-if="getLinksDisplay() == true" type="checkbox" class="onoff"
checked />
<input v-on:change="setLinksDisplay(true)" v-else type="checkbox" class="onoff" disabled />
Afficher
</label>
<div class="notification is-warning">
Ce module est actuellement en développement. Il sera disponible
dans les prochaines versions.
</div>
</div>
<!-- Modules > Citation -->
<div v-else-if="activePage === 'Citation'">
<div class="select">
<select id="selectQuote" v-on:change="setQuoteSource($event.srcElement.value)"
v-bind:value="getQuoteSourceName()">
<option v-for="source in this.getQuoteSourceList()" v-bind:value="source[1].name">
{{source[1].name}}
</option>
</select>
</div>
</div>
<!-- Modules > Weather -->
<div v-else-if="activePage=== 'Météo'">
<label class="label">Votre ville</label>
<div class="field-body">
<div class="field">
<div class="control">
<input class="input" v-on:change="" v-bind:value="getCity()" type="text" placeholder="City"
id="CityField" />
</div>
</div>
<div class="field">
<button class="button" v-on:click="setGPSbyCity()">
<i class="fas fa-search"></i>
</button>
</div>
</div>
<p class="is-small is-center">ou</p>
<button class="button is-primary is-small is-rounded" v-on:click="setGPSbyNavigator()">
Me géolocaliser
</button>
<label style="margin-top: 2em;" class="label">Coordonnées GPS</label>
<div class="field-body">
<div class="field">
<div class="control">
<input class="input" v-on:change="setLatitude($event.srcElement.value)" v-bind:value="getLatitude()"
type="text" placeholder="Latitude" id="latitudeField" />
</div>
</div>
<div class="field">
<div class="control">
<input class="input" v-on:change="setLongitude($event.srcElement.value)" v-bind:value="getLongitude()"
type="text" placeholder="Longitude" id="longitudeField" />
</div>
</div>
</div>
</div>
<!-- Credits > Développement -->
<div v-else-if="activePage === 'Développement'">
<p>
Cette application est développé par
<a href="http://reiter.tf">Arthur REITER</a>. La documentation
est disponible sur
<a href="https://github.com/arthur-reiter/webmenu">github</a>.
</p>
<br />
Merci à <a href="https://github.com/lacaulac">lacaulac</a> pour
son aide durant le développement.
</div>
<!-- Credits > API -->
<div v-else-if="activePage === 'API'">
Liste des API utilisées :
<ul>
<li>
Météo :
<a target="_blank" href="https://www.infoclimat.fr/">infoclimat</a>
</li>
<li>
GPS => Ville :
<a target="_blank" href="https://www.bigdatacloud.com/">BigDataCloud Geocoding</a>
</li>
<li>
Ville => GPS:
<a target="_blank" href="https://geocode.xyz/">Geocode.xyz</a>
</li>
<li>
Fond d'écran :
<a target="_blank" href="https://unsplash.com/">Unsplash</a>
&
<a target="_blank" href="https://www.pexels.com/">Pexel</a>
</li>
<li>
Citations de Kaamelott :
<a target="_blank" href="http://Kaamelott.reiter.tf">Kaamelott API</a>
</li>
</ul>
</div>
<!-- General > Données Locales -->
<div v-else-if="activePage === 'Données locales'">
<p>
Toutes les données sont stockées localement sur votre
navigateur. Seules les requêtes au différentes APIs transitent
via internet
</p>
<br />
<p>
Vous pouvez à tout moment supprimer toutes les données stockées
localement.
</p>
<br />
<button class="button is-danger is-small is-rounded" onclick="WebMenu.eraseData()">
Supprimer les données
</button>
</div>
<!-- General > Recherches -->
<div v-else-if="activePage === 'Recherches'">
<div id="selectSearch" class="select">
<select v-on:change="setSearchEngine($event.srcElement.value)" v-bind:value="getSearchEngineName()">
<option v-for="engine in this.getSearchEngineList()" v-bind:value="engine[1].name">
{{engine[1].name}}
</option>
</select>
</div>
</div>
<!-- General > DashBoard -->
<div v-else-if="activePage=== 'Dashboard'">
<div class="field">
<label class="label">Nom</label>
<div class="control">
<input class="input" v-on:change="setUsername($event.srcElement.value)" v-bind:value="getUsername()"
type="text" placeholder="Votre nom" />
</div>
<p class="help">
Votre nom sera affiché sur la page principale
</p>
</div>
<div class="field">
<label class="label">Modules</label>
<div class="control">
<label class="switch">
<input type="checkbox" v-on:change="setToogleComponent('search', $event.srcElement.checked)" v-bind:checked="getToogleComponent('search')">
<span class="slider round"></span>
</label>
Recherche
</div>
<div class="control">
<label class="switch">
<input type="checkbox" v-on:change="setToogleComponent('times', $event.srcElement.checked)" v-bind:checked="getToogleComponent('times')">
<span class="slider round"></span>
</label>
Horloge
</div>
<div class="control">
<label class="switch">
<input type="checkbox" v-on:change="setToogleComponent('welcomeMessage', $event.srcElement.checked)" v-bind:checked="getToogleComponent('welcomeMessage')">
<span class="slider round"></span>
</label>
Message d'accueil
</div>
<div class="control">
<label class="switch">
<input type="checkbox" v-on:change="setToogleComponent('weather', $event.srcElement.checked)" v-bind:checked="getToogleComponent('weather')">
<span class="slider round"></span>
</label>
Météo
</div>
<div class="control">
<label class="switch">
<input type="checkbox" v-on:change="setToogleComponent('quotes', $event.srcElement.checked)" v-bind:checked="getToogleComponent('quotes')">
<span class="slider round"></span>
</label>
Citation
</div>
<div class="control">
<label class="switch" v-on:change="setToogleComponent('favorites', $event.srcElement.checked)" v-bind:checked="getToogleComponent('favorites')">
<input type="checkbox" disabled>
<span class="slider round"></span>
</label>
Favoris
</div>
</div>
</div>
<div v-else></div>
</div>
</div>
</div>
</div>
<!-- Import Utils -->
<script src="src/utils/types.js"></script>
<script src="src/utils/EventManager.js"></script>
<script src="src/utils/WebMenu.js"></script>
<script src="src/utils/functions.js"></script>
<!-- Import/Create Settings -->
<script>
if (localStorage["Settings"] !== undefined) {
WebMenu.loadSettings();
} else {
WebMenu.saveSettings();
}
</script>
<!-- Import Vues -->
<script src="src/components/background.js"></script>
<script src="src/components/links.js"></script>
<script src="src/components/weather.js"></script>
<script src="src/components/quotes.js"></script>
<script src="src/components/time.js"></script>
<script src="src/components/vue_showWelcomeMessage.js"></script>
<script src="src/components/search.js"></script>
<script src="src/components/vue_settings.js"></script>
</body>
</html>