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

Side by Side Diff: third_party/polymer/v0_8/components/paper-drawer-panel/demo/index.html

Issue 1082403004: Import Polymer 0.8 and several key elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rerun reproduce.sh Created 5 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!doctype html>
2 <!--
3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
4 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS.txt
7 Code distributed by Google as part of the polymer project is also
8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt
9 -->
10 <html>
11 <head>
12 <title>paper-drawer-panel demo</title>
13
14 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximu m-scale=1.0">
15 <meta name="mobile-web-app-capable" content="yes">
16 <meta name="apple-mobile-web-app-capable" content="yes">
17
18 <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
19 <link rel="import" href="../../paper-styles/demo.css">
20 <link rel="import" href="../../paper-styles/default-theme.html">
21
22 <link rel="import" href="../paper-drawer-panel.html">
23
24 <style>
25 /* TODO: these colors should come from paper-styles/default-theme.html
26 once Polymer/polymer#1415 is fixed. */
27 paper-drawer-panel #drawer {
28 background-color: #3f51b5;
29 border-right: 1px solid #ccc;
30 }
31
32 paper-drawer-panel::shadow #drawer {
33 background-color: #3f51b5;
34 border-right: 1px solid #ccc;
35 }
36
37 paper-drawer-panel[right-drawer] #drawer {
38 border-left: 1px solid #ccc;
39 border-right: none;
40 }
41 paper-drawer-panel[right-drawer]::shadow #drawer {
42 border-left: 1px solid #ccc;
43 border-right: none;
44 }
45
46 paper-drawer-panel #main { background-color: #c5cae9 }
47 paper-drawer-panel::shadow #main { background-color: #c5cae9; }
48
49 button {
50 width: 160px;
51 height: 40px;
52 font-size: 16px;
53 margin: 8px;
54 }
55
56 </style>
57
58 </head>
59
60 <body>
61
62 <paper-drawer-panel id="coreDrawerPanel">
63 <div drawer></div>
64 <div main>
65 <div>
66 <button onclick="flipDrawer()">flip drawer</button>
67 </div>
68 <div>
69 <button paper-drawer-toggle>toggle drawer</button>
70 </div>
71 </div>
72 </paper-drawer-panel>
73
74 <script>
75 (function(global) {
76
77 'use strict';
78
79 var DRAWER_ATTR = 'right-drawer';
80
81 var cdp = document.getElementById('coreDrawerPanel');
82
83 global.flipDrawer = function() {
84 if (cdp.hasAttribute(DRAWER_ATTR)) {
85 cdp.removeAttribute(DRAWER_ATTR);
86 } else {
87 cdp.setAttribute(DRAWER_ATTR, '');
88 }
89 }
90
91 }(this));
92 </script>
93
94 </body>
95 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698