Update {virtual,override,final} to follow C++11 style.
[chromium-blink-merge.git] / third_party / polymer / components / core-animated-pages / demos / music.html
blob769bf0ac22a5e604eb79afecfda3c80150264ef0
1 <!--
2 @license
3 Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
4 This code may only be used under the BSD style license found at http://polymer.github.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/CONTRIBUTORS.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/PATENTS.txt
9 -->
10 <!doctype html>
11 <html>
12 <head>
13 <title>core-animated-pages</title>
15 <script src="../../webcomponentsjs/webcomponents.js"></script>
16 <link href="../core-animated-pages.html" rel="import">
18 <style>
19 body {
20 font-family: 'Roboto 2', 'Helvetica Neue', Helvetica, Arial, sans-serif;
21 margin: 0;
22 background: #f1f1f1;
25 .green {
26 position: absolute;
27 top: 0;
28 right: 0;
29 left: 0;
30 height: 350px;
31 background: #70c26f;
33 </style>
34 </head>
35 <body>
37 <polymer-element name="music-demo">
38 <template>
40 <style>
41 .chip-container {
42 position: absolute;
43 top: 275px;
44 right: 0;
45 left: 0;
46 text-align: center;
49 .chip {
50 display: inline-block;
51 position: relative;
52 border-radius: 3px;
53 margin: 4px;
54 overflow: hidden;
55 text-align: start;
56 background-color: #fff;
57 box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.16);
60 .chip-top {
61 width: 200px;
62 height: 200px;
65 .chip-bottom {
66 padding: 8px;
67 line-height: 1.5;
70 .chip-album-title {
71 font-weight: bold;
74 #details {
75 padding: 200px 10% 0;
78 .card {
79 height: 400px;
80 border-radius: 3px;
81 text-align: start;
82 overflow: hidden;
83 background: #fff;
84 box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.19);
87 .card-left {
88 width: 400px;
91 .card-right {
92 padding: 24px;
95 .card-icon {
96 border-radius: 50%;
97 width: 60px;
98 height: 60px;
99 margin-right: 16px;
102 .card-album-title {
103 font-size: 2em;
105 </style>
107 <core-animated-pages selected="{{page}}" transitions="hero-transition" on-core-animated-pages-transition-end="{{complete}}">
109 <section>
111 <div class="chip-container" hero-p on-tap="{{transition}}">
113 <template repeat="{{items as item}}">
115 <div class="chip" hero-id="{{item.artist}}-{{item.album}}" hero?="{{selectedAlbum === item }}">
116 <div class="chip-top" style="background:{{item.color}};" hero-id="{{item.artist}}-{{item.album}}-art" hero?="{{selectedAlbum === item}}"></div>
117 <div class="chip-bottom">
118 <div class="chip-album-title">{{item.album}}</div>
119 <div class="chip-artist">{{item.artist}}</div>
120 </div>
121 </div>
123 </template>
125 </div>
126 </section>
128 <section id="details">
130 <div class="card" layout horizontal hero-id="{{selectedAlbum.artist}}-{{selectedAlbum.album}}" hero on-tap="{{transition}}">
131 <div class="card-left" style="background:{{selectedAlbum.color}};" hero-id="{{selectedAlbum.artist}}-{{selectedAlbum.album}}-art" hero></div>
132 <div class="card-right" flex>
133 <div layout horizontal center>
134 <div>
135 <div class="card-icon" style="background:{{selectedAlbum.color}};"></div>
136 </div>
137 <div flex>
138 <div class="card-album-title">{{selectedAlbum.album}}</div>
139 <div class="card-album-artist">{{selectedAlbum.artist}}</div>
140 </div>
141 </div>
142 </div>
143 </div>
145 </section>
147 </core-animated-pages>
149 </template>
150 <script>
152 Polymer('music-demo', {
154 page: 0,
156 items: [
157 { artist: 'Tycho', album: 'Fragments', color: '#f4db33' },
158 { artist: 'Tycho', album: 'Past Prologue', color: '#972ff8' },
159 { artist: 'Tycho', album: 'Spectre', color: '#7dd6fe' },
160 { artist: 'Tycho', album: 'Awake', color: '#dc3c84' }
163 selectedAlbum: null,
165 transition: function(e) {
166 if (this.page === 0 && e.target.templateInstance.model.item) {
167 this.selectedAlbum = e.target.templateInstance.model.item;
168 this.page = 1;
169 } else {
170 this.page = 0;
175 </script>
176 </polymer-element>
178 <div class="green"></div>
180 <music-demo></music-demo>
181 </body>
182 </html>