summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-01-25 01:00:18 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2010-01-25 01:00:18 +0100
commit346b22ddf795f9a5a10ddc6b83bfa3bc15c8d30a (patch)
treef9d9251ea08bc8ad57e7234ca451bcc3eeccc7b5 /templates
Initial commit.
Diffstat (limited to 'templates')
-rw-r--r--templates/__init__.py3
-rw-r--r--templates/base.tmpl22
-rw-r--r--templates/paste.tmpl28
-rw-r--r--templates/view.tmpl22
4 files changed, 75 insertions, 0 deletions
diff --git a/templates/__init__.py b/templates/__init__.py
new file mode 100644
index 0000000..1dd71e0
--- /dev/null
+++ b/templates/__init__.py
@@ -0,0 +1,3 @@
+from list import list
+from paste import paste
+from view import view
diff --git a/templates/base.tmpl b/templates/base.tmpl
new file mode 100644
index 0000000..55b420e
--- /dev/null
+++ b/templates/base.tmpl
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <title>$title</title>
+ <link rel="StyleSheet" href="/static/paste.css" type="text/css" />
+#block head
+#end block
+ </head>
+ <body>
+ <div id="page">
+ <div id="page-header">
+ <h1><a href="/">$header</a></h1>
+ </div>
+ <div id="page-content">
+#block content
+#end block
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/templates/paste.tmpl b/templates/paste.tmpl
new file mode 100644
index 0000000..0a201fe
--- /dev/null
+++ b/templates/paste.tmpl
@@ -0,0 +1,28 @@
+#extends templates.base
+#def head
+ <script src="/static/edit.js" type="text/javascript"></script>
+#end def
+#def content
+ <form action="/paste" method="post" id="pasteform">
+ <ul>
+ <li id="syntaxli">
+ <select name="syntax" id="syntax">
+#for cat, ls in $lexers
+ <optgroup label="$cat">
+#for k, v in $ls
+ <option value="$v">$k</option>
+#end for
+ </optgroup>
+#end for
+ </select>
+ </li>
+ <li><input type="text" name="nick" id="nick" value="Anonymous" /></li>
+ <li><input type="text" name="title" id="title" value="Untitled" /></li>
+ <li><textarea rows="15" cols="80" name="text" id="text"></textarea></li>
+ <li>
+ <input type="submit" id="pastesubmit" name="type" value="Paste" />
+ <input type="submit" id="pastesubmit2" name="type" value="Preview" />
+ </li>
+ </ul>
+ </form>
+#end def
diff --git a/templates/view.tmpl b/templates/view.tmpl
new file mode 100644
index 0000000..898a08e
--- /dev/null
+++ b/templates/view.tmpl
@@ -0,0 +1,22 @@
+#extends templates.base
+#def head
+ <link rel="StyleSheet" href="/highlight_stylesheet" type="text/css" />
+#end def
+#def content
+ <p><a href="/">New paste</a></p>
+ <div id="paste">
+ <h3>$pastetitle</h3>
+ <div id="info">Pasted by <span id="nick">$nick</span> on <span id="date">$date</span>#slurp
+#if $syntax
+ as <span id="syntax-type">$syntax</span>#slurp
+#end if
+.
+</div>
+ <div id="alt-links">
+#if $hash
+ <a href="/raw/$hash">Download as plain text</a>
+#end if
+ </div>
+ $text
+ </div>
+#end def