changeset 1273 | 37ad459579bc |
parent 1272 | 3ee4ec9577bc |
child 1274 | c4f83529954d |
1.1 --- a/ko/archetype/src/main/resources/archetype-resources/src/main/resources/index.html Mon Sep 09 15:26:12 2013 +0200 1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 1.3 @@ -1,90 +0,0 @@ 1.4 -<?xml version="1.0" encoding="UTF-8"?> 1.5 - 1.6 -<!-- 1.7 - Copied from knockout.js Twitter example: 1.8 - http://knockoutjs.com/examples/twitter.html 1.9 ---> 1.10 - 1.11 -<!DOCTYPE html> 1.12 -<html xmlns="http://www.w3.org/1999/xhtml"> 1.13 - <head> 1.14 - <title>Bck2Brwsr's Twitter</title> 1.15 - </head> 1.16 - <body> 1.17 - <link href='twitterExample.css' rel='Stylesheet' ></link> 1.18 - 1.19 - <style type='text/css'> 1.20 - .liveExample select { height: 1.7em; } 1.21 - .liveExample button { height: 2em; } 1.22 - </style> 1.23 - 1.24 - 1.25 - <h2>Bck2Brwsr's Twitter</h2> 1.26 - 1.27 - <p> 1.28 - This code is based on original 1.29 - <a href="http://knockoutjs.com/examples/twitter.html">knockout.js 1.30 - Twitter example</a> and 1.31 - uses almost unmodified HTML page. It just changes the model. The model 1.32 - is written in Java language with the help of 1.33 - <a href="http://bck2brwsr.apidesign.org/javadoc/net.java.html.json/"> 1.34 - Knockout/Java binding library 1.35 - </a>. The Java source code has about 180 lines and seems more 1.36 - dense and shorter than the original JavaScript model. 1.37 - </p> 1.38 - <p> 1.39 - The project has two profiles. Either it executes in real Java virtual 1.40 - machine and renders using JavaFX's WebView (use <code>fxbrwsr</code> profile 1.41 - - the default). It can also run directly in a browser via 1.42 - <a href="http://bck2brwsr.apidesign.org">Bck2Brwsr</a> virtual machine 1.43 - (use <code>bck2brwsr</code> profile). 1.44 - </p> 1.45 - 1.46 - <div class='liveExample'> 1.47 - <div class='configuration'> 1.48 - <div class='listChooser'> 1.49 - <button data-bind='click: deleteList, enable: activeTweetersName'>Delete</button> 1.50 - <button data-bind='click: saveChanges, enable: hasUnsavedChanges'>Save</button> 1.51 - <select data-bind='options: savedLists, optionsValue: "name", value: activeTweetersName'> </select> 1.52 - </div> 1.53 - 1.54 - <p>Currently viewing <span data-bind='text: activeTweetersCount'> </span> user(s):</p> 1.55 - <div class='currentUsers' > 1.56 - <ul data-bind='foreach: activeTweeters'> 1.57 - <li> 1.58 - <button data-bind='click: $root.removeUser'>Remove</button> 1.59 - <div data-bind='text: $data'> </div> 1.60 - </li> 1.61 - </ul> 1.62 - </div> 1.63 - 1.64 - <form data-bind='submit: addUser'> 1.65 - <label>Add user:</label> 1.66 - <input data-bind='value: userNameToAdd, valueUpdate: "keyup", css: { invalid: !userNameToAddIsValid() }' /> 1.67 - <button data-bind='enable: userNameToAddIsValid' type='submit'>Add</button> 1.68 - </form> 1.69 - </div> 1.70 - <div class='tweets'> 1.71 - <div class='loadingIndicator' data-bind="visible: loading">Loading...</div> 1.72 - <table data-bind='foreach: currentTweets' width='100%'> 1.73 - <tr> 1.74 - <td><img data-bind='attr: { src: profile_image_url }' /></td> 1.75 - <td> 1.76 - <a class='twitterUser' data-bind='attr: { href: userUrl }, text: from_user'> </a> 1.77 - <span data-bind='html: html'> </span> 1.78 - <div class='tweetInfo' data-bind='text: created_at'> </div> 1.79 - </td> 1.80 - </tr> 1.81 - </table> 1.82 - </div> 1.83 - </div> 1.84 - 1.85 - <script src="bck2brwsr.js"></script> 1.86 - <script type="text/javascript"> 1.87 - var vm = bck2brwsr('${artifactId}-${version}.jar'); 1.88 - vm.loadClass('${package}.TwitterClient'); 1.89 - </script> 1.90 - 1.91 - 1.92 - </body> 1.93 -</html>