Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(804)

Unified Diff: pkg/polymer/lib/elements/polymer-ui-scaffold/polymer-ui-scaffold.html

Issue 175443005: [polymer] import all elements (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: updated from bower Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/polymer/lib/elements/polymer-ui-scaffold/polymer-ui-scaffold.html
diff --git a/pkg/polymer/lib/elements/polymer-ui-scaffold/polymer-ui-scaffold.html b/pkg/polymer/lib/elements/polymer-ui-scaffold/polymer-ui-scaffold.html
new file mode 100644
index 0000000000000000000000000000000000000000..088b1e5acfe0ea9bdd98e6fc9f90b7aa4cba285d
--- /dev/null
+++ b/pkg/polymer/lib/elements/polymer-ui-scaffold/polymer-ui-scaffold.html
@@ -0,0 +1,148 @@
+<!--
+Copyright 2013 The Polymer Authors. All rights reserved.
+Use of this source code is governed by a BSD-style
+license that can be found in the LICENSE file.
+-->
+
+<!--
+/**
+* Polymer UI Elements
+*
+* @module Polymer UI Elements
+*/
+/**
+ * @class polymer-ui-scaffold
+ */
+-->
+<link rel="import" href="../polymer/polymer.html">
+<link rel="import" href="../polymer-grid-layout/polymer-grid-layout.html">
+<link rel="import" href="../polymer-ui-toolbar/polymer-ui-toolbar.html">
+<link rel="import" href="../polymer-ui-icon-button/polymer-ui-icon-button.html">
+
+<polymer-element name="polymer-ui-scaffold" attributes="menuActive hideMenuButton">
+ <template>
+ <link rel="stylesheet" href="polymer-ui-scaffold.css">
+ <polymer-grid-layout id="grid"></polymer-grid-layout>
+ <section class="animate" offscreen="basement">
+ <content select="[navigation]"></content>
+ </section>
+ <polymer-ui-toolbar class="animate">
+ <polymer-ui-icon-button icon="menu" hidden?="{{hideMenuButton}}" on-tap="{{menuActionTap}}" active="{{menuActive}}"></polymer-ui-icon-button>
+ <content select="[tool]"></content>
+ </polymer-ui-toolbar>
+ <section class="animate">
+ <content select="*"></content>
+ </section>
+ </template>
+ <script>
+ (function() {
+ Polymer('polymer-ui-scaffold', {
+ menuActive: false,
+ hideMenuButton: false,
+ layouts: {
+ main:[
+ [2, 2],
+ [3, 3],
+ [3, 3]
+ ],
+ menu: [
+ [1, 2, 2],
+ [1, 3, 3],
+ [1, 3, 3]
+ ]
+ },
+ ready: function() {
+ this.$.grid.layout = this.layouts.main;
+ },
+ menuActionTap: function() {
+ this.menuActive = !this.menuActive;
+ Platform.flush();
+ },
+ menuActiveChanged: function() {
+ this.$.grid.layout = this.layouts[this.menuActive ? 'menu' : 'main'];
+ }
+ });
+ })();
+ </script>
+</polymer-element>
+
+<polymer-element name="polymer-ui-scaffold2" attributes="">
+ <template>
+ <link rel="stylesheet" href="polymer-ui-scaffold.css">
+ <polymer-grid-layout id="grid"></polymer-grid-layout>
+ <section>
+ <content select="[navigation]"></content>
+ </section>
+ <polymer-ui-toolbar class="animate">
+ <content select="[tool]"></content>
+ </polymer-ui-toolbar>
+ <section class="animate">
+ <content select="[main]"></content>
+ </section>
+ </template>
+ <script>
+ (function() {
+ Polymer('polymer-ui-scaffold2', {
+ menuActive: false,
+ layouts: {
+ main:[
+ [3, 3, 1],
+ [3, 3, 1],
+ [2, 2, 1]
+ ]
+ },
+ ready: function() {
+ this.$.grid.layout = this.layouts.main;
+ },
+ });
+ })();
+ </script>
+</polymer-element>
+
+<polymer-element name="polymer-ui-scaffold3" attributes="menuActive hideMenuButton">
+ <template>
+ <link rel="stylesheet" href="polymer-ui-scaffold.css">
+ <polymer-grid-layout id="grid"></polymer-grid-layout>
+ <section class="animate" style="z-index: 10;" offscreen="left">
+ <content select="[navigation]"></content>
+ </section>
+ <section id="scrim" on-tap="{{menuActionTap}}" offscreen="right"></section>
+ <polymer-ui-toolbar offscreen="basement">
+ <polymer-ui-icon-button icon="menu" hidden?="{{hideMenuButton}}" on-tap="{{menuActionTap}}" active="{{menuActive}}"></polymer-ui-icon-button>
+ <content select="[tool]"></content>
+ </polymer-ui-toolbar>
+ <section offscreen="basement">
+ <content select="*"></content>
+ </section>
+ </template>
+ <script>
+ (function() {
+ Polymer('polymer-ui-scaffold3', {
+ menuActive: false,
+ hideMenuButton: false,
+ layouts: {
+ main:[
+ [3, 3],
+ [4, 4],
+ [4, 4]
+ ],
+ menu: [
+ [1, 2],
+ [1, 2],
+ [1, 2]
+ ]
+ },
+ ready: function() {
+ this.$.grid.layout = this.layouts.main;
+ },
+ menuActionTap: function() {
+ this.menuActive = !this.menuActive;
+ Platform.flush();
+ },
+ menuActiveChanged: function() {
+ this.$.grid.layout = this.layouts[this.menuActive ? 'menu' : 'main'];
+ }
+ });
+ })();
+ </script>
+</polymer-element>

Powered by Google App Engine
This is Rietveld 408576698