-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgedtree.html
More file actions
222 lines (199 loc) · 10.7 KB
/
gedtree.html
File metadata and controls
222 lines (199 loc) · 10.7 KB
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
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="description" content="100% free graphics Composer. Create now a wonderful timeline !"/>
<meta name="keywords" content="ReadGedcom tree family famille arbre généalogique"/>
<title>Common Graphs Composer | GedTree</title>
<link rel="icon" href="img/icon.png"/>
<!-- <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css"-->
<!-- integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay" crossorigin="anonymous">-->
<!-- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"-->
<!-- integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">-->
<!-- <link rel="preconnect" href="https://fonts.gstatic.com">-->
<!-- <link rel="stylesheet"-->
<!-- href="https://fonts.googleapis.com/css2?family=Lato:wght@100;300;400;700;900&family=Source+Sans+Pro:wght@400;600;700&display=swap"-->
<!-- crossorigin="anonymous">-->
<link rel="stylesheet" type="text/css" href="css/main.css"/>
<link rel="stylesheet" type="text/css" href="css/gedtree.css"/>
<link rel="stylesheet" type="text/css" href="css/gedtree-tree.css"/>
<script src="js/api/vue.js"></script>
<script src="js/api/lodash.js"></script>
<script src="js/api/jquery.js"></script>
<script src="js/api/read-gedcom.js"></script>
<script src="js/api/jscolor.js"></script>
<script src="js/api/dom-to-image.js"></script>
<script>
jscolor.presets.default = {
format: 'rgba', alphaChannel: true, borderRadius: 5, padding: 5,
buttonColor: 'rgba(255,101,213,1)', controlBorderWidth: 0
};
</script>
</head>
<body id="body">
<!-- FLOATERS -->
<div class="floater disapear" id="disapear-floater">
<i class="fas fa-check check"></i>
</div>
<div class="floater" id="floater">
<i class="fas fa-spinner loader"></i>
</div>
<input id="file-input" type="file" name="name" accept="application/json" multiple="true" style="display: none;"/>
<div id="app">
<header>
<div><img src="img/icon.png"></img>
<h2>Common Graphs Composer</h2></div>
<!-- HEADER PROJECT ACTIONS -->
<div class="project-actions">
</div>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="timeline.html">Timeline</a></li>
<li><a href="gedtree.html">GedTree</a></li>
</ul>
</nav>
</header>
<main>
<div class="render" @click="ui.selected = undefined">
<div class="margins">
<tree v-if="gedcom && rootIndividual" :gedcom="gedcom" :settings="settings" :selected="ui.selected"
@update-selected="updateSelected"
:data="gedcomStructuredData"></tree>
<center v-else>
<br>
<h1>Development in progress !</h1>
<h2>Soon available, be patient...</h2>
<br>
</center>
<p v-html="gedcomStructuredDataHtml"
style="font-size: 13px; font-weight: 400; font-family: monospace"></p>
</div>
</div>
<div class="panel">
<div class="nav">
<p v-bind:class="ui.currentTab === 'tree' ? 'selected' : ''" v-on:click="ui.currentTab = 'tree'">
Tree
</p>
<p v-bind:class="ui.currentTab === 'settings' ? 'selected' : ''"
v-on:click="ui.currentTab = 'settings'">
Settings
</p>
<p v-bind:class="ui.currentTab === 'individual' ? 'selected' : ''"
v-on:click="ui.currentTab = 'individual'">
Individual
</p>
</div>
<div class="pane settings-pane wide" v-show="ui.currentTab === 'tree'">
<div class="content">
<h3>Source files</h3>
<table>
<tr style="width: 100%;">
<td style="width: 100%; padding-bottom: 5px;">
Gedcom file<br><input type="file" accept=".ged,.gdz">
</td>
</tr>
<tr style="width: 100%;">
<td style="width: 100%; padding-bottom: 5px;">
Images folder<br><input type="file" accept="*" webkitdirectory directory multiple>
</td>
</tr>
<tr>
<td>Root individual<br>
<div style="display: flex; gap: 10px">
<input type="text"
:placeholder="format_individual_name(rootIndividual) ?? 'Search...'"
style="flex-grow: 1;"
v-model="ui.search_query">
<input type="text" placeholder="@I342438494116@" style="width: 100px;"
v-model="settings.hidden.rootIndividualId">
</div>
<ul class="search-results" v-if="gedcom_search.length">
<li v-for="a in gedcom_search" :key="a.pointer"
@click="select_root_individual(a.pointer)">
{{a.lastname + ' ' + a.firstname + " (" + (a.birth ?? '?') + " - " + (a.death ?? '?') + ")"}}
</li>
</ul>
</td>
</tr>
</table>
<h3 style="padding-top: 10px;">Configuration saving</h3>
<table>
<tr style="width: 100%;">
<td style="width: 100%; padding-bottom: 5px;">
Settings are automatically saved, but can <br>
be stored in a configuration to switch easily <br>
between settings for different trees.<br>
</td>
</tr>
<tr style="width: 100%;">
<td style="width: 100%; padding-bottom: 5px;">
<label for="save-config-input">Name: </label>
<input type="text" id="save-config-input" style="width: 200px"
:value="settings.hidden.currentConfig">
<button v-on:click="saveConfig">Save</button>
</td>
</tr>
<tr style="width: 100%;">
<td style="width: 100%; padding-bottom: 5px;">
<label for="config-selector">Load: </label>
{{this.settings.hidden.currentConfig}}
<select id="config-selector" style="width: 150px">
<option value="" selected>-- select a config --</option>
<option v-for="(config, name) in savedConfigs" :value="name" :key="name">{{name}}
</option>
</select>
<button v-on:click="loadConfig">Load</button>
<button v-on:click="deleteConfig">Delete</button>
</td>
</tr>
<tr>
<td>
<input type="checkbox" id="sync-settings-input"
v-model:value="settings.hidden.syncSettings" v-on:change="saveSettings()"
style="width: 22px; margin-right: 10px;">
<label for="sync-settings-input">
Save old configuration<br>
before loading another.
</label>
</td>
</tr>
</table>
</div>
<app-settings-group :settings="settings" section-name="size" :section="settingsDetails.size"
v-on:manage="manageSettings"></app-settings-group>
<app-settings-group :settings="settings" section-name="columns" :section="settingsDetails.columns"
v-on:manage="manageSettings"></app-settings-group>
</div>
<div class="pane settings-pane" v-show="ui.currentTab === 'settings'">
<app-settings-group :settings="settings" section-name="decoration" :section="settingsDetails.decoration"
v-on:manage="manageSettings"></app-settings-group>
<app-settings-group :settings="settings" section-name="individual" :section="settingsDetails.individual"
v-on:manage="manageSettings"></app-settings-group>
<app-settings-group :settings="settings" section-name="margins" :section="settingsDetails.margins"
v-on:manage="manageSettings"></app-settings-group>
</div>
<per-individual-settings v-show="ui.currentTab === 'individual'"
:selected="ui.selected"
:ind-settings="perIndividualSettings"
:gedcom="gedcom"
:settings="settings"
v-on:update-ind-settings="updateIndSettings"></per-individual-settings>
</div>
</main>
<footer><h5>Copyright © Common Graphs Composer 2020 – 2024</h5><h5>Developed by <a
href="https://github.com/ClementGre"
target="_blank">Clément Grennerat</a>
</h5></footer>
</div>
</body>
<script src="js/gedtree/constants.js"></script>
<script src="js/gedtree/utils.js"></script>
<script src="js/gedtree/settings.js"></script>
<script src="js/gedtree/perIndividualSettings.js"></script>
<script src="js/gedtree/gedcomStructurer.js"></script>
<script src="js/gedtree/individual.js"></script>
<script src="js/gedtree/column.js"></script>
<script src="js/gedtree/tree.js"></script>
<script src="js/gedtree/gedtree.js"></script>
</html>