ko/kosample/client/src/main/webapp/pages/index.html
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Wed, 27 Apr 2016 06:14:49 +0200
changeset 1947 12a252145892
parent 1941 621825e167d7
permissions -rw-r--r--
Automatic testing of sample knockout based bck2brwsr application
     1 <!--
     2 
     3     Back 2 Browser Bytecode Translator
     4     Copyright (C) 2012-2015 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
     5 
     6     This program is free software: you can redistribute it and/or modify
     7     it under the terms of the GNU General Public License as published by
     8     the Free Software Foundation, version 2 of the License.
     9 
    10     This program is distributed in the hope that it will be useful,
    11     but WITHOUT ANY WARRANTY; without even the implied warranty of
    12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13     GNU General Public License for more details.
    14 
    15     You should have received a copy of the GNU General Public License
    16     along with this program. Look for COPYING file in the top folder.
    17     If not, see http://opensource.org/licenses/GPL-2.0.
    18 
    19 -->
    20 <!DOCTYPE html>
    21 <html>
    22     <head>
    23         <title></title>
    24         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    25         <style type="text/css">
    26             @-webkit-keyframes spin {
    27                 0% { -webkit-transform: rotate(0deg); }
    28                 100% { -webkit-transform: rotate(360deg); }
    29             }
    30             @keyframes spin {
    31                 0% { transform: rotate(0deg); }
    32                 100% { transform: rotate(360deg); }
    33             }
    34 
    35             input {
    36                 width: 100%;
    37             }
    38 
    39             .rotate {
    40                 -webkit-animation-name: spin;
    41                 -webkit-animation-duration: 3s;
    42                 -webkit-animation-iteration-count: infinite;
    43                 -webkit-animation-direction: alternate;
    44                 animation-name: spin;
    45                 animation-duration: 3s;
    46                 animation-iteration-count: infinite;
    47                 animation-direction: alternate;
    48             }
    49 
    50             #scene {
    51                 position: relative;
    52                 top: 60px;
    53                 text-align: center;
    54             }
    55 
    56             #words span {
    57                 border: 1px solid #ccc;
    58                 background: rgba(255,255,155,0.8);
    59                 text-align: center;
    60                 font-size: 30px;
    61                 -webkit-box-shadow: inset 0 0 40px rgba(0,0,0,0.4);
    62                 box-shadow: inset 0 0 40px rgba(0,0,0,0.4);
    63                 position: absolute;
    64             }
    65 
    66             #words span:nth-child(1) { left: 45%; top: 0px; }
    67             #words span:nth-child(2) { left: 25%; top: 100px; }
    68             #words span:nth-child(3) { left: 65%; top: 100px; }
    69             #words span:nth-child(4) { left: 10%; top: 200px; }
    70             #words span:nth-child(5) { left: 45%; top: 200px; }
    71             #words span:nth-child(6) { left: 80%; top: 200px; }
    72 
    73         </style>
    74     </head>
    75     <body>
    76         <h1>Words Demo</h1>
    77         <input data-bind="textInput:  message">
    78         <br>
    79         <button data-bind="enable: !rotating(), click: $root.turnAnimationOn">Start</button>
    80         <button data-bind="enable: rotating, click: $root.turnAnimationOff">Stop</button>
    81         <button data-bind="enable: !rotating(), click: $root.rotate5s">Rotate Few Seconds</button>
    82         <button data-bind="click: $root.showScreenSize">Screen Size!</button>
    83         <button id='beginTest' data-bind="click: $root.beginTest">Automatic Test</button>
    84 
    85         <div id="scene">
    86             <span id="words" data-bind="foreach: words">
    87                 <span data-bind="text: $data, css: { 'rotate' : $root.rotating } "></span>
    88             </span>
    89         </div>
    90 <!-- ${browser.bootstrap} -->
    91     </body>
    92 </html>