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

Side by Side Diff: src/site/docs/tutorials/polymer-intro/examples/stopwatch/web/index.html

Issue 275613002: Update polymer tutorial; make directory paths match new sample structure (Closed) Base URL: https://github.com/dart-lang/dartlang.org.git@master
Patch Set: Created 6 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 <!-- Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 for details. All rights reserved. Use of this source code is governed by a
3 BSD-style license that can be found in the LICENSE file.
4 --><!DOCTYPE html><html><head>
5 <meta charset="utf-8">
6 <title>Stopwatch</title>
7
8
9
10 </head>
11
12 <body><style>
13 body {
14 background-color: #F8F8F8;
15 font-family: 'Open Sans', sans-serif;
16 font-size: 14pt;
17 font-weight: normal;
18 margin: 15px;
19 }
20
21 p {
22 color: #333;
23 }
24
25 </style>
26
27 <!--
28 These two files are from the Polymer project:
29 https://github.com/Polymer/platform/ and https://github.com/Polymer/polymer/.
30
31 You can replace platform.js and polymer.html with different versions if desired.
32 -->
33 <!-- minified for deployment: -->
34
35
36
37 <!-- unminfied for debugging:
38 <script src="../../packages/web_components/platform.concat.js"></script>
39 <script src="src/js/polymer/polymer.concat.js"></script>
40 <link rel="import" href="src/js/polymer/polymer-body.html">
41 -->
42
43 <!-- Teach dart2js about Shadow DOM polyfill objects. -->
44
45
46 <!-- Bootstrap the user application in a new isolate. -->
47
48 <!-- TODO(sigmund): replace boot.js by boot.dart (dartbug.com/18007)
49 <script type="application/dart">export "package:polymer/boot.dart";</script>
50 -->
51 <script src="packages/polymer/src/js/use_native_dartium_shadowdom.js"></script>< script src="packages/web_components/platform.js"></script>
52 <!-- <link rel="import" href="../polymer-dev/polymer.html"> -->
53 <script src="packages/polymer/src/js/polymer/polymer.js"></script><polymer-eleme nt name="polymer-body" extends="body">
54
55 <script>
56
57 // upgrade polymer-body last so that it can contain other imported elements
58 document.addEventListener('polymer-ready', function() {
59
60 Polymer('polymer-body', Platform.mixin({
61
62 created: function() {
63 this.template = document.createElement('template');
64 var body = wrap(document).body;
65 var c$ = body.childNodes.array();
66 for (var i=0, c; (c=c$[i]); i++) {
67 if (c.localName !== 'script') {
68 this.template.content.appendChild(c);
69 }
70 }
71 // snarf up user defined model
72 window.model = this;
73 },
74
75 parseDeclaration: function(elementElement) {
76 this.lightFromTemplate(this.template);
77 }
78
79 }, window.model));
80
81 });
82
83 </script>
84
85 </polymer-element><script src="packages/web_components/dart_support.js"></script ><polymer-element name="tute-stopwatch">
86
87 <template>
88 <style>
89 :host {
90 background-color: LemonChiffon;
91 text-align: center;
92 display: inline-block;
93 border: solid 1px;
94 padding: 10px 10px 10px 10px;
95 }
96 </style>
97 <div>
98 <div>
99 {{counter}}
100 </div>
101 <div>
102 <button on-click="{{start}}" id="startButton">Start</button>
103 <button on-click="{{stop}}" id="stopButton">Stop</button>
104 <button on-click="{{reset}}" id="resetButton">Reset</button>
105 </div>
106 </div>
107 </template>
108
109
110
111 </polymer-element>
112
113
114 <h1>Stopwatch</h1>
115
116 <tute-stopwatch></tute-stopwatch>
117
118
119
120 <script src="index.html_bootstrap.dart.js"></script></body></html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698