diff options
Diffstat (limited to 'template')
-rw-r--r-- | template/.whisper.html.un~ | bin | 0 -> 523 bytes | |||
-rw-r--r-- | template/edit.html | 20 | ||||
-rw-r--r-- | template/page.html | 37 | ||||
-rw-r--r-- | template/whisper.html | 10 |
4 files changed, 67 insertions, 0 deletions
diff --git a/template/.whisper.html.un~ b/template/.whisper.html.un~ Binary files differnew file mode 100644 index 0000000..70eaf48 --- /dev/null +++ b/template/.whisper.html.un~ diff --git a/template/edit.html b/template/edit.html new file mode 100644 index 0000000..bc8cea0 --- /dev/null +++ b/template/edit.html @@ -0,0 +1,20 @@ +<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"/> + <a style="float:right; color:red" href="{url}/delete.py?w={whisper_id}">删除</a> + </form> +</div> +</body> +</html>
\ No newline at end of file diff --git a/template/page.html b/template/page.html new file mode 100644 index 0000000..672be2c --- /dev/null +++ b/template/page.html @@ -0,0 +1,37 @@ +<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> +<script> +window.onload = function() +{{ + var dates = document.getElementsByClassName("whisper_date"); + for(var i = 0; i < dates.length; i++) + {{ + var d = dates[i]; + var tstamp = parseInt(d.getAttribute("date")); + var day = new Date(tstamp * 1000); + var timestr = day.toLocaleString(); + d.innerHTML = timestr; + }} +}} +</script> +<div id="container"> + <img src="{url}{static}/logo.png" id="logo"/> + <br/> + <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.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/template/whisper.html b/template/whisper.html new file mode 100644 index 0000000..ae7ede4 --- /dev/null +++ b/template/whisper.html @@ -0,0 +1,10 @@ +<div class="whisper_unit whisper_unit_{oddoreven}"> + <div class="whisper_content"> + {content} + </div> + <div class="whisper_date" date="{date}"></div> + <div class="whisper_edit"> + <a href="{url}/edit.py?w={id}">[编辑]</a> + </div> + <div style="clear:both"></div> +</div> |