jtulach@39
|
1 |
<!--
|
jtulach@39
|
2 |
|
jtulach@39
|
3 |
The MIT License (MIT)
|
jtulach@39
|
4 |
|
jtulach@39
|
5 |
Copyright (C) 2013 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
|
jtulach@39
|
6 |
|
jtulach@39
|
7 |
Permission is hereby granted, free of charge, to any person obtaining a copy
|
jtulach@39
|
8 |
of this software and associated documentation files (the "Software"), to deal
|
jtulach@39
|
9 |
in the Software without restriction, including without limitation the rights
|
jtulach@39
|
10 |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
jtulach@39
|
11 |
copies of the Software, and to permit persons to whom the Software is
|
jtulach@39
|
12 |
furnished to do so, subject to the following conditions:
|
jtulach@39
|
13 |
|
jtulach@39
|
14 |
The above copyright notice and this permission notice shall be included in
|
jtulach@39
|
15 |
all copies or substantial portions of the Software.
|
jtulach@39
|
16 |
|
jtulach@39
|
17 |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
jtulach@39
|
18 |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
jtulach@39
|
19 |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
jtulach@39
|
20 |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
jtulach@39
|
21 |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
jtulach@39
|
22 |
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
jtulach@39
|
23 |
THE SOFTWARE.
|
jtulach@39
|
24 |
|
jtulach@39
|
25 |
-->
|
jtulach@39
|
26 |
<!DOCTYPE html>
|
jtulach@39
|
27 |
<html>
|
jtulach@39
|
28 |
<head>
|
jtulach@39
|
29 |
<title></title>
|
jtulach@39
|
30 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
jtulach@39
|
31 |
|
jtulach@39
|
32 |
<style type="text/css">
|
jtulach@46
|
33 |
@-webkit-keyframes spin {
|
jtulach@46
|
34 |
0% { -webkit-transform: rotate(0deg); }
|
jtulach@46
|
35 |
100% { -webkit-transform: rotate(360deg); }
|
jtulach@39
|
36 |
}
|
jtulach@39
|
37 |
|
jtulach@46
|
38 |
.rotate {
|
jtulach@46
|
39 |
-webkit-animation-name: spin;
|
jtulach@46
|
40 |
-webkit-animation-duration: 3s;
|
jtulach@46
|
41 |
-webkit-animation-iteration-count: infinite;
|
jtulach@46
|
42 |
-webkit-animation-direction: alternate;
|
jtulach@46
|
43 |
}
|
jtulach@46
|
44 |
|
jtulach@46
|
45 |
#scene {
|
jtulach@46
|
46 |
position: relative;
|
jtulach@46
|
47 |
top: 60px;
|
jtulach@46
|
48 |
text-align: center;
|
jtulach@46
|
49 |
}
|
jtulach@46
|
50 |
|
jtulach@46
|
51 |
#words span {
|
jtulach@39
|
52 |
border: 1px solid #ccc;
|
jtulach@39
|
53 |
background: rgba(255,255,155,0.8);
|
jtulach@39
|
54 |
text-align: center;
|
jtulach@46
|
55 |
font-size: 30px;
|
jtulach@39
|
56 |
-webkit-box-shadow: inset 0 0 40px rgba(0,0,0,0.4);
|
jtulach@46
|
57 |
position: absolute;
|
jtulach@39
|
58 |
}
|
jtulach@39
|
59 |
|
jtulach@46
|
60 |
#words span:nth-child(1) { left: 45%; top: 0px; }
|
jtulach@46
|
61 |
#words span:nth-child(2) { left: 25%; top: 100px; }
|
jtulach@46
|
62 |
#words span:nth-child(3) { left: 65%; top: 100px; }
|
jtulach@46
|
63 |
#words span:nth-child(4) { left: 10%; top: 200px; }
|
jtulach@46
|
64 |
#words span:nth-child(5) { left: 45%; top: 200px; }
|
jtulach@46
|
65 |
#words span:nth-child(6) { left: 80%; top: 200px; }
|
jtulach@46
|
66 |
|
jtulach@39
|
67 |
</style>
|
jtulach@39
|
68 |
|
jtulach@39
|
69 |
</head>
|
jtulach@39
|
70 |
<body>
|
jtulach@46
|
71 |
<h1>Words Demo</h1>
|
jtulach@46
|
72 |
<input data-bind="value: message, valueUpdate: 'afterkeydown'" size="80">
|
jtulach@46
|
73 |
<br>
|
jtulach@46
|
74 |
<button data-bind="enable: !on(), click: $root.turnOn">Start</button>
|
jtulach@46
|
75 |
<button data-bind="enable: on, click: $root.turnOff">Stop</button>
|
jtulach@46
|
76 |
|
jtulach@46
|
77 |
<div id="scene">
|
jtulach@46
|
78 |
<span id="words" data-bind="foreach: sides">
|
jtulach@46
|
79 |
<span data-bind="text: $data, css: { 'rotate' : $root.on } "></span>
|
jtulach@46
|
80 |
</span>
|
jtulach@39
|
81 |
</div>
|
jtulach@39
|
82 |
</body>
|
jtulach@39
|
83 |
</html>
|