|
| 1 | +<!doctype html> |
| 2 | +<html lang=en > |
| 3 | +<head> |
| 4 | +<meta charset=utf-8 > |
| 5 | +<title>Theo-Armour Cookbook</title> |
| 6 | +<meta name=viewport content='width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no' > |
| 7 | +<meta name=description content='Browse and view files on GitHub with remarkable ease.' > |
| 8 | +<meta name=keywords content='CSS,HTML,JavaScript,GitHub,FOSS' > |
| 9 | +<meta name=date content='2017-03-05' > |
| 10 | +</head> |
| 11 | +<body> |
| 12 | +<script src=https://cdn.rawgit.com/showdownjs/showdown/master/dist/showdown.min.js ></script> |
| 13 | +<script src=tootoo.js ></script> |
| 14 | +<script> |
| 15 | +// Copyright © 2017 PushMe PullYou authors. MIT license |
| 16 | +// https://github.com/showdownjs/showdown |
| 17 | + |
| 18 | + let theoArmour = { |
| 19 | + user : 'theo-armour', |
| 20 | + repo : 'cookbook', |
| 21 | + branch : 'gh-pages', |
| 22 | + folder : '', |
| 23 | + noIndex : 'true' |
| 24 | + }; |
| 25 | + |
| 26 | + init(); |
| 27 | + |
| 28 | + function init() { |
| 29 | + |
| 30 | + var css, container, contents, hamburger, menu; |
| 31 | + var b = '<br>'; |
| 32 | + |
| 33 | + css = document.body.appendChild( document.createElement('style') ); |
| 34 | + css.innerHTML = |
| 35 | + 'html, body { font: 12pt monospace; height: 100%; margin: 0; }' + |
| 36 | + 'a { color: crimson; text-decoration: none; }' + |
| 37 | + 'button, input[type=button] { background-color: #ccc; border: 2px #fff solid; color: #322; }' + |
| 38 | + 'summary { outline: none; }' + |
| 39 | + 'summary h3 { display: inline; }' + |
| 40 | + |
| 41 | + '.popUp { background-color: white; border: 1px solid red; left: 180px; opacity: 1.0; padding: 5px; position: absolute; width: 120px; z-index: 10; }' + |
| 42 | + |
| 43 | + '#bars { color: crimson; cursor: pointer; font-size: 24pt; text-decoration: none; }' + |
| 44 | + '#button { background-color: #555; color: #fff; opacity: 0.5; padding: 8px; position: fixed; right: 20px; top: 20px; }' + |
| 45 | + '#button:hover { cursor: pointer; opacity: 1; }' + |
| 46 | + '#button a { text-decoration: none; color: #fff; }' + |
| 47 | + '#container { height: 100%; left: 0; position: absolute; transition: left 1s; width: 100%; }' + |
| 48 | + |
| 49 | +// let each type of contents decide its best width and placement |
| 50 | + '#contents { border: 0px #ccc solid; height: 100%; left: 325px; position: absolute; width: ' + ( window.innerWidth - 325 ) + 'px; }' + |
| 51 | +// '#contents { border: 2px #ccc solid; margin-left: 325px; position: absolute; width: 100%; }' + |
| 52 | + |
| 53 | + '#hamburger { background-color: #eee; left: 325px; position: absolute; top: 20px; z-index: 1 }' + |
| 54 | + '#hamburger h2 { margin: 0;}' + |
| 55 | + |
| 56 | + '#menu { background-color: #eee; border: 1px #ccc solid; box-sizing:border-box; height: 100%; overflow-y: auto; padding: 0 10px; position: fixed; width: 325px; }' + |
| 57 | + '#menu h2 {margin: 0; }' + |
| 58 | + '#menuBreadcrumbs h2, #menuBreadcrumbs h3 { font-size: 14pt; margin: 0; }' + |
| 59 | + |
| 60 | + '#nextFile { color: #888; font-size: 36pt; opacity: 0.5; padding: 8px; position: fixed; right: 20px; top: ' + (0.5 * window.innerHeight ) + 'px; }' + |
| 61 | + '#nextFile:hover { cursor: pointer; opacity: 1; }' + |
| 62 | + '#nextFile a { text-decoration: none; color: #888; }' + |
| 63 | + |
| 64 | + '#previousFile { color: #888; font-size: 36pt; opacity: 0.5; padding: 8px; position: fixed; margin-left: 350px; top: ' + (0.5 * window.innerHeight ) + 'px; }' + |
| 65 | + '#previousFile:hover { cursor: pointer; opacity: 1; }' + |
| 66 | + '#previousFile a { text-decoration: none; color: #888; }' + |
| 67 | + |
| 68 | + ''; |
| 69 | + |
| 70 | + container = document.body.appendChild( document.createElement( 'div' ) ); |
| 71 | + container.id = 'container'; |
| 72 | + container.innerHTML = |
| 73 | + |
| 74 | + '<div id=menu >' + |
| 75 | + |
| 76 | + |
| 77 | + '<h2>' + |
| 78 | + '<a href=https://pushme-pullyou.github.io/ title="Pushme-Pullyou - your coming and going happy place" > ❦ </a><br>' + |
| 79 | + '<a href="" title="Click here to refresh this page" >' + document.title + '</a>' + |
| 80 | + ' ~ <a href="https://github.com/pushme-pullyou/pushme-pullyou.github.io/tree/master/tootoo/" onmouseover=popHelp.style.display=""; onmouseout=popHelp.style.display="none"; > ⓘ </a>' + |
| 81 | + '</h2>' + |
| 82 | + |
| 83 | + '<div class=popUp id=popHelp style=display:none; ><div>Hi there!</div>Click the i-in-circle, info icon for latest updates.</div>' + |
| 84 | + |
| 85 | + '<p><small>Browse and view files on GitHub with remarkable ease.</small></p>' + |
| 86 | + |
| 87 | + '<details open>' + |
| 88 | + |
| 89 | + '<summary><h3>Menu</h3></summary>' + |
| 90 | + |
| 91 | + '<div id=menuBreadcrumbs ></div>' + b + |
| 92 | + |
| 93 | + '<div id=menuItems ></div>' + b + |
| 94 | + |
| 95 | + '</details>' + |
| 96 | + |
| 97 | + '<details>' + |
| 98 | + |
| 99 | + '<summary><h3>Current File Info</h3></summary>' + |
| 100 | + |
| 101 | + '<div id=menuFileData ></div>' + b + |
| 102 | + |
| 103 | + '<div id=menuInfo ></div>' + b + |
| 104 | + |
| 105 | + '</details>' + |
| 106 | + |
| 107 | + TOO.menuSettings + |
| 108 | + |
| 109 | + '<details>' + |
| 110 | + '<summary><h3>About</h3></summary>' + |
| 111 | + '<p>Copyright © 2017 Pushme-Pullyou authors. <a href=http://pushme-pullyou/pushme-pullyou.github.io >MIT license</a>.</p>' + |
| 112 | + '<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>' + |
| 113 | + '</details>' + |
| 114 | + |
| 115 | + '<hr>' + |
| 116 | + '<center><a href=javascript:menu.scrollTop=0; style=text-decoration:none; onmouseover=pop2.style.display=""; onmouseout=pop2.style.display="none"; ><h1> ❦ <h1></a></center>' + |
| 117 | + '<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>' + |
| 118 | + |
| 119 | + '</div>' + |
| 120 | + |
| 121 | + '<div id=hamburger onclick=container.style.left=container.style.left===""?"-325px":""; >' + |
| 122 | + '<div id=bars title="Click this hamburger to slide the menu" > ☰ </div>' + |
| 123 | + '</div>' + |
| 124 | + |
| 125 | + '<div id=contents >' + |
| 126 | + '<h1>Typical contents</h1>' + |
| 127 | + '</div>' + |
| 128 | + |
| 129 | + ''; |
| 130 | + |
| 131 | + window.addEventListener( 'resize', onWindowResize, false ); |
| 132 | + |
| 133 | + onWindowResize(); |
| 134 | + |
| 135 | + TOO.init( theoArmour ); |
| 136 | + } |
| 137 | + |
| 138 | + |
| 139 | + function onWindowResize() { |
| 140 | + |
| 141 | + if ( window.self !== window.top || window.innerWidth < 500 ) { container.style.left = '-325px'; } |
| 142 | + |
| 143 | + contents.style.width = window.innerWidth - 350; |
| 144 | + |
| 145 | + } |
| 146 | + |
| 147 | +</script> |
| 148 | +</body> |
| 149 | +</html> |
0 commit comments