Commit 93844cf5 authored by Sam Saccone's avatar Sam Saccone

Revert "Update homepage paper components"

This reverts commit 54107834.
parent cbfe598d
...@@ -53,29 +53,29 @@ ...@@ -53,29 +53,29 @@
</div> </div>
<div class="col-md-8"> <div class="col-md-8">
<h2>Examples</h2> <h2>Examples</h2>
<style is="custom-style"> <style shim-shadowdom>
paper-tabs {
--paper-tabs-selection-bar-color: #b12d2b;
}
paper-tab {
--paper-tab-ink: #b12d2b;
}
paper-tabs, core-toolbar { paper-tabs, core-toolbar {
color: rgb(53, 53, 53); color: rgb(53, 53, 53);
background-color: #f4f4f4; background-color: #f4f4f4;
font-family: 'Helvetica Neue', Helvetica, Arial; font-family: 'Helvetica Neue', Helvetica, Arial;
box-shadow: 0px 3px 2px rgba(0, 0, 0, 0.2); box-shadow: 0px 3px 2px rgba(0, 0, 0, 0.2);
} }
paper-tabs::shadow #selectionBar {
background-color: #b12d2b;
}
paper-tab::shadow paper-ripple#ink {
color: #b12d2b;
}
</style> </style>
<paper-tabs selected="{{selectedTab}}" class="js-app-tabs"> <paper-tabs selected="js" class="js-app-tabs">
<paper-tab data-target="js">JavaScript</paper-tab> <paper-tab name="js">JavaScript</paper-tab>
<paper-tab data-target="ctojs">Compile-to-JS</paper-tab> <paper-tab name="ctojs">Compile-to-JS</paper-tab>
<paper-tab data-target="labs">Labs</paper-tab> <paper-tab name="labs">Labs</paper-tab>
</paper-tabs> </paper-tabs>
<iron-pages selected="{{selectedTab}}" class="app-lists"> <div class="app-lists">
<div class="js-app-list" data-app-list="js"> <div class="js-app-list" data-app-list="js">
<p class="applist-intro"> <p class="applist-intro">
These are examples written in pure JavaScript. These are examples written in pure JavaScript.
...@@ -296,7 +296,7 @@ ...@@ -296,7 +296,7 @@
</ul> </ul>
</div> </div>
</iron-pages> </div>
<ul class="legend"> <ul class="legend">
<li><span class="label">R</span> = App also demonstrates routing</li> <li><span class="label">R</span> = App also demonstrates routing</li>
</ul> </ul>
......
...@@ -175,10 +175,9 @@ ...@@ -175,10 +175,9 @@
}]); }]);
function AppTabs() { function AppTabs() {
var tabs = document.querySelector(AppTabs.selectors.tabs) document.querySelector(AppTabs.selectors.tabs).addEventListener(
tabs.addEventListener('iron-select', this.onSelect.bind(this)); 'core-select', this.onSelect.bind(this));
this.listHeight = 0; this.listHeight = 0;
tabs.select(0);
} }
AppTabs.selectors = { AppTabs.selectors = {
...@@ -188,9 +187,14 @@ ...@@ -188,9 +187,14 @@
}; };
AppTabs.prototype.onSelect = function (e) { AppTabs.prototype.onSelect = function (e) {
var selected = e.currentTarget.selectedItem.dataset.target; var selected = e.target.selected;
[].slice.call(document.querySelectorAll(AppTabs.selectors.list)).forEach( [].slice.call(document.querySelectorAll(AppTabs.selectors.list)).forEach(
function (el) { function (el) {
if (!e.detail.isSelected) {
// Don't handle unselection events.
return;
}
var isSelected = el.dataset.appList === selected; var isSelected = el.dataset.appList === selected;
el.style.display = isSelected ? 'block' : 'none'; el.style.display = isSelected ? 'block' : 'none';
if (isSelected) { if (isSelected) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment