Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Commit 7098141

Browse files
committed
add doc reader as index.html
1 parent 49be199 commit 7098141

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

index.html

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<title>polymer api</title>
5+
<style>
6+
html, body {
7+
font-family: Arial, sans-serif;
8+
white-space: nowrap;
9+
overflow: hidden;
10+
}
11+
[noviewer] [ifnoviewer] {
12+
display: block;
13+
}
14+
[detector], [ifnoviewer], [noviewer] [ifviewer] {
15+
display: none;
16+
}
17+
[ifviewer], [ifnoviewer] {
18+
position: absolute;
19+
top: 0;
20+
right: 0;
21+
bottom: 0;
22+
left: 0;
23+
}
24+
iframe {
25+
border: none;
26+
margin: 0;
27+
width: 100%;
28+
height: 100%;
29+
}
30+
#remote {
31+
position: absolute;
32+
top: 0;
33+
right: 0;
34+
}
35+
</style>
36+
<script src="../platform/platform.js"></script>
37+
<link rel="import" href="../polymer-home-page/polymer-home-page.html">
38+
</head>
39+
<body>
40+
<img detector src="../polymer-home-page/bowager-logo.png" onerror="noviewer()">
41+
<polymer-home-page ifviewer></polymer-home-page>
42+
<div ifnoviewer>
43+
<span id="remote">[remote]</span>
44+
<iframe></iframe>
45+
</div>
46+
<!-- -->
47+
<script>
48+
var remoteDocs = 'http://turbogadgetry.com/bowertopia/components/';
49+
// if no local info viewer, load it remotely
50+
function noviewer() {
51+
document.body.setAttribute('noviewer', '');
52+
var path = location.pathname.split('/');
53+
var module = path.pop() || path.pop();
54+
document.querySelector('iframe').src = remoteDocs + module;
55+
document.querySelector('title').textContent = module;
56+
}
57+
// for testing only
58+
var opts = window.location.search;
59+
if (opts.indexOf('noviewer') >= 0) {
60+
noviewer();
61+
}
62+
</script>
63+
</body>
64+
</html>

0 commit comments

Comments
 (0)