-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
158 lines (95 loc) · 4.15 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
<!doctype html>
<html lang = "en" >
<head>
<meta charset = "utf-8" >
<meta name = "viewport" content= "width=device-width, initial-scale=1" >
<meta name = "description" content = "View gbXML files inside OpenStudio by NREL" >
<meta name = "keywords" content = "JavaScript,GitHub,FOSS" >
<meta name = "date" content = "2019-09-09" >
<meta name = "version" content = "0.0.0" >
<title>Spider gbXML Viewers for OpenStudio</title>
<style>
* { box-sizing: border-box; }
:root { --mnu-width: 22rem; --screen-width: calc( 100vw ); --headerHeight: 6rem; }
html { height: 100%; }
body { font: 12pt monospace; margin: 0 auto; max-width: 800px; padding: 0 0.5rem; }
a { color: crimson; }
a:hover, a:focus, a:active { background-color: yellow; color: #aaa; text-decoration: underline }
blockquote, code { background-color: #ddd; }
button, input[type=button] { background-color: #ddd; border: none; color: #322; cursor: pointer; padding: 3px 5px; }
button:hover { background: #ccc; color: #fff }
summary { font-weight: bold; font-size: 1.5rem }
#main { border: 0px; height: 100%; left: var( --mnu-width ); margin: 0;
padding: 0 3rem; position: absolute; width: calc( 100% - var( --mnu-width ) ); }
#divContents { border: 0px solid red; margin: 0 auto; max-width: 40rem; }
#navMenu { background-color: #eee; height: 100%; left: 0; margin: 0; overflow: auto;
padding: 0 1rem; position: fixed; transition: left 0.5s; top: 0; width: var( --mnu-width ); }
#navMenu a { text-decoration: none; }
#expandButton { height: 32px; position: fixed; left: var( --mnu-width ); top: 0px;
transition: left 0.5s; width: 32px; z-index: 1; }
#expandButton.collapsed { left: 0; }
#navMenu.collapsed { left: calc( var( --mnu-width ) * -1 ); padding: 0; }
#main.collapsed { left: 0; width: 100%; }
</style>
</head>
<body>
<script src = "https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.5/jszip.min.js" ></script>
<script src = "https://cdnjs.cloudflare.com/ajax/libs/showdown/1.9.0/showdown.min.js" ></script>
<!-- File menu panel -->
<script src = "https://pushme-pullyou.github.io/tootoo14/js-14-08/fga-files-github-api/v-0-00/fga-files-github-api.js" ></script>
<script src = "https://pushme-pullyou.github.io/tootoo14/js-14-08/foh-file-open-hash/foh-files-open-hash.js" ></script>
<button id="expandButton" onclick="toggleNavPanel();" >☰</button>
<nav id="navMenu" >
<div id="divTitle" ></div>
<div id="FGAdivMenuRepoFilesFolders" ></div>
<div id="GATdivGithubAccessToken" ></div>
<hr>
<center title="hello!" ><a href=javascript:window.scrollTo(0,0); style=text-decoration:none; > ❦ </a></center>
</nav>
<main id=main >
<div id="divContents" ></div>
</main>
<script>
const urlSourceCode = "https://github.com/ladybug-tools/spider-gbxml-viewers-for-openstudio";
init();
function init() {
divTitle.innerHTML = getTitle();
FGA.branch = '/master/';
FGA.user = 'ladybug-tools';
FGA.repo = 'spider-gbxml-viewers-for-openstudio';
FGA.pathRepo = '';
FGA.urlGitHubPage = "https://www.ladybug.tools/spider-gbxml-viewers-for-openstudio/";
//FGA.urlGitHubPage = "";
FGAdivMenuRepoFilesFolders.innerHTML = FGA.getMenuFilesGithubApi();
FGA.getFiles(); // move to js?
FOH.urlDefaultFile = "README.md";
FOH.target = divContents;
FOH.onHashChange();
window.addEventListener ( 'hashchange', FOH.onHashChange, false );
}
function toggleNavPanel() {// move to COR??
expandButton.classList.toggle( 'collapsed' );
navMenu.classList.toggle( 'collapsed' );
main.classList.toggle( 'collapsed' );
}
function getTitle() {
const urlSourceCodeIcon = "https://pushme-pullyou.github.io/github-mark-32.png";
//document.title = document.title ? document.title : location.href.split( '/' ).pop().slice( 0, - 5 ).replace( /-/g, ' ' );
//const version = document.head.querySelector( "[ name=version ]" ).content;
const htm =
`
<h2>
<a href=${ urlSourceCode } target=_top title="Source code on GitHub" >
<img src=${ urlSourceCodeIcon } height=18 style=opacity:0.5; >
</a>
<a href="" title="Click to reload this page" >${ document.title }</a>
</h2>
<p>
${ document.head.querySelector( "[ name=description ]" ).content }
</p>
`;
return htm;
}
</script>
</body>
</html>