Add name of input field to JavaScript function.
[Sone.git] / src / main / resources / templates / index.html
index 154ff3e..5dcda5a 100644 (file)
@@ -1,17 +1,21 @@
-<div id="sone">
+<%include include/head.html>
 
-       <h1><%= Page.Index.Page.Title|l10n|html></h1>
+       <script language="javascript">
+               /* register input field/textarea swap. */
+               $(document).ready(function() {
+                       registerInputTextareaSwap("#sone input.reply-input", "Write a Reply…", "text");
+                       addCommentLinks();
+               });
+       </script>
 
-       <div>
-               <form action="createPost.html" method="post">
-                       <div>
-                               <label for="text"><%= Page.Index.Label.Text|l10n|html></label>
-                               <textarea name="text"></textarea>
-                       </div>
-                       <div>
-                               <button type="submit"><%= Page.Index.Button.Post|l10n|html></button>
-                       </div>
-               </form>
+       <h1><%= Page.Index.PostList.Title|l10n|html></h1>
+
+       <div id="posts">
+               <%foreach posts post>
+                       <%include include/viewPost.html>
+               <%foreachelse>
+                       <div><%= Page.Index.PostList.Text.NoPostYet|l10n|html></div>
+               <%/foreach>
        </div>
 
-</div>
\ No newline at end of file
+<%include include/tail.html>