2b21e91a2abcf90a7cb634041f2d833d05c50ddd
[Sone.git] / src / main / resources / templates / index.html
1 <%include include/head.html>
2
3         <script language="javascript">
4                 /* register input field/textarea swap. */
5                 $(document).ready(function() {
6                         registerInputTextareaSwap("#sone input.createpost", "What are you doing?");
7                         registerInputTextareaSwap("#sone input.create-reply", "Write a Reply…");
8
9                         /* hide all the “create reply” forms until a link is clicked. */
10                         commentElement = $("<div>Comment</div>").addClass("show-reply-form").click(function() {
11                         });
12                         $("#sone .post > .status-line .time").after(commentElement);
13                         $("#sone .post .create-reply").addClass("hidden");
14                 });
15         </script>
16
17         <h1><%= Page.Index.Page.Title|l10n|insert needle="{sone}" key=currentSone.name|html></h1>
18
19         <div>
20                 <form action="createPost.html" method="post">
21                         <div>
22                                 <label for="text"><%= Page.Index.Label.Text|l10n|html></label>
23                                 <input class="createpost" name="text" />
24                         </div>
25                         <div>
26                                 <button type="submit"><%= Page.Index.Button.Post|l10n|html></button>
27                         </div>
28                 </form>
29         </div>
30
31         <h1><%= Page.Index.PostList.Title|l10n|html></h1>
32
33         <div id="posts">
34                 <%foreach posts post>
35                         <%include include/viewPost.html>
36                 <%foreachelse>
37                         <div><%= Page.Index.PostList.Text.NoPostYet|l10n|html></div>
38                 <%/foreach>
39         </div>
40         
41         <h1><%= Page.Index.AddSone.Title|l10n|html></h1>
42         
43         <div><%= Page.Index.AddSone.Description|l10n|html></div>
44
45         <form action="addSone.html" method="post">
46                 <input type="hidden" name="formPassword" value="<% formPassword|html>" />
47                 <input id="addsone" type="text" name="request-uri" />
48                 <button type="submit"><%= Page.Index.AddSone.Button.Add|l10n|html></button>
49         </form>
50
51 <%include include/tail.html>