-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtootoo-cookbook.html
149 lines (104 loc) · 5.54 KB
/
tootoo-cookbook.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
<!doctype html>
<html lang=en >
<head>
<meta charset=utf-8 >
<title>Theo-Armour Cookbook</title>
<meta name=viewport content='width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no' >
<meta name=description content='Browse and view files on GitHub with remarkable ease.' >
<meta name=keywords content='CSS,HTML,JavaScript,GitHub,FOSS' >
<meta name=date content='2017-03-05' >
</head>
<body>
<script src=https://cdnjs.cloudflare.com/ajax/libs/showdown/1.9.0/showdown.min.js ></script>
<script src=tootoo.js ></script>
<script>
// Copyright © 2017 PushMe PullYou authors. MIT license
// https://github.com/showdownjs/showdown
let theoArmour = {
user : 'theo-armour',
repo : 'cookbook',
branch : 'gh-pages',
folder : '',
noIndex : 'true'
};
init();
function init() {
var css, container, contents, hamburger, menu;
var b = '<br>';
css = document.body.appendChild( document.createElement('style') );
css.innerHTML =
'html, body { font: 12pt monospace; height: 100%; margin: 0; }' +
'a { color: crimson; text-decoration: none; }' +
'button, input[type=button] { background-color: #ccc; border: 2px #fff solid; color: #322; }' +
'summary { outline: none; }' +
'summary h3 { display: inline; }' +
'.popUp { background-color: white; border: 1px solid red; left: 180px; opacity: 1.0; padding: 5px; position: absolute; width: 120px; z-index: 10; }' +
'#bars { color: crimson; cursor: pointer; font-size: 24pt; text-decoration: none; }' +
'#button { background-color: #555; color: #fff; opacity: 0.5; padding: 8px; position: fixed; right: 20px; top: 20px; }' +
'#button:hover { cursor: pointer; opacity: 1; }' +
'#button a { text-decoration: none; color: #fff; }' +
'#container { height: 100%; left: 0; position: absolute; transition: left 1s; width: 100%; }' +
// let each type of contents decide its best width and placement
'#contents { border: 0px #ccc solid; height: 100%; left: 325px; position: absolute; width: ' + ( window.innerWidth - 325 ) + 'px; }' +
// '#contents { border: 2px #ccc solid; margin-left: 325px; position: absolute; width: 100%; }' +
'#hamburger { background-color: #eee; left: 325px; position: absolute; top: 20px; z-index: 1 }' +
'#hamburger h2 { margin: 0;}' +
'#menu { background-color: #eee; border: 1px #ccc solid; box-sizing:border-box; height: 100%; overflow-y: auto; padding: 0 10px; position: fixed; width: 325px; }' +
'#menu h2 {margin: 0; }' +
'#menuBreadcrumbs h2, #menuBreadcrumbs h3 { font-size: 14pt; margin: 0; }' +
'#nextFile { color: #888; font-size: 36pt; opacity: 0.5; padding: 8px; position: fixed; right: 20px; top: ' + (0.5 * window.innerHeight ) + 'px; }' +
'#nextFile:hover { cursor: pointer; opacity: 1; }' +
'#nextFile a { text-decoration: none; color: #888; }' +
'#previousFile { color: #888; font-size: 36pt; opacity: 0.5; padding: 8px; position: fixed; margin-left: 350px; top: ' + (0.5 * window.innerHeight ) + 'px; }' +
'#previousFile:hover { cursor: pointer; opacity: 1; }' +
'#previousFile a { text-decoration: none; color: #888; }' +
'';
container = document.body.appendChild( document.createElement( 'div' ) );
container.id = 'container';
container.innerHTML =
'<div id=menu >' +
'<h2>' +
'<a href=https://pushme-pullyou.github.io/ title="Pushme-Pullyou - your coming and going happy place" > ❦ </a><br>' +
'<a href="" title="Click here to refresh this page" >' + document.title + '</a>' +
' ~ <a href="https://github.com/pushme-pullyou/pushme-pullyou.github.io/tree/master/tootoo/" onmouseover=popHelp.style.display=""; onmouseout=popHelp.style.display="none"; > ⓘ </a>' +
'</h2>' +
'<div class=popUp id=popHelp style=display:none; ><div>Hi there!</div>Click the i-in-circle, info icon for latest updates.</div>' +
'<p><small>Browse and view files on GitHub with remarkable ease.</small></p>' +
'<details open>' +
'<summary><h3>Menu</h3></summary>' +
'<div id=menuBreadcrumbs ></div>' + b +
'<div id=menuItems ></div>' + b +
'</details>' +
'<details>' +
'<summary><h3>Current File Info</h3></summary>' +
'<div id=menuFileData ></div>' + b +
'<div id=menuInfo ></div>' + b +
'</details>' +
TOO.menuSettings +
'<details>' +
'<summary><h3>About</h3></summary>' +
'<p>Copyright © 2017 Pushme-Pullyou authors. <a href=http://pushme-pullyou/pushme-pullyou.github.io >MIT license</a>.</p>' +
'<p>Click the \'i in a circle\' icon for more <a href=index.html#readme.md title="Click here for help and information" >help</a>.</p>' +
'</details>' +
'<hr>' +
'<center><a href=javascript:menu.scrollTop=0; style=text-decoration:none; onmouseover=pop2.style.display=""; onmouseout=pop2.style.display="none"; ><h1> ❦ <h1></a></center>' +
'<div class=popUp id=pop2 style=display:none;bottom:20px; >Pushme-Pullyou - your GitHub exploring happy place.<br>Click here to return to the top of the page</div>' +
'</div>' +
'<div id=hamburger onclick=container.style.left=container.style.left===""?"-325px":""; >' +
'<div id=bars title="Click this hamburger to slide the menu" > ☰ </div>' +
'</div>' +
'<div id=contents >' +
'<h1>Typical contents</h1>' +
'</div>' +
'';
window.addEventListener( 'resize', onWindowResize, false );
onWindowResize();
TOO.init( theoArmour );
}
function onWindowResize() {
if ( window.self !== window.top || window.innerWidth < 500 ) { container.style.left = '-325px'; }
contents.style.width = window.innerWidth - 350;
}
</script>
</body>
</html>