diff options
Diffstat (limited to 'cgi-bin/template')
-rw-r--r-- | cgi-bin/template/edit.html | 19 | ||||
-rw-r--r-- | cgi-bin/template/page.html | 34 | ||||
-rw-r--r-- | cgi-bin/template/whisper.html | 6 |
3 files changed, 48 insertions, 11 deletions
diff --git a/cgi-bin/template/edit.html b/cgi-bin/template/edit.html index e69de29..27a3dd0 100644 --- a/cgi-bin/template/edit.html +++ b/cgi-bin/template/edit.html @@ -0,0 +1,19 @@ +<html> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<title>whisper</title> +<body> +<link rel="stylesheet" href="{url}{static}/style.css" type="text/css" /> +<script src="{url}{static}/ckeditor/ckeditor.js"></script> +<div id="container"> + <img src="{url}{static}/logo.png" id="logo"/> + <br/> + <form action="{url}/add.py?action=modify" method="post" class="form_add"> + <input type="hidden" name="whisper_id" value="{whisper_id}"/> + <textarea name="whisper_content" id="editor" class="ckeditor" rows="5" cols="20"> + {whisper_content} + </textarea> + <input type="submit" value=" 推 " class="submit"/> + </form> +</div> +</body> +</html>
\ No newline at end of file diff --git a/cgi-bin/template/page.html b/cgi-bin/template/page.html index 3620ac9..b87a6b0 100644 --- a/cgi-bin/template/page.html +++ b/cgi-bin/template/page.html @@ -2,22 +2,36 @@ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>whisper</title> <body> -<link rel="stylesheet" href="{url}{static}style.css" type="text/css" /> -<script src="{url}{static}ckeditor/ckeditor.js"></script> -<div id="container"> - <img src="{url}{static}logo.png" id="logo"/> +<link rel="stylesheet" href="{url}{static}/style.css" type="text/css" /> +<script src="{url}{static}/ckeditor/ckeditor.js"></script> +<script> +// window.onload = function() +// { + // var dates = document.getElementsByClassName("whisper_date"); + // for(var i = 0; i < dates.length; i++) + // { + // var d = dates[i]; + // var tstamp = d.date; + // var day = new Date(tstamp); + // var timestr = day.toLocaleString(); + // d.innerHTML = timestr; + // } +//} +</script> +<div id="container"> + <img src="{url}{static}/logo.png" id="logo"/> <br/> - <form action="{url}insert" method="post" class="form_add"> - <textarea name="issue_description" id="editor" class="ckeditor" rows="5" cols="20"> - </textarea><br/> - <input type="submit" value="提交" class="submit"/> + <form action="{url}/add.py?action=new" method="post" class="form_add"> + <textarea name="whisper_content" id="editor" class="ckeditor" rows="5" cols="20"> + </textarea> + <input type="submit" value=" 推 " class="submit"/> </form> <!--whispers--> {whispers} <!--whispers end--> <br/> - <a href="{url}page?p={page_prev}" id="pagejump_prev" class="pagejump"><上一页</a> - <a href="{url}page?p={page_next}" id="pagejump_next" class="pagejump">下一页></a> + <a href="{url}/page.py?p={page_prev}" id="pagejump_prev" class="pagejump"><上一页</a> + <a href="{url}/page.py?p={page_next}" id="pagejump_next" class="pagejump">下一页></a> </div> </body> </html> diff --git a/cgi-bin/template/whisper.html b/cgi-bin/template/whisper.html index 1488170..ca09bb7 100644 --- a/cgi-bin/template/whisper.html +++ b/cgi-bin/template/whisper.html @@ -2,7 +2,11 @@ <div class="whisper_content"> {content} </div> - <div class="whisper_date"> + <div class="whisper_date" date="{date}"> {date} </div> + <div class="whisper_edit"> + <a href="{url}/edit.py?w={id}">[编辑]</a> + </div> + <div style="clear:both"></div> </div>
\ No newline at end of file |