-<!DOCTYPE html>
+<!doctype html>
<html>
<head>
- <title>Selection</title>
+ <title>polymer api</title>
+ <style>
+ html, body {
+ font-family: Arial, sans-serif;
+ white-space: nowrap;
+ overflow: hidden;
+ }
+ [noviewer] [ifnoviewer] {
+ display: block;
+ }
+ [detector], [ifnoviewer], [noviewer] [ifviewer] {
+ display: none;
+ }
+ [ifviewer], [ifnoviewer] {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ }
+ iframe {
+ border: none;
+ margin: 0;
+ width: 100%;
+ height: 100%;
+ }
+ #remote {
+ position: absolute;
+ top: 0;
+ right: 0;
+ }
+ </style>
<script src="../platform/platform.js"></script>
- <link rel="import" href="polymer-selection.html">
+ <link rel="import" href="../polymer-home-page/polymer-home-page.html">
</head>
<body>
-<polymer-element name="selection-example">
- <template>
- <style>
- /* @polyfill ul > * */
- ::-webkit-distributed(> *) {
- cursor: pointer;
- }
-
- /* @polyfill ul > .selected */
- ::-webkit-distributed(> .selected) {
- font-weight: bold;
- font-style: italic;
- }
- </style>
- <ul on-tap="{{itemTapAction}}">
- <content></content>
- </ul>
- <polymer-selection id="selection" multi on-polymer-select="{{selectAction}}"></polymer-selection>
- </template>
- <script>
- Polymer('selection-example', {
- itemTapAction: function(e) {
- this.$.selection.select(e.target);
- },
- selectAction: function(e, detail) {
- detail.item.classList.toggle('selected', detail.isSelected);
- }
- });
- </script>
- </polymer-element>
-
- <selection-example>
- <li>Red</li>
- <li>Green</li>
- <li>Blue</li>
- </selection-example>
-
+ <img detector src="../polymer-home-page/bowager-logo.png" onerror="noviewer()">
+ <polymer-home-page ifviewer></polymer-home-page>
+ <div ifnoviewer>
+ <span id="remote">[remote]</span>
+ <iframe></iframe>
+ </div>
+ <!-- -->
+ <script>
+ var remoteDocs = 'http://turbogadgetry.com/bowertopia/components/';
+ // if no local info viewer, load it remotely
+ function noviewer() {
+ document.body.setAttribute('noviewer', '');
+ var path = location.pathname.split('/');
+ var module = path.pop() || path.pop();
+ document.querySelector('iframe').src = remoteDocs + module;
+ document.querySelector('title').textContent = module;
+ }
+ // for testing only
+ var opts = window.location.search;
+ if (opts.indexOf('noviewer') >= 0) {
+ noviewer();
+ }
+ </script>
</body>
-</html>
+</html>
\ No newline at end of file