-
Notifications
You must be signed in to change notification settings - Fork 2
/
website-via-github-api2-r4.html
156 lines (96 loc) · 4.73 KB
/
website-via-github-api2-r4.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
<!doctype html>
<html lang=en >
<head>
<meta charset=utf-8 >
<title>webSite via GitHub API2 R4</title>
<meta name=viewport content='width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no' >
<meta name=description content='Request details of all files in a GitHub repository.
Creates a file explorer with menu.
Enables browsing and viewing of selected files.
Menu has breadcrumbs and other useful links.
' >
<meta name=keywords content='CMS,JavaScript,GitHub Developer API,GitHub,FOSS,STEM' >
<meta name=date content='2016-08-26' >
</head>
<body>
<script src=https://cdnjs.cloudflare.com/ajax/libs/showdown/1.4.3/showdown.min.js ></script>
<!--
<script src=../core1/0-def-defaults/defaults-r1.js ></script>
<script src=../core1/0-cor-core/core-r1.js ></script>
<script src=../core1/1-key-api-key/api-key-r1.js ></script>
<script src=../core1/tre-tree/get-tree-r2.js ></script>
<script src=../core1/ifr-iframe-carousel/iframe-carousel-r1.js ></script>
<script src=../core1/red-readme-getter/readme-getter-r2.js ></script>
-->
<script src=https://jaanga.github.io/cookbook-html/templates/core1/0-def-defaults/defaults-r1.js ></script>
<script src=https://jaanga.github.io/cookbook-html/templates/core1/0-cor-core/core-r1.js ></script>
<script src=https://jaanga.github.io/cookbook-html/templates/core1/1-key-api-key/api-key-r1.js ></script>
<script src=https://jaanga.github.io/cookbook-html/templates/core1/tre-tree/get-tree-r2.js ></script>
<script src=https://jaanga.github.io/cookbook-html/templates/core1/ifr-iframe-carousel/iframe-carousel-r1.js ></script>
<script src=https://jaanga.github.io/cookbook-html/templates/core1/red-readme-getter/readme-getter-r2.js ></script>
<script>
// DEF.readmeURL = '../../../terrain3';
IFR.sites = [
{ fileName: DEF.readmeURL + 'globes/earth-globe-displacement/index.html', title: 'Earth Globe Displacement', txt: 'As the world turns...' },
{ fileName: DEF.readmeURL + 'elevations-core3/oakland-gran-fondo-r11.html', title: 'Oakland Gran Fondo R11', txt: 'October 23rd' },
{ fileName: DEF.readmeURL + 'elevations-core3/elevations-view-tgif-r1.html', title: 'Elevations View TGIF', txt: 'Tania\'s Greek Island Fantasy' },
{ fileName: DEF.readmeURL + 'elevations-core3/elevations-core3-r1.html', title: 'Elevations Core3', txt: 'Basic 3D map data viewer' },
{ fileName: DEF.readmeURL + 'elevations-core3/elevations-view-ace-it-r2.html', title: 'Elevations View ACE-IT', txt: 'Family places' },
// { fileName: DEF.readmeURL + 'elevations-core3/elevations-view-json-r2.html', title: 'Elevations View JSON', txt: 'Maps with paths' },
{ fileName: DEF.readmeURL + 'elevations-core3/0-elevations-view-generate-gif/elevations-view-generate-gif-r1.html', title: 'Generate Animated GIF', txt: 'Generate animated GIF files' }
// [ fileName: '', txt: '' ],
];
init();
function init() {
COR.initThreeColumns();
COR.menu.innerHTML =
COR.getMenuBreadCrumbs() +
TRE.getMenuDetailsTableOfContents() +
TRE.getMenuDetailsPageActions() +
TRE.getMenuRepositoryEvents() +
TRE.getMenuDetailsRepositoryStatistics() +
KEY.getMenuDetailsAPIKey() +
KEY.getMenuDetailsAPIRates() +
COR.getMenuDetailsAbout() +
COR.getMenuFooter() +
b;
window.addEventListener ( 'hashchange', onHashChange, false );
TRE.getGitHubRepoTreeContents(); // calls onHashChange();
}
function onHashChange() {
var item;
clearInterval( IFR.timer );
item = location.hash ? location.hash.slice( 1 ) : DEF.searchInFolder;
//item = '../../../../terrain3/elevations-core3/elevations-core3-r1.html';
if ( item.endsWith( '.md' ) === true ) {
COR.setMenuBreadCrumbs( DEF.searchInFolder );
COR.requestFile( TRE.urlGITHubAPITreeContents + item, function callbackMD( xhr ) {
if ( xhr.target.status !== 404 ) {
COR.contents.innerHTML = COR.converter.makeHtml( xhr.target.responseText );
}
} );
} else if ( item.endsWith( '.html' ) === true ) {
COR.setMenuBreadCrumbs( item );
COR.contents.innerHTML = RED.setReadMe( item );
} else {
COR.setMenuBreadCrumbs( item );
TRE.getFilesFromFolder( item );
if ( DEF.carousels.includes( item ) === true ) {
if ( item === '/' ) { DEF.includeFullScreenChoices = false; } else { DEF.includeFullScreenChoices = true; }
DEF.includeFullScreenChoices = item === '/' ? false : true;
COR.requestFile( DEF.readmeURL + '/' + item + '/readme-body.md', RED.callback );
} else {
COR.requestFile( DEF.urlGHPages + item + '/' + DEF.defaultFile, function callbackMD( xhr ) {
COR.contents.innerHTML = COR.converter.makeHtml( xhr.target.responseText );
} );
}
KEY.getRateLimits();
if ( !TRErepoStats.innerHTML ) {
TRE.setMenuDetailsRepositoryStatistics();
TRE.getUpdates();
}
}
}
</script>
</body>
</html>