|
1 | 1 | <!DOCTYPE html> |
2 | | -<!-- |
3 | | -Copyright 2013 The Polymer Authors. All rights reserved. |
4 | | -Use of this source code is governed by a BSD-style |
5 | | -license that can be found in the LICENSE file. |
6 | | ---> |
7 | 2 | <html> |
8 | | - <head> |
9 | | - <title>Google Map</title> |
10 | | - <script src="../platform/platform.js"></script> |
11 | | - <link rel="import" href="google-map.html"> |
12 | | - <link rel="import" href="google-map-directions.html"> |
13 | | - </head> |
14 | | - <body> |
15 | | - <polymer-element name="x-map-example" noscript> |
16 | | - <template> |
17 | | - <style> |
18 | | - google-map { |
19 | | - display: block; |
20 | | - height: 600px; |
21 | | - } |
22 | | - </style> |
23 | | - |
24 | | - <google-map map="{{map}}"></google-map> |
25 | | - <google-map-directions map="{{map}}" startAddress="San Francisco" endAddress="Mountain View"></google-map-directions> |
26 | | - |
27 | | - </template> |
28 | | - </polymer-element> |
29 | | - |
30 | | - <x-map-example></x-map-example> |
31 | | - </body> |
| 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 | + [nobowager] [ifnobowager], [noviewer] [ifnoviewer] { |
| 12 | + display: block; |
| 13 | + } |
| 14 | + [detector], [ifnobowager], [ifnoviewer], [nobowager] [ifbowager], [noviewer] [ifviewer] { |
| 15 | + display: none; |
| 16 | + } |
| 17 | + img { |
| 18 | + vertical-align: middle; |
| 19 | + height: 22px; |
| 20 | + padding: 0 4px 2px 0; |
| 21 | + } |
| 22 | + div { |
| 23 | + display: inline-block; |
| 24 | + } |
| 25 | + h2 { |
| 26 | + display: inline-block; |
| 27 | + margin: 0px 6px; |
| 28 | + vertical-align: middle; |
| 29 | + } |
| 30 | + .choiceB, .choiceC { |
| 31 | + font-size: 0.8em; |
| 32 | + display: inline-block; |
| 33 | + white-space: nowrap; |
| 34 | + padding: 0px 16px; |
| 35 | + text-align: center; |
| 36 | + text-transform: uppercase; |
| 37 | + color: #eee; |
| 38 | + border-radius: 23px; |
| 39 | + } |
| 40 | + .choiceB { |
| 41 | + background-color: #BF8A30; |
| 42 | + } |
| 43 | + .choiceC { |
| 44 | + background-color: #284B7E; |
| 45 | + } |
| 46 | + .choiceB:hover { |
| 47 | + background-color: #C7F83E; |
| 48 | + color: #222; |
| 49 | + } |
| 50 | + .choiceC:hover { |
| 51 | + background-color: #C7F83E; |
| 52 | + color: #222; |
| 53 | + } |
| 54 | + a { |
| 55 | + text-decoration: none; |
| 56 | + } |
| 57 | + polymer-doc-viewer { |
| 58 | + display: block; |
| 59 | + position: absolute; |
| 60 | + top: 56px; |
| 61 | + right: 0; |
| 62 | + bottom: 0px; |
| 63 | + left: 0; |
| 64 | + border: 1px solid silver; |
| 65 | + } |
| 66 | + </style> |
| 67 | + <script src="../platform/platform.js"></script> |
| 68 | + <link rel="import" href="../polymer-doc-viewer/polymer-doc-viewer.html"> |
| 69 | +</head> |
| 70 | +<body> |
| 71 | + <!-- detection--> |
| 72 | + <img detector src="../Bowager/static/bowager-logo.png" onerror="nobowager()"> |
| 73 | + <img detector src="../polymer-doc-viewer/bowager-logo.png" onerror="noviewer()"> |
| 74 | + <script> |
| 75 | + function nobowager() { |
| 76 | + document.body.setAttribute('nobowager', ''); |
| 77 | + } |
| 78 | + function noviewer() { |
| 79 | + document.body.setAttribute('noviewer', ''); |
| 80 | + } |
| 81 | + // for testing only |
| 82 | + window.addEventListener('load', function() { |
| 83 | + var opts = window.location.search; |
| 84 | + if (opts.indexOf('viewer') >= 0) { |
| 85 | + document.body.removeAttribute('noviewer'); |
| 86 | + } |
| 87 | + if (opts.indexOf('bowager') >= 0) { |
| 88 | + document.body.removeAttribute('nobowager'); |
| 89 | + } |
| 90 | + if (opts.indexOf('noviewer') >= 0) { |
| 91 | + document.body.setAttribute('noviewer', ''); |
| 92 | + } |
| 93 | + if (opts.indexOf('nobowager') >= 0) { |
| 94 | + document.body.setAttribute('nobowager', ''); |
| 95 | + } |
| 96 | + }); |
| 97 | + </script> |
| 98 | + <!-- --> |
| 99 | + <h2>polymer api</h2> |
| 100 | + <div ifnoviewer> |
| 101 | + <p>See the <a target="_blank" href="http://itch.selfip.net/bowertopia/components/polymer-ajax/doc.html">remote docs.</a></p> |
| 102 | + <p>Play with this element in the <a href="http://itch.selfip.net/bowertopia/designer/?element=polymer-ajax">remote sandbox.</a></p> |
| 103 | + <p>See the <a target="_blank" href="smoke.html">smoke test.</a></p> |
| 104 | + <hr> |
| 105 | + <p>To access these tools locally, install the <code>polymer-catalog-tools</code> package.</p> |
| 106 | + <code>bower install Polymer/polymer-catalog-tools</code> |
| 107 | + <br> |
| 108 | + <p ifbowager> |
| 109 | + Or use <a ifbowager target="_blank" href="foo">one-click install <img src="../Bowager/static/bowager-logo.png" title="install via bowager"></a> |
| 110 | + </p> |
| 111 | + <p ifnobowager> |
| 112 | + Pro tip: consider using Bowager for web-enabled installs. |
| 113 | + </p> |
| 114 | + </div> |
| 115 | + <h2 ifviewer> |
| 116 | + <a class="choiceB" target="_blank" id="sandbox">sandbox</a> |
| 117 | + <a class="choiceC" target="_blank" href="smoke.html">smoke test</a> |
| 118 | + <polymer-doc-viewer url="docs.json"></polymer-doc-viewer> |
| 119 | + </h2> |
| 120 | + <script> |
| 121 | + var pathName = location.pathname.split('/'); |
| 122 | + moduleName = pathName.pop() || pathName.pop(); |
| 123 | + document.querySelector('title').textContent = moduleName; |
| 124 | + document.querySelector('h2').textContent = moduleName; |
| 125 | + document.querySelector('#sandbox').href = '../../designer/?element=' + moduleName; |
| 126 | + </script> |
| 127 | +</body> |
32 | 128 | </html> |
0 commit comments