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

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: probably nothing (oh app engine you joker) Created 6 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 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 <script src="packages/polymer/src/js/use_native_dartium_shadowdom.js"></script>< script src="packages/web_components/platform.js"></script>
46 <!-- <link rel="import" href="../polymer-dev/polymer.html"> -->
47
48 <script src="packages/polymer/src/js/polymer/polymer.js"></script><polymer-eleme nt name="polymer-body" extends="body">
49
50 <script>
51
52 // upgrade polymer-body last so that it can contain other imported elements
53 document.addEventListener('polymer-ready', function() {
54
55 Polymer('polymer-body', Platform.mixin({
56
57 created: function() {
58 this.template = document.createElement('template');
59 var body = wrap(document).body;
60 var c$ = body.childNodes.array();
61 for (var i=0, c; (c=c$[i]); i++) {
62 if (c.localName !== 'script') {
63 this.template.content.appendChild(c);
64 }
65 }
66 // snarf up user defined model
67 window.model = this;
68 },
69
70 parseDeclaration: function(elementElement) {
71 this.lightFromTemplate(this.template);
72 }
73
74 }, window.model));
75
76 });
77
78 </script>
79
80 </polymer-element><script src="packages/web_components/dart_support.js"></script ><polymer-element name="tute-stopwatch">
81
82 <template>
83 <style>
84 :host {
85 background-color: LemonChiffon;
86 text-align: center;
87 display: inline-block;
88 border: solid 1px;
89 padding: 10px 10px 10px 10px;
90 }
91 </style>
92 <div>
93 <div>
94 {{counter}}
95 </div>
96 <div>
97 <button on-click="{{start}}" id="startButton">Start</button>
98 <button on-click="{{stop}}" id="stopButton">Stop</button>
99 <button on-click="{{reset}}" id="resetButton">Reset</button>
100 </div>
101 </div>
102 </template>
103
104
105
106 </polymer-element>
107
108
109 <h1>Stopwatch</h1>
110
111 <tute-stopwatch></tute-stopwatch>
112
113
114
115
116 <script src="index.html_bootstrap.dart.js"></script></body></html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698