-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.xhtml
551 lines (494 loc) · 20.1 KB
/
index.xhtml
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
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xi="http://www.w3.org/2001/XInclude">
<head>
<title>Ma_Sys.ma IAL 1.6.0</title>
<link rel="icon" type="image/png" sizes="64x64" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAAHdbkFIAAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oKDQ0AOZB2Ts4AAAWySURBVHja7ZpfaBxFHMc/e8bShJSmmlr64AkSECoVUxCjRq0PYvChV3ywWDAB2xRjrSkm1SK1WBV8aDVNKxdowZD6ooUmpgYjkpKERJuattEHlaAFU6l/qFBr84dgkvFhd+9m53bvdu/2Ltt2vzDMzv+Z3/x+v/nNb1YDBGlQBDDItG3h45QAIAaZFgJEsfQt9J5FRG4x7TCMQGqxSkkXYaTQkjFmDCSG0OT+pLSWaZmaP3RoMGY9yHSCDsirSE6qhM+AYXUIZQGWChF1xnW1aVYhTBpoHpaZsUImJOao0qqR9xlkOhHSQZg8ZdLTDP1MikGmRYSIJR9rSCYapAoTIOYV1hqy6SCiUtBEVOjrE8A6m3LbjbRdHHDezS4Ij3th7nXO2+gfH2SLIidGygRTGBN88Cqtlv01hdMMahl2ikuudYkLltEsrOeGBptZm/i+7JWI7dJIm1lLuaz3nIQJRVjMeLuSl1aY5AoLIH420kVuOojHJVEW1gYdHYjq6tTylF2QMT+vx7uA2loXjJRCXUOW93thZS0Dte3KF1+cc5bG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jF/2PKBmbgJEgWYK54CXgbqyPGYeBCeBJJR/gTeB4UE4BU8Dicfedmk8JQsDly1BcDE8Dvyj1TpJ8/TPRjv77WWWlVcCd/oWyg/kU4cY/mncRKC+Hs2dBaFCJ/reZEwaAF4DVq2FkJCAc4AfWrIGuLv197wGwfUS9aIjDkiVw7pwe31AOkVgMWlp0MbgFuE0KZcBd6I+gw8M6BwTuOuwHdu6ELVtgzuGGu3Spri8C6Q/wC8uWBcshEnqEvDZoszFsColHfe4v48OIuM6fTTQtFIHcOOBGR/gyFBIgJMDNjf8BUJPdzhVqySkAAAAASUVORK5CYII="/>
<!-- ***************************************************************************
********************************************************************************
********************************************************************************
****** ******
****** ******
****** S T Y L E S H E E T ******
****** ******
****** ******
********************************************************************************
********************************************************************************
**************************************************************************** -->
<style type="text/css">
/* <![CDATA[ */
* { font-family: "PT Mono", "Terminus", monospace;
margin: 0; padding: 0; }
html { background-color: #000000; color: #e5e5e5; }
body { background-color: #0000cd; }
h1, #logo { display: table-column; float: left; }
h1, h2 { color: #ffffff; }
hr { visibility: hidden; clear: both; }
h2 { float: left; font-size: 100%;
padding-bottom: 0.5em; padding-left: 2ex;
color: #00ffff; }
input { clear: both; width: 100%;
border: 1px solid #e5e5e5; font-weight: bold;
color: #ffff00; background-color: #000000;
margin-bottom: 0.5em; }
input:focus { border-color: #ffff00; }
a:link, a:visited, .search_config a.regular:link,
.search_config a.regular:visited,
.search_config a.regular:active
{ color: #e5e5e5; }
a:hover { color: #ffffff; }
.box { margin-top: 1em; margin-left: 2ex;
padding-top: 0.5em; padding-bottom: 0.5em;
border: 4px double #808080; width: 77ex;
min-height: 25.3em; float: left; }
.box ul, .box form
{ padding-left: 2ex; padding-right: 2ex; }
.box ul { float: left; list-style: none; }
.box hr { visibility: visible;
border-top: 1px solid #808080;
margin-bottom: 0.5em; }
.search_config
{ margin-left: 2ex; float: left;
margin-bottom: 0.5em; }
.search_config a:link, .search_config a:visited,
.search_config a:active
{ text-decoration: none; color: #000000; }
.checkbox_enable, .checkbox_disable
{ padding-left: 0.5ex; padding-right: 0.5ex;
font-weight: bold; }
.checkbox_enable
{ background-color: #00cdcd; }
.checkbox_disable
{ background-color: #e5e5e5; }
a.checkbox_disable:link, a.checkbox_disable:visited,
a.checkbox_disable:active
{ color: #4d4d4d; }
a.selected:link, a.selected:visited, a.selected:active
{ color: #ffff00; }
a.selected:after
{ content: "<"; }
#logo { padding-left: 4ex; }
#header { padding-left: 4ex; margin-bottom: 1em; }
#header h1 { padding-right: 0; padding-left: 0; }
#header > * { padding-top: 0.5em; padding-bottom: 0.5em;
padding-right: 4ex; }
#first { padding-left: 0; padding-right: 0; float: left;
width: 25ex; }
#first input
{ margin-top: 0.7em; margin-bottom: 0.7em; }
#mode { font-weight: bold; }
#all_boxes { background-color: #000000; }
#primary_links img
{ height: 32px; background-color: white; }
/* TODO DOES NOT WORK? */
#first input:before
{ content: "i: "; }
/* ]]> */
</style>
<!-- ***************************************************************************
********************************************************************************
********************************************************************************
****** ******
****** ******
****** S C R I P T F U N C T I O N S ******
****** ******
****** ******
********************************************************************************
********************************************************************************
**************************************************************************** -->
<script type="text/javascript">
/* <![CDATA[ */
var ial_db = {
doc: [ ],
abx: [ ]
};
function ial_add_data(list) {
for (var i in list)
if (ial_db[list[i].box] != undefined &&
ial_db[list[i].box] instanceof Array)
ial_db[list[i].box].push(list[i]);
// allow invalid elements to put "end mark objects" in lists
}
function ial_keypress_all(event) {
if (event == null)
return;
var mode = document.getElementById("mode").innerHTML;
if (mode == "INSERT" && event.keyCode == 27 /* Escape */) {
ial_normal_mode();
} else if (mode == "NORMAL") {
switch(event.keyCode) {
case 13: // ENTER
var sl = document.querySelectorAll("a.selected")[0];
if (sl != undefined)
window.open(sl.getAttribute("href"));
break;
case 65: // 'a' -- docs
document.getElementById("in_search_doc").focus();
break;
case 72: // 'h' -- prev box
ial_select_different_box(e => e.previousElementSibling);
break;
case 73: // 'i' -- google
document.getElementById("google").focus();
break;
case 74: // 'j' -- next link
ial_select_different_element(e => e.nextElementSibling);
break;
case 75: // 'k' -- prev link
ial_select_different_element(
e => e.previousElementSibling);
break;
case 76: // 'l' -- next box
ial_select_different_box(e => e.nextElementSibling);
break;
case 79: // 'o' -- archivebox
document.getElementById("in_search_abx").focus();
break;
default:
return;
}
event.preventDefault(); // else-else
}
}
function ial_select_different_element(func) {
var sl = document.querySelectorAll("a.selected")[0];
if (sl != undefined) {
var par = sl.parentElement;
if (par != undefined) {
var nel = func(par);
if (nel != undefined) {
nel = nel.getElementsByTagName("a")[0];
if (nel != undefined) {
sl.removeAttribute("class");
nel.setAttribute("class", "selected");
}
}
}
}
}
function ial_select_different_box(func) {
var sl = document.querySelectorAll("a.selected")[0];
if (sl != undefined) {
var par = sl;
// div.box(ppp) > ul(pp) > li(p) > a
for (var i = 0; i < 3 && par != undefined; i++)
par = par.parentElement;
if (par != undefined) {
var nel = par;
var chd;
// loop to permit passing over boxes w/o links
do {
nel = func(nel);
if (nel != undefined)
chd = nel.querySelectorAll("ul > li > a"
)[0];
} while (nel != undefined && chd == undefined);
if (chd != undefined) {
sl.removeAttribute("class");
chd.setAttribute("class", "selected");
}
}
}
}
function ial_ready() {
for (var box in ial_db) {
var unique_ids = {};
for (var j in ial_db[box])
unique_ids[ial_db[box][j].id] = true;
// enable and disable buttons
var edb = document.getElementById("enable_" + box);
edb.innerHTML = "";
for (var id in unique_ids)
edb.innerHTML +=
"<a href=\"javascript:ial_toggle('" +
box + "', '" + id + "');\" class=\"" +
"checkbox_enable\" id=\"toggle_" + box + "_" +
id + "\">" + id + "</a>\n";
ial_update_search(box);
}
document.getElementById("mode").innerHTML = "NORMAL";
document.addEventListener("keydown", ial_keypress_all, true);
}
function ial_toggle(box, id) {
var toggle = document.getElementById("toggle_" + box + "_" + id);
if (toggle.getAttribute("class") == "checkbox_enable")
toggle.setAttribute("class", "checkbox_disable");
else
toggle.setAttribute("class", "checkbox_enable");
ial_update_search(box);
return void(0);
}
function ial_update_search(box) {
var query = document.getElementById("in_search_" + box).value;
var limit = 15;
var ids_enabled = {};
var edb = document.getElementById("enable_" + box).firstElementChild;
while (edb != undefined) {
if (edb.getAttribute("class") == "checkbox_enable")
ids_enabled[edb.textContent] = true;
edb = edb.nextElementSibling;
}
var match_list = [ [], [] ];
// TODO Z IF PERFORMANCE IS NEEDED GROUP THE DB BY "id"
for (var i in ial_db[box]) {
if (ids_enabled[ial_db[box][i].id] == true) {
var match = false;
for (var p in ial_db[box][i].primary) {
if (ial_db[box][i].primary[p].
startsWith(query)) {
match_list[0].push(ial_db[box][i]);
match = true;
break;
}
}
if (!match) {
for (var s in ial_db[box][i].secondary) {
if (ial_db[box][i].secondary[s].
indexOf(query) != -1) {
match_list[1].push(
ial_db[box][i]);
break;
}
}
}
}
}
var rslt = "";
var have_results = 0;
for (var i in match_list) {
for (var j in match_list[i]) {
rslt += "<li><a href=\"" + htmlspecialchars(
match_list[i][j].link) + "\"";
if (have_results == 0)
rslt += " class=\"selected\"";
rslt += ">" + htmlspecialchars(match_list[i][j].title) +
"</a></li>";
have_results++;
if (have_results > limit)
break;
}
if (have_results > limit)
break;
}
document.getElementById("results_" + box).innerHTML = rslt;
}
// https://stackoverflow.com/questions/1787322
function htmlspecialchars(text) {
var map = { "&": "&", "<": "<", ">": ">", "\"": """,
"'": ''' };
return text.replace(/[&<>"']/g, m => map[m]);
}
function ial_keyboard_input(box, event) {
if (event == null) {
ial_update_search(box);
} else {
switch(event.keyCode) {
case 27: // ESCAPE
ial_normal_mode();
break;
case 38: // UP
ial_select_different_element(
e => e.previousElementSibling);
break;
case 40: // DOWN
ial_select_different_element(e => e.nextElementSibling);
break;
default:
ial_update_search(box);
}
}
}
function ial_enter(box) {
if (box == "google") {
var query = document.getElementById("google").value;
var pos;
var append = "";
if ((pos = query.indexOf(':')) != -1) {
var prefix = query.substring(0, pos);
var replace = false;
if (prefix == "img") {
append = "&site=imghp&tbm=isch";
query = query.substring(pos + 1);
}
}
window.open("https://www.google.com/search?q=" +
encodeURIComponent(query) + append);
document.getElementById("google").value = "";
} else {
var link = document.getElementById("results_" +
box).querySelectorAll("a.selected")[0];
if (link != undefined) {
window.open(link.getAttribute("href"));
document.getElementById("in_search_" + box).value = "";
}
}
return void(0);
}
function ial_insert_mode(from_box) {
document.getElementById("mode").innerHTML = "INSERT";
if (from_box == "doc" || from_box == "abx")
ial_select_different_box(ial_func_select_defined_box(from_box));
}
function ial_func_select_defined_box(lbl) {
var box = document.getElementById("box_" + lbl);
return (pbx) => { return (box === pbx) ? undefined : box }
}
function ial_normal_mode() {
document.getElementById("mode").innerHTML = "NORMAL";
}
/* ]]> */
</script>
<!-- ***************************************************************************
********************************************************************************
********************************************************************************
****** ******
****** ******
****** H T M L H E A D E R ******
****** ******
****** ******
********************************************************************************
********************************************************************************
**************************************************************************** -->
</head>
<body>
<div id="header">
<div id="first">
<h1>IAL 1.6.0</h1>
<form method="post"
action="javascript:ial_enter('google');">
<input type="text" id="google"
onfocus="ial_insert_mode('google');"
onfocusout="ial_normal_mode();"/>
</form>
<div id="mode">INITIALIZING</div>
</div>
<div id="logo">
<svg height="80px" width="480px" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 480 80" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<linearGradient id="randverlauf" x1="0%" y1="0%" x2="0%"
y2="100%" spreadMethod="reflect">
<stop offset="0%"
style="stop-color:#660000;stop-opacity:1;"/>
<stop offset="50%"
style="stop-color:#ff8888;stop-opacity:1;"/>
<stop offset="100%"
style="stop-color:#660000;stop-opacity:1;"/>
</linearGradient>
<linearGradient id="rohrverlauf" x1="0%" y1="0%" x2="0%"
y2="100%" spreadMethod="reflect">
<stop offset="0%"
style="stop-color:#cc6600;stop-opacity:1;"/>
<stop offset="50%"
style="stop-color:#ffaa55;stop-opacity:1;"/>
<stop offset="100%"
style="stop-color:#cc6600;stop-opacity:1;"/>
</linearGradient>
<linearGradient id="textverlauf" x1="0%" y1="15%" x2="0%"
y2="100%" spreadMethod="reflect">
<stop offset="0%"
style="stop-color:#110000;stop-opacity:1;"/>
<stop offset="50%"
style="stop-color:#ff0000;stop-opacity:1;"/>
<stop offset="100%"
style="stop-color:#ff8888;stop-opacity:1;"/>
</linearGradient>
</defs>
<rect x="0" y="0" width="480px" height="80px" fill="url(#randverlauf)"/>
<rect x="5" y="5" width="470px" height="70px" fill="#500000"/>
<rect x="10" y="7" height="64" width="64" fill="#000000"/>
<rect x="18" y="15" height="19" width="48" fill="#c100f6"/>
<rect x="18" y="43" height="19" width="48" fill="#ffff00"/>
<text x="17" y="56" fill="#ff0000" style="font-family:'DejaVu Sans',
sans-serif;font-weight:bold;font-size:50px;
stroke-width:2px;stroke:#000000;">M</text>
<text x="80" y="35" fill="url(#textverlauf)" style="font-weight:bolder;
font-family:'Arial Black','DejaVu Sans',
sans-serif;font-size:35px;stroke:#ffffff;
stroke-width:2px;">Ma_Sys.ma</text>
<rect x="80" y="45" width="200px" height="20px" rx="10" ry="10"
style="fill:#8b0000;stroke-width:2px;stroke:#770000;"/>
<rect x="80" y="45" width="30px" height="20px" rx="10" ry="10" id="anm"
fill="url(#rohrverlauf)">
<animateMotion path="M0 0 L170 0" dur="15s" restart="always"
repeatCount="indefinite">
<!--
Ohne das gibt es einen Validierfehler, aber mit
ihm funktioniert es nicht.
<mpath xlink:href="#anm"/>
-->
</animateMotion>
</rect>
<text x="80" y="75" fill="#ff0000" style="font-family:sans-serif;
font-size:9px;stroke-width:0px;">
Copyright (c) Ma_Sys.ma, for further info send an e-mail to
</text>
</svg>
</div>
<div id="copyright">
Information and Links
(c) 2023 Ma_Sys.ma <<a href="mailto:[email protected]"
>[email protected]</a>>
</div>
<xi:include href="primary.xml"/>
</div>
<hr/>
<div id="all_boxes">
<div class="box" id="box_doc">
<h2>a: Docs</h2>
<div class="search_config" id="enable_doc"> </div>
<hr/>
<form method="post"
action="javascript:ial_enter('doc');">
<input type="text" id="in_search_doc"
onkeyup="ial_keyboard_input('doc', event);"
onfocus="ial_insert_mode('doc');"
onfocusout="ial_normal_mode();"/>
</form>
<ul id="results_doc"> </ul>
</div>
<div class="box" id="box_abx">
<h2>o: Archive</h2>
<div class="search_config" id="enable_abx"> </div>
<hr/>
<form method="post"
action="javascript:ial_enter('abx');">
<input type="text" id="in_search_abx"
onkeyup="ial_keyboard_input('abx', event);"
onfocus="ial_insert_mode('abx');"
onfocusout="ial_normal_mode();"/>
</form>
<ul id="results_abx"> </ul>
</div>
<!-- ***************************************************************************
********************************************************************************
********************************************************************************
****** ******
****** ******
****** C U S T O M X H T M L B L O C K S ******
****** ******
****** ******
********************************************************************************
********************************************************************************
**************************************************************************** -->
<xi:include href="boxes.xml"/>
<!-- ***************************************************************************
********************************************************************************
********************************************************************************
****** ******
****** ******
****** S C R I P T L O A D A N D I N V O C A T I O N ******
****** ******
****** ******
********************************************************************************
********************************************************************************
**************************************************************************** -->
<hr/>
</div>
<xi:include href="scripts.xml"/>
<script type="text/javascript">ial_ready();</script> <!-- run at end -->
</body>
</html>