words/src/main/webapp/pages/index.html
changeset 46 009537e6ce80
parent 39 43c71f709cc8
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/words/src/main/webapp/pages/index.html	Thu Aug 15 13:17:54 2013 +0200
     1.3 @@ -0,0 +1,83 @@
     1.4 +<!--
     1.5 +
     1.6 +    The MIT License (MIT)
     1.7 +
     1.8 +    Copyright (C) 2013 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
     1.9 +
    1.10 +    Permission is hereby granted, free of charge, to any person obtaining a copy
    1.11 +    of this software and associated documentation files (the "Software"), to deal
    1.12 +    in the Software without restriction, including without limitation the rights
    1.13 +    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    1.14 +    copies of the Software, and to permit persons to whom the Software is
    1.15 +    furnished to do so, subject to the following conditions:
    1.16 +
    1.17 +    The above copyright notice and this permission notice shall be included in
    1.18 +    all copies or substantial portions of the Software.
    1.19 +
    1.20 +    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    1.21 +    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    1.22 +    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    1.23 +    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    1.24 +    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    1.25 +    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    1.26 +    THE SOFTWARE.
    1.27 +
    1.28 +-->
    1.29 +<!DOCTYPE html>
    1.30 +<html>
    1.31 +    <head>
    1.32 +        <title></title>
    1.33 +        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    1.34 +
    1.35 +        <style type="text/css">
    1.36 +            @-webkit-keyframes spin {
    1.37 +                0% { -webkit-transform: rotate(0deg); }
    1.38 +                100% { -webkit-transform: rotate(360deg); }
    1.39 +            }
    1.40 +
    1.41 +            .rotate {
    1.42 +                -webkit-animation-name: spin;
    1.43 +                -webkit-animation-duration: 3s;
    1.44 +                -webkit-animation-iteration-count: infinite;
    1.45 +                -webkit-animation-direction: alternate;
    1.46 +            }
    1.47 +
    1.48 +            #scene {
    1.49 +                position: relative;
    1.50 +                top: 60px;
    1.51 +                text-align: center;
    1.52 +            }
    1.53 +            
    1.54 +            #words span {
    1.55 +                border: 1px solid #ccc;
    1.56 +                background: rgba(255,255,155,0.8);
    1.57 +                text-align: center;
    1.58 +                font-size: 30px;                
    1.59 +                -webkit-box-shadow: inset 0 0 40px rgba(0,0,0,0.4);
    1.60 +                position: absolute;
    1.61 +            }
    1.62 +
    1.63 +            #words span:nth-child(1) { left: 45%; top: 0px; }
    1.64 +            #words span:nth-child(2) { left: 25%; top: 100px; }
    1.65 +            #words span:nth-child(3) { left: 65%; top: 100px; }
    1.66 +            #words span:nth-child(4) { left: 10%; top: 200px; }
    1.67 +            #words span:nth-child(5) { left: 45%; top: 200px; }
    1.68 +            #words span:nth-child(6) { left: 80%; top: 200px; }
    1.69 +            
    1.70 +        </style>
    1.71 +
    1.72 +    </head>
    1.73 +    <body>
    1.74 +        <h1>Words Demo</h1>
    1.75 +        <input data-bind="value: message, valueUpdate: 'afterkeydown'" size="80">
    1.76 +        <br>
    1.77 +        <button data-bind="enable: !on(), click: $root.turnOn">Start</button>
    1.78 +        <button data-bind="enable: on, click: $root.turnOff">Stop</button>
    1.79 +
    1.80 +        <div id="scene">
    1.81 +            <span id="words" data-bind="foreach: sides">
    1.82 +                <span data-bind="text: $data, css: { 'rotate' : $root.on } "></span>
    1.83 +            </span>
    1.84 +        </div>
    1.85 +    </body>
    1.86 +</html>