OLD | NEW |
| (Empty) |
1 <!-- | |
2 @license | |
3 Copyright (c) 2014 The Polymer Project Authors. All rights reserved. | |
4 This code may only be used under the BSD style license found at http://polym
er.github.io/LICENSE.txt | |
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS
.txt | |
6 The complete set of contributors may be found at http://polymer.github.io/CO
NTRIBUTORS.txt | |
7 Code distributed by Google as part of the polymer project is also | |
8 subject to an additional IP rights grant found at http://polymer.github.io/P
ATENTS.txt | |
9 --> | |
10 <!doctype html> | |
11 <html> | |
12 <head> | |
13 <title>polymer api</title> | |
14 <style> | |
15 html, body { | |
16 font-family: Arial, sans-serif; | |
17 white-space: nowrap; | |
18 overflow: hidden; | |
19 } | |
20 [noviewer] [ifnoviewer] { | |
21 display: block; | |
22 } | |
23 [detector], [ifnoviewer], [noviewer] [ifviewer] { | |
24 display: none; | |
25 } | |
26 [ifviewer], [ifnoviewer] { | |
27 position: absolute; | |
28 top: 0; | |
29 right: 0; | |
30 bottom: 0; | |
31 left: 0; | |
32 } | |
33 iframe { | |
34 border: none; | |
35 margin: 0; | |
36 width: 100%; | |
37 height: 100%; | |
38 } | |
39 #remote { | |
40 position: absolute; | |
41 top: 0; | |
42 right: 0; | |
43 } | |
44 </style> | |
45 <script src="../webcomponentsjs/webcomponents.js"></script> | |
46 <link rel="import" href="../polymer-home-page/polymer-home-page.html"> | |
47 </head> | |
48 <body> | |
49 <img detector src="../polymer-home-page/bowager-logo.png" onerror="noviewer()"
> | |
50 <polymer-home-page ifviewer></polymer-home-page> | |
51 <div ifnoviewer> | |
52 <span id="remote">[remote]</span> | |
53 <iframe></iframe> | |
54 </div> | |
55 <!-- --> | |
56 <script> | |
57 var remoteDocs = 'http://turbogadgetry.com/bowertopia/components/'; | |
58 // if no local info viewer, load it remotely | |
59 function noviewer() { | |
60 document.body.setAttribute('noviewer', ''); | |
61 var path = location.pathname.split('/'); | |
62 var module = path.pop() || path.pop(); | |
63 document.querySelector('iframe').src = remoteDocs + module; | |
64 document.querySelector('title').textContent = module; | |
65 } | |
66 // for testing only | |
67 var opts = window.location.search; | |
68 if (opts.indexOf('noviewer') >= 0) { | |
69 noviewer(); | |
70 } | |
71 </script> | |
72 </body> | |
73 </html> | |
OLD | NEW |