ko-archetype/src/main/resources/archetype-resources/src/main/resources/index.html
Better description and use substitution to generate the correct package, artifactId and version
1 <?xml version="1.0" encoding="UTF-8"?>
4 Copied from knockout.js Twitter example:
5 http://knockoutjs.com/examples/twitter.html
9 <html xmlns="http://www.w3.org/1999/xhtml">
11 <title>Bck2Brwsr's Twitter</title>
14 <link href='twitterExample.css' rel='Stylesheet' ></link>
16 <style type='text/css'>
17 .liveExample select { height: 1.7em; }
18 .liveExample button { height: 2em; }
22 <h2>Bck2Brwsr's Twitter</h2>
25 This code is based on original
26 <a href="http://knockoutjs.com/examples/twitter.html">knockout.js
27 Twitter example</a> and
28 uses almost unmodified HTML page. It just changes the model. The model
29 is written in Java language.The Java source code has about 190 lines
30 - in fact it may even be more dense than the original JavaScript model.
33 The project has two profiles. Either it executes in real Java virtual
34 machine and renders using JavaFX's WebView (use <code>fxbrwsr</code> profile
35 - the default). It can also run directly in a browser via
36 <a href="http://bck2brwsr.apidesign.org">Bck2Brwsr</a> virtual machine
37 (use <code>bck2brwsr</code> profile).
40 <div class='liveExample'>
41 <div class='configuration'>
42 <div class='listChooser'>
43 <button data-bind='click: deleteList, enable: activeTweetersName'>Delete</button>
44 <button data-bind='click: saveChanges, enable: hasUnsavedChanges'>Save</button>
45 <select data-bind='options: savedLists, optionsValue: "name", value: activeTweetersName'> </select>
48 <p>Currently viewing <span data-bind='text: activeTweetersCount'> </span> user(s):</p>
49 <div class='currentUsers' >
50 <ul data-bind='foreach: activeTweeters'>
52 <button data-bind='click: $root.removeUser'>Remove</button>
53 <div data-bind='text: $data'> </div>
58 <form data-bind='submit: addUser'>
59 <label>Add user:</label>
60 <input data-bind='value: userNameToAdd, valueUpdate: "keyup", css: { invalid: !userNameToAddIsValid() }' />
61 <button data-bind='enable: userNameToAddIsValid' type='submit'>Add</button>
65 <div class='loadingIndicator'>Loading...</div>
66 <table data-bind='foreach: currentTweets' width='100%'>
68 <td><img data-bind='attr: { src: profile_image_url }' /></td>
70 <a class='twitterUser' data-bind='attr: { href: userUrl }, text: from_user'> </a>
71 <span data-bind='html: html'> </span>
72 <div class='tweetInfo' data-bind='text: created_at'> </div>
79 <script src="bck2brwsr.js"></script>
80 <script type="text/javascript">
81 var vm = bck2brwsr('${artifactId}-${version}.jar');
82 vm.loadClass('${package}.TwitterClient');