-
Notifications
You must be signed in to change notification settings - Fork 0
/
evereverland-2020-11-13.html
256 lines (152 loc) · 5.64 KB
/
evereverland-2020-11-13.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,user-scalable=no,minimum-scale=1.0,maximum-scale=1.0" />
<meta name="description" content="Web site designed and built by Theo Armour, resident at the Heritage">
<meta name="keywords" content="JavaScript,MarkdownGitHub,FOSS">
<meta name="version" content="2024-01-16">
<!-- Copyright 2024 Theo Armour. MIT license -->
<link rel="stylesheet" href="./lib/style/style-2020-11-07.css">
<!-- https://github.com/showdownjs/showdown -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/showdown/1.9.1/showdown.min.js"></script>
<style>
:root {
--main-hue: 120;
/* 0 to 360 0=red 120=green 240=blue */
}
</style>
<title></title>
</head>
<body>
<details id=navMenuDet>
<summary id=navMenuSum class="summary-secondary gmd-1">show || hide menu</summary>
<nav id="navMenu" class="gmd-2">
<header id="hdrTitle">
<h2>
<a id=aGithub href="https://github.com/evereverland/2019" target="_top"
title="Source code on GitHub">
<img src="./lib/icons/octicon.svg">
</a>
<a id=aTitle href="" title="Click to reload this page">
EverEverLand
</a>
<span class="info">
<img class=infoImg src="./lib/icons/noun_Information_585560.svg">
<span id="divDescription" class="infoTooltip gmd-5">
</span>
</span>
</h2>
</header>
<div id=divNavLog></div>
<!--
<details id=detFile>
<summary class="summary-primary gmd-1" title="Open files on your device: ">file menu</summary>
<div id=FRdivMenuFileReader></div>
<p>
<input type=file id=FRinpFile onchange=FR.readFile(this); accept="*">
</p>
<div id=FOOdivLog>to be reset</div>
<div id=FOZdivFileOpenZip></div>
<div id=divLog></div>
</details>
<details open>
<!-- 'open' triggers a run on load
<summary class="summary-primary gmd-1" title="View selected items">repository files
</summary>
</details>
-->
<!--
<span class="info">
<img class=infoImg src="../lib/icons/noun_Information_585560.svg">
<span id="spnGRV" class="infoTooltip gmd-5">
test <button onclick=GRV.test()>view all files in this repository</button>
</span>
</span>
-->
<div class=divNavResize>
<!-- <p>Files you can load, view and experiment with:</p> -->
<div id=GRVdivGitHubRepoTreeView></div>
<br>
</div>
<hr>
<footer>
<div title="Go to top of menu" style=text-align:center;>
<a class=aDingbat href=javascript:navMenuSum.scrollIntoView();>
❧
</a>
</div>
</footer>
</nav>
</details>
<main>
<div id="divContentMain"></div>
</main>
<div id="divPopUp" class="gmd-2">Welcome! </div>
<script src="./lib/grv-github-repo-tree-view/grv-github-repo-tree-view-2020-11-13.js"></script>
<script src="./lib/fo-file-open/foo-file-open-object-2020-07-17.js"></script>
<script src="./lib/fo-file-open/foz-file-open-zip-2020-07-07.js"></script>
<script src="./lib/fo-file-open/fr-file-reader-2020-07-06.js"></script>
<script>
divDescription.innerHTML = document.head.querySelector( "[ name=description ]" ).content +
"<br><br>Update: " + document.head.querySelector( "[ name=version ]" ).content
init();
function init() {
divPopUp.hidden = true;
if ( window.innerWidth < 640 || window.innerHeight < 500 ) {
} else {
navMenuDet.open = true
}
// if running on server, keeps address bar pointed to latest dev
//if ( !location.hash && location.protocol === "https:" ) {
if ( location.protocol === "https:" ) {
window.history.pushState( "", "", "./" + location.hash );
GRV.urlViewer = "";
GRV.ignoreFolders = [ "archive", "drafts", "images", "js", "lib", "src", "templates" ];
} else {
if ( location.href.includes( "pushme" ) ) {
GRV.urlViewer = "https://evereverland.github.io/";
} else {
GRV.urlViewer = "";
}
GRV.ignoreFolders = [];
}
GRV.urlApi = "https://api.github.com/repos/evereverland/2019/git/trees/master?recursive=1";
GRV.urlSource = "https://github.com/evereverland/2019";
GRV.iconOctoCat = `<img width=14 src="${ GRV.urlViewer }lib/icons/octicon.svg">`;
GRV.link = `<img width=14 src="${ GRV.urlViewer }lib/icons/icon-link-external.svg">`;
GRV.getFiles = GRV.getFilesSimple;
GRV.init();
const defaultFile = "README.md";
if ( !location.hash ) { location.hash = defaultFile; }
window.addEventListener( "hashchange", onHashChange, false );
onHashChange();
}
function onHashChange() {
const url = GRV.urlViewer + location.hash.slice( 1 );
//console.log( "url", url );
const title = url.split( "/" ).pop();
const extension = title.toLowerCase().split( '.' ).pop();
document.title = title;
if ( extension === "md" ) {
showdown.setFlavor( "github" );
const options = { excludeTrailingPunctuationFromURLs: true, ghMention: true, parseImgDimensions: true, simplifiedAutoLink: true, simpleLineBreaks: true, emoji: true, openLinksInNewWindow: true };
const xhr = new XMLHttpRequest();
xhr.open( "get", url, true );
xhr.onload = () => {
const txt = xhr.responseText.replace( /\<!--@@@/, "" ).replace( /\@@@-->/, "" );
divContentMain.innerHTML = new showdown.Converter( options ).makeHtml( txt );
window.scrollTo( 0, 0 );
};
xhr.send( null );
return;
}
if ( [ "gif", "jpg", "png", "svg" ].includes( extension ) ) {
divContentMain.innerHTML = `<img src="${ url }" style=max-width:100% >`;
return;
}
divContentMain.innerHTML = `<iframe src="${ url }" height=${ window.innerHeight } width=100% ></iframe>`;
}
</script>
</body>
</html>