Last active
August 29, 2015 14:16
-
-
Save banksean/faf5f012fd3253a910ec to your computer and use it in GitHub Desktop.
designer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-pages/core-pages.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<link rel="import" href="../core-icons/maps-icons.html"> | |
<polymer-element name="my-element" properties="page_id"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; | |
box-sizing: border-box; | |
} | |
#core_scaffold { | |
position: absolute; | |
top: 0px; | |
right: 0px; | |
bottom: 0px; | |
left: 0px; | |
} | |
#core_header_panel { | |
background-color: rgb(255, 255, 255); | |
} | |
#core_toolbar { | |
color: rgb(255, 255, 255); | |
background-color: rgb(79, 125, 201); | |
} | |
#core_menu { | |
font-size: 16px; | |
} | |
</style> | |
<core-scaffold id="core_scaffold" responsiveWidth="1200px"> | |
<core-header-panel mode="seamed" id="core_header_panel" navigation flex> | |
<core-toolbar id="core_toolbar"></core-toolbar> | |
<core-menu valueattr="label" valueattr="id" selected="chromium_item" id="core_menu" theme="core-light-theme"> | |
<core-submenu id="help_item" icon="help" label="Help" on-core-select="{{ menuSelected }}"> | |
<core-item id="help_links_item" label="Useful Links" horizontal center layout></core-item> | |
<core-item id="help_howto_item" label="How to Sheriff" horizontal center layout></core-item> | |
<core-item id="help_calendar_item" label="Rotation Calendar" horizontal center layout></core-item> | |
</core-submenu> | |
<core-submenu id="trees_item" icon="folder" label="Trees" on-core-select="{{ menuSelected }}"> | |
<core-item id="blink_item" label="Blink" horizontal center layout></core-item> | |
<core-item id="chromium_item" selected label="Chromium" horizontal center layout></core-item> | |
<core-item id="chromium_perf_item" label="Chromium Perf" horizontal center layout></core-item> | |
</core-submenu> | |
<core-submenu id="trooper_item" icon="settings" label="Trooper" on-core-select="{{ menuSelected }}"> | |
<core-item id="trooper_alerts_item" label="Alerts" horizontal center layout></core-item> | |
<core-item id="trooper_misc_item" label="Misc" horizontal center layout></core-item> | |
</core-submenu> | |
</core-menu> | |
</core-header-panel> | |
<div id="div" tool>Sheriff-O-Matic: {{ page_title }}</div> | |
<div> | |
<core-pages valueattr="tab-id" selected="chromium_item" id="core_pages"> | |
<div tab-id="help_links_item" title="Helpful URLs"> | |
Some urls... | |
</div> | |
<div tab-id="help_howto_item" title="How to Sheriff"> | |
How to sheriff... | |
</div> | |
<div tab-id="help_calendar_item" title="Calendar"> | |
<iframe src="https://chromium-build.appspot.com/static/rotations.html" width="100%" height="500px"></iframe> | |
</div> | |
<div tab-id="blink_item" title="Blink"> | |
<iframe src="https://sheriff-o-matic.appspot.com/blink" width="100%" height="500px"></iframe> | |
</div> | |
<div tab-id="chromium_item" title="Chromium"> | |
<iframe src="https://sheriff-o-matic.appspot.com/chromium" width="100%" height="500px"></iframe> | |
</div> | |
<div tab-id="chromium_perf_item" title="Chromium Perf"> | |
<iframe src="https://sheriff-o-matic.appspot.com/chromium.perf" width="100%" height="500px"></iframe> | |
</div> | |
<div tab-id="trooper_alerts_item" title="Trooper Alerts"> | |
<iframe src="https://sheriff-o-matic.appspot.com/trooper" width="100%" height="500px"></iframe> | |
</div> | |
<div tab-id="trooper_misc_item" title="Trooper Misc"> | |
<iframe src="https://sheriff-o-matic.appspot.com/trooper-fyi" width="100%" height="500px"></iframe> | |
</div> | |
</core-pages> | |
</div> | |
</core-scaffold> | |
</template> | |
<script> | |
Polymer({ | |
page_id: "chromium_tree", | |
page_title: "Chromium", | |
menuSelected: function() { | |
if (event.target.selectedItem) { | |
console.log(event.target.selectedItem.id); | |
this.$.core_pages.selected = event.target.selectedItem.id; | |
this.page_id = this.$.core_pages.selected; | |
this.page_title = event.target.selectedItem.label; | |
this.$.core_scaffold.closeDrawer(); | |
} else { | |
console.log(['no selectedItem:', event.target]); | |
} | |
} | |
}); | |
</script> | |
</polymer-element> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment