-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
299 lines (273 loc) · 14.6 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Etygraph | Etymology Graph</title>
<!-- Bootstrap CSS-->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
<link href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.5.0/css/flag-icon.min.css" rel="stylesheet">
<!-- Font Awesome JS -->
<script defer src="https://use.fontawesome.com/releases/v5.0.13/js/all.js"></script>
<script defer src="https://use.fontawesome.com/releases/v5.0.13/js/fontawesome.js"
integrity="sha384-6OIrr52G08NpOFSZdxxz1xdNSndlD4vdcf/q2myIUVO0VsqaGHJsB0RaBE01VTOY"
crossorigin="anonymous"></script>
<!-- D3 + Dagre -->
<script src="https://d3js.org/d3.v4.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/4.13.0/d3.min.js" integrity="sha512-RJJ1NNC88QhN7dwpCY8rm/6OxI+YdQP48DrLGe/eSAd+n+s1PXwQkkpzzAgoJe4cZFW2GALQoxox61gSY2yQfg==" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dagre-d3/0.6.4/dagre-d3.min.js" type="text/javascript"></script>
<!-- Vue.js -->
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue-i18n/8.22.1/vue-i18n.min.js"></script>
<!-- Axios.js -->
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<!-- CSS assets -->
<link rel="stylesheet" href="assets/css/main.css">
<link rel="stylesheet" href="assets/css/dag.css">
<!-- Vue MultiSelect CSS -->
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/vue-multiselect.min.css">
</head>
<body>
<div id="app" v-cloak>
<div class="d-flex" :class="menu_toggled ? 'toggled' : null" id="wrapper">
<!-- Sidebar -->
<div class="bg-light border-right" id="sidebar-wrapper">
<div class="sidebar-heading">
<div id="sidebar-heading-icon">
<img src="assets/img/logo.svg"></img>
</div>
<span id="sidebar-heading-title">Etygraph </span>
<span class="flag-icon" :class="['flag-icon-' + locale_data[locale].flag]"></span>
<span id="sidebar-heading-subtitle"> <a href="https://github.com/franloza/etygraph/blob/master/CHANGELOG.md">{{ app_version }}</a></span>
</div>
<div id="language-config" class="config-menu-item">
<span class="dropdown-toggle" id="language-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ $t("message['" + locale_data[locale].name + "']") }}</a>
<div class="dropdown-menu">
<div v-for="(value, key) in locale_data">
<a class="dropdown-item" @click="changeLocale(key)">
<span v-bind:class="'flag-icon-' + value.flag" class="flag-icon">
</span>{{ $t("message['" + value.name + "']") }}
</a>
</div>
</div>
</div>
<div class="config-menu-item">
<div id="merge-equivalent-config" class="custom-control custom-switch custom-control-right">
<input id="merge-equivalent-checkbox" class="custom-control-input" type="checkbox" v-model="settings.merge_equivalent_nodes">
<label for="merge-equivalent-checkbox" class="custom-control-label">{{ $t("message.merge_equivalent_nodes") }}</label>
</div>
</div>
<div class="config-menu-item">
<div id="show-clusters-config" class="custom-control custom-switch custom-control-right">
<input id="show-clusters-checkbox" class="custom-control-input" type="checkbox" v-model="settings.show_clusters">
<label for="show-clusters-checkbox" class="custom-control-label">{{ $t("message.group_by_language") }}</a></label>
</div>
</div>
<div class="config-menu-item">
<div id="extended-search-config" class="custom-control custom-switch custom-control-right">
<input id="extended-search-checkbox" class="custom-control-input" type="checkbox" v-model="settings.extended_search">
<label for="extended-search-checkbox" class="custom-control-label">{{ $t("message.extended_search") }}</a></label>
</div>
</div>
<div class="config-menu-item">
<div id="filter-languages-config" class="custom-control custom-switch custom-control-right">
<input id="filter-languages-checkbox" class="custom-control-input" type="checkbox" v-model="settings.filter_languages">
<label for="filter-languages-checkbox" class="custom-control-label">{{ $t("message.filter_by_language") }}</a></label>
</div>
<multiselect v-if="settings.filter_languages" v-model="graph_languages.selected" :show-labels="false" :allow-empty="true" :disabled="graph_languages.options.length === 0" :options="graph_languages.options" :multiple="true" :close-on-select="false" :show-no-results="false" :clear-on-select="true" :preserve-search="false" :placeholder="$t('message.select_language')" label="name" track-by="name" :preselect-first="false">
<template slot="selection" slot-scope="{ values, search, isOpen }"><span class="multiselect__single" v-if="values.length && !isOpen">{{ values.length }} options selected</span></template>
</multiselect>
</div>
<div class="sidebar-footer">
<div class="sidebar-footer-item">
<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">
<img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/3.0/88x31.png" />
</a>
</div>
<div class="sidebar-footer-item">
<a href="https://github.com/franloza/etygraph"> <i class="fa fa-lg fab fa-github"></i></a>
</div>
</div>
</div>
<!-- /#sidebar-wrapper -->
<!-- Page Content -->
<div id="page-content-wrapper">
<nav class="navbar navbar-light bg-light border-bottom">
<button class="nav-button" type="button" id="menu-toggle" v-on:click="toggleMenu">
<div class="icon"><span class="nav-button-fa fas fa-cog"></span></div>
</button>
<button class="nav-button" type="button" id="clear-dag" v-on:click="clear">
<div class="icon"><span class="nav-button-fa fas fa-eraser"></span></div>
</button>
<button class="nav-button" type="button" id="zoom-to-root" v-on:click="zoomToRootNode">
<div class="icon"><span class="nav-button-fa fa fa-compress"></span></div>
</button>
<button class="nav-button" type="button" id="zoom-fit-content" v-on:click="zoomFitContent">
<div class="icon"><span class="nav-button-fa fas fa-expand-arrows-alt"></span></div>
</button>
<button class="nav-button" type="button" id="help" data-toggle="modal" data-target="#help-modal">
<div class="icon"><span class="nav-button-fa fas fa-question-circle"></span></div>
</button>
<button class="nav-button" type="button" id="random-word" v-on:click="searchRandomWord">
<div class="icon"><span class="nav-button-fa fas fa-random"></span></div>
</button>
<nav class="navbar mr-auto bg-light" id="search-bar-nav">
<input id="query-input" v-model="query" class="form-control advancedAutoComplete" type="text" autocomplete="on" :placeholder="[[ $t('message.search') ]]" aria-label="Search" v-on:keyup.enter="searchWord">
<button class="nav-button" type="button" id="search-submit" v-on:click="searchWord">
<span class="nav-button-fa fas fa-search"></span>
</button>
</nav>
</nav>
<!-- Node Modal -->
<div class="modal fade" id="node-modal" tabindex="-1" role="dialog" aria-labelledby="nodeModal" aria-hidden="true">
<div class="modal-dialog modal-xl" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="node-modal-title"><a :href="modal_node_info.wiktionary_link" target="_blank">{{ modal_node_info.title }}</a></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-header">
<button type="button" class="btn btn-danger" data-dismiss="modal" v-on:click="removeNode">{{ $t('message.remove_node') }}</button>
<button type="button" class="btn btn-primary" data-dismiss="modal" :disabled="modal_node_info.node_id.includes('-pro')" v-on:click="addDescendants">{{ $t('message.add_descendants') }}</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ $t('message.close') }}</button>
</div>
<div v-html="modal_node_info.body" class="modal-body"></div>
<div v-if="modal_node_info.found" class="modal-footer">
This information has been extracted from <a :href="modal_node_info.wiktionary_link" target="_blank">English-language Wiktionary</a> and is under license <a href="https://en.wiktionary.org/wiki/Wiktionary:CC-BY-SA" target="_blank">CC-BY-SA</a>.
</div>
</div>
</div>
</div>
<!-- Help Modal -->
<div class="modal fade" id="help-modal" tabindex="-2" role="dialog" aria-labelledby="helpModal" aria-hidden="true">
<div class="modal-dialog modal-xl" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="node-modal-title">{{ $t('message.help') }}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<h4>{{ $t('message.help_modal.getting_started.title') }}</h4>
<p>
{{ $t('message.help_modal.getting_started.p1') }}
</p>
<p>
{{ $t('message.help_modal.getting_started.p2') }}
<ol>
<li>
{{ $t('message.help_modal.getting_started.p3') }}
<button class="nav-button" type="button" id="menu-toggle-modal" v-on:click="toggleMenu">
<div class="icon"><span class="nav-button-fa fas fa-cog"></span></div>
</button>
</li>
<li>
{{ $t('message.help_modal.getting_started.p4') }}
</li>
<li>
{{ $t('message.help_modal.getting_started.p5') }}
<nav class="navbar navbar-light bg-light w-50" id="search-bar-nav">
<input id="query-input-modal" v-model="query" class="form-control advancedAutoComplete mr-sm-2" type="text" autocomplete="on" :placeholder="[[ $t('message.search') ]]" aria-label="Search" v-on:keyup.enter="searchWord">
<button class="nav-button" type="button" id="search-submit" v-on:click="searchWord">
<span class="nav-button-fa fas fa-search"></span>
</button>
</nav>
</li>
<li>
{{ $t('message.help_modal.getting_started.p6') }}
</li>
<li>
{{ $t('message.help_modal.getting_started.p7') }}
<button class="nav-button" type="button" id="clear-dag-modal" v-on:click="clear">
<div class="icon"><span class="nav-button-fa fas fa-eraser"></span></div>
</button>
</li>
<li>
{{ $t('message.help_modal.getting_started.p8') }}<button class="nav-button" type="button" id="zoom-to-root-modal" v-on:click="zoomToRootNode">
<div class="icon"><span class="nav-button-fa fa fa-compress"></span></div>
</button> {{ $t('message.help_modal.getting_started.p9') }}
<button class="nav-button" type="button" id="zoom-fit-content-modal" v-on:click="zoomFitContent">
<div class="icon"><span class="nav-button-fa fas fa-expand-arrows-alt"></span></div>
</button>
</li>
<li>
{{ $t('message.help_modal.getting_started.p10') }}
<button class="nav-button" type="button" id="random-word-modal" v-on:click="searchRandomWord">
<div class="icon"><span class="nav-button-fa fas fa-random"></span></div>
</button>
</li>
</ol>
</p>
<p>
<h4>FAQ</h4>
<p>
<h5>
<a data-toggle="collapse" href="#faq-answer-1" aria-expanded="false" aria-controls="faqAnswer1">
{{ $t('message.help_modal.faq.q1') }}
</a>
</h5>
</p>
<div class="collapse" id="faq-answer-1">
<div class="card card-body">
{{ $t('message.help_modal.faq.a1') }} </div>
</div>
<p>
<h5>
<a data-toggle="collapse" href="#faq-answer-2" aria-expanded="false" aria-controls="faqAnswer1">
{{ $t('message.help_modal.faq.q2') }} </a>
</h5>
</p>
<div class="collapse" id="faq-answer-2">
<div class="card card-body">
{{ $t('message.help_modal.faq.a2') }} <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/3.0/80x15.png" /></a>
</div>
</div>
<p>
<h5>
<a data-toggle="collapse" href="#faq-answer-3" aria-expanded="false" aria-controls="faqAnswer1">
{{ $t('message.help_modal.faq.q3') }}
</a>
</h5>
</p>
<div class="collapse" id="faq-answer-3">
<div class="card card-body">
{{ $t('message.help_modal.faq.a3') }} <a href="https://github.com/franloza/etygraph"> <i class="fa fa-lg fab fa-github"></i></a>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ $t('message.close') }}</button>
</div>
</div>
</div>
</div>
<div v-if="loading" id="loading-spinner">
<div id="loading-spinner-outer" class="d-flex justify-content-md-center">
<div id="loading-spinner-inner" class="spinner-border text-secondary" role="status">
<span class="sr-only">{{ $t('message.loading') }}...</span>
</div>
</div>
</div>
<svg v-else id="dag-panel" class="dag"></svg>
</div>
<!-- /#page-content-wrapper -->
</div>
</div>
<!-- jQuery -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"
integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
crossorigin="anonymous"></script>
<!-- Bootstrap JS-->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/gh/xcash/[email protected]/dist/latest/bootstrap-autocomplete.min.js"></script>
<!-- Vue MultiSelect JS -->
<script src="https://unpkg.com/[email protected]"></script>
<!-- JS assets -->
<script type="module" src="assets/js/main.js"></script>
</body>
</html>