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

Commit

Permalink
update landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott J. Miles committed Dec 13, 2013
1 parent e9d4ae7 commit bbe134f
Showing 1 changed file with 35 additions and 99 deletions.
134 changes: 35 additions & 99 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>polymer api</title>
Expand All @@ -8,121 +8,57 @@
white-space: nowrap;
overflow: hidden;
}
[nobowager] [ifnobowager], [noviewer] [ifnoviewer] {
[noviewer] [ifnoviewer] {
display: block;
}
[detector], [ifnobowager], [ifnoviewer], [nobowager] [ifbowager], [noviewer] [ifviewer] {
[detector], [ifnoviewer], [noviewer] [ifviewer] {
display: none;
}
img {
vertical-align: middle;
height: 22px;
padding: 0 4px 2px 0;
}
div {
display: inline-block;
}
h2 {
display: inline-block;
margin: 0px 6px;
vertical-align: middle;
}
.choiceB, .choiceC {
font-size: 0.8em;
display: inline-block;
white-space: nowrap;
padding: 0px 16px;
text-align: center;
text-transform: uppercase;
color: #eee;
border-radius: 23px;
}
.choiceB {
background-color: #BF8A30;
}
.choiceC {
background-color: #284B7E;
}
.choiceB:hover {
background-color: #C7F83E;
color: #222;
}
.choiceC:hover {
background-color: #C7F83E;
color: #222;
[ifviewer], [ifnoviewer] {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
a {
text-decoration: none;
iframe {
border: none;
margin: 0;
width: 100%;
height: 100%;
}
polymer-doc-viewer {
display: block;
#remote {
position: absolute;
top: 56px;
top: 0;
right: 0;
bottom: 0px;
left: 0;
border: 1px solid silver;
}
</style>
<script src="../platform/platform.js"></script>
<link rel="import" href="../polymer-doc-viewer/polymer-doc-viewer.html">
<link rel="import" href="../polymer-home-page/polymer-home-page.html">
</head>
<body>
<!-- detection-->
<img detector src="../Bowager/static/bowager-logo.png" onerror="nobowager()">
<img detector src="../polymer-doc-viewer/bowager-logo.png" onerror="noviewer()">
<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>
function nobowager() {
document.body.setAttribute('nobowager', '');
}
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
window.addEventListener('load', function() {
var opts = window.location.search;
if (opts.indexOf('viewer') >= 0) {
document.body.removeAttribute('noviewer');
}
if (opts.indexOf('bowager') >= 0) {
document.body.removeAttribute('nobowager');
}
if (opts.indexOf('noviewer') >= 0) {
document.body.setAttribute('noviewer', '');
}
if (opts.indexOf('nobowager') >= 0) {
document.body.setAttribute('nobowager', '');
}
});
</script>
<!-- -->
<h2>polymer api</h2>
<div ifnoviewer>
<p>See the <a target="_blank" href="http://itch.selfip.net/bowertopia/components/polymer-ajax/doc.html">remote docs.</a></p>
<p>Play with this element in the <a href="http://itch.selfip.net/bowertopia/designer/?element=polymer-ajax">remote sandbox.</a></p>
<p>See the <a target="_blank" href="smoke.html">smoke test.</a></p>
<hr>
<p>To access these tools locally, install the <code>polymer-catalog-tools</code> package.</p>
<code>bower install Polymer/polymer-catalog-tools</code>
<br>
<p ifbowager>
Or use <a ifbowager target="_blank" href="foo">one-click install <img src="../Bowager/static/bowager-logo.png" title="install via bowager"></a>
</p>
<p ifnobowager>
Pro tip: consider using Bowager for web-enabled installs.
</p>
</div>
<h2 ifviewer>
<a class="choiceB" target="_blank" id="sandbox">sandbox</a>
<a class="choiceC" target="_blank" href="smoke.html">smoke test</a>
<polymer-doc-viewer url="docs.json"></polymer-doc-viewer>
</h2>
<script>
var pathName = location.pathname.split('/');
moduleName = pathName.pop() || pathName.pop();
document.querySelector('title').textContent = moduleName;
document.querySelector('h2').textContent = moduleName;
document.querySelector('#sandbox').href = '../../designer/?element=' + moduleName;
var opts = window.location.search;
if (opts.indexOf('noviewer') >= 0) {
noviewer();
}
</script>
</body>
</html>
</html>

0 comments on commit bbe134f

Please sign in to comment.