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

Unified Diff: polymer_1.0.4/bower_components/paper-scroll-header-panel/demo/sample-content.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, 6 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: polymer_1.0.4/bower_components/paper-scroll-header-panel/demo/sample-content.html
diff --git a/polymer_0.5.0/bower_components/core-scroll-header-panel/demos/sample-content.html b/polymer_1.0.4/bower_components/paper-scroll-header-panel/demo/sample-content.html
similarity index 71%
copy from polymer_0.5.0/bower_components/core-scroll-header-panel/demos/sample-content.html
copy to polymer_1.0.4/bower_components/paper-scroll-header-panel/demo/sample-content.html
index 4e0099238e722d75036bdf5b031c24479537b7d1..e325fe26b29d87d0e5e0e6e2a9b126a5b42f1293 100644
--- a/polymer_0.5.0/bower_components/core-scroll-header-panel/demos/sample-content.html
+++ b/polymer_1.0.4/bower_components/paper-scroll-header-panel/demo/sample-content.html
@@ -1,13 +1,18 @@
<!--
- @license
- Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
- Code distributed by Google as part of the polymer project is also
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
+@license
+Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
+This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
+The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
+Code distributed by Google as part of the polymer project is also
+subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
-<polymer-element name="sample-content" attributes="size">
+<dom-module id="sample-content">
+ <template>
+ <div id="content"></div>
+ </template>
+</dom-module>
+
<script>
(function() {
@@ -37,14 +42,21 @@
return String.fromCharCode(65 + Math.floor(Math.random() * 26));
}
- Polymer('sample-content', {
+ Polymer({
+ is: 'sample-content',
- size: 0,
+ properties: {
+ size: {
+ type: Number,
+ value: 0,
+ observer: 'sizeChanged'
+ }
+ },
sizeChanged: function() {
- this.innerHTML = '';
+ var html = '';
for (var i = 0; i < this.size; i++) {
- this.innerHTML +=
+ html +=
'<div style="border: 1px solid #bebebe; padding: 16px; margin: 16px; border-radius: 5px; background-color: #fff; color: #555;">' +
'<div style="display: inline-block; height: 64px; width: 64px; border-radius: 50%; background: #ddd; line-height: 64px; font-size: 30px; color: #666; text-align: center;">'+ randomLetter() + '</div>' +
'<div style="font-size: 22px; padding: 8px 0 16px; color: #888;">' + randomString() + '</div>' +
@@ -52,11 +64,9 @@
'<div style="font-size: 12px;">' + randomString() + '</div>' +
'<div style="font-size: 12px;">' + randomString() + '</div>' +
'</div>';
+ this.$.content.innerHTML = html;
}
}
-
});
})();
-
</script>
-</polymer-element>

Powered by Google App Engine
This is Rietveld 408576698