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

Side by Side Diff: polymer_1.0.4/bower_components/neon-animation/demo/declarative/index.html

Issue 1205703007: Add polymer 1.0 to npm_modules (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Renamed folder to 1.0.4 Created 5 years, 5 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>neon-animated-pages demo: declarative</title>
13
14 <meta charset="utf-8">
15 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
16 <meta name="viewport" content="width=device-width, minimum-scale=1.0, initia l-scale=1, user-scalable=yes">
17
18 <script src="../../../webcomponentsjs/webcomponents-lite.js"></script>
19
20 <link rel="import" href="../../../paper-styles/paper-styles.html">
21 <link rel="import" href="../../neon-animated-pages.html">
22 <link rel="import" href="../../neon-animatable.html">
23 <link rel="import" href="../../neon-animations.html">
24
25 <style>
26
27 body {
28 overflow: hidden;
29 }
30
31 .toolbar {
32 padding: 8px;
33 }
34
35 </style>
36
37 <style is="custom-style">
38
39 neon-animatable {
40 color: white;
41 @apply(--layout-horizontal);
42 @apply(--layout-center-center);
43 @apply(--paper-font-display4);
44 }
45
46 neon-animatable:nth-child(1) {
47 background: var(--paper-red-500);
48 }
49
50 neon-animatable:nth-child(2) {
51 background: var(--paper-blue-500);
52 }
53
54 neon-animatable:nth-child(3) {
55 background: var(--paper-orange-500);
56 }
57
58 neon-animatable:nth-child(4) {
59 background: var(--paper-green-500);
60 }
61
62 neon-animatable:nth-child(5) {
63 background: var(--paper-purple-500);
64 }
65
66 </style>
67
68 </head>
69 <body class="fullbleed layout vertical">
70
71 <template is="dom-bind">
72
73 <div class="toolbar">
74 <button on-click="_onPrevClick">&lt;&lt;</button>
75 <button on-click="_onNextClick">&gt;&gt;</button>
76 </div>
77
78 <neon-animated-pages id="pages" class="flex" selected="[[selected]]" entry -animation="[[entryAnimation]]" exit-animation="[[exitAnimation]]">
79 <neon-animatable>1</neon-animatable>
80 <neon-animatable>2</neon-animatable>
81 <neon-animatable>3</neon-animatable>
82 <neon-animatable>4</neon-animatable>
83 <neon-animatable>5</neon-animatable>
84 </neon-animated-pages>
85
86 </template>
87
88 <script>
89
90 var scope = document.querySelector('template[is="dom-bind"]');
91 scope.selected = 0;
92
93 scope._onPrevClick = function() {
94 this.entryAnimation = 'slide-from-left-animation';
95 this.exitAnimation = 'slide-right-animation';
96 this.selected = this.selected === 0 ? 4 : (this.selected - 1);
97 }
98
99 scope._onNextClick = function() {
100 this.entryAnimation = 'slide-from-right-animation';
101 this.exitAnimation = 'slide-left-animation';
102 this.selected = this.selected === 4 ? 0 : (this.selected + 1);
103 }
104
105 </script>
106
107 </body>
108 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698