From 4989a8e572ea666d3e392a503ee6831b8a9386f9 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Tue, 15 Feb 2011 23:04:18 +0100 Subject: Initial commit. --- templates/base.tmpl | 43 +++++++++++++++++++++++++++++++++++++++++++ templates/help.tmpl | 10 ++++++++++ templates/login.tmpl | 14 ++++++++++++++ templates/my.tmpl | 14 ++++++++++++++ templates/register.tmpl | 16 ++++++++++++++++ templates/upload.tmpl | 23 +++++++++++++++++++++++ templates/uploaded.tmpl | 11 +++++++++++ 7 files changed, 131 insertions(+) create mode 100644 templates/base.tmpl create mode 100644 templates/help.tmpl create mode 100644 templates/login.tmpl create mode 100644 templates/my.tmpl create mode 100644 templates/register.tmpl create mode 100644 templates/upload.tmpl create mode 100644 templates/uploaded.tmpl (limited to 'templates') diff --git a/templates/base.tmpl b/templates/base.tmpl new file mode 100644 index 0000000..5b710f8 --- /dev/null +++ b/templates/base.tmpl @@ -0,0 +1,43 @@ + + + + + $title + +#block head +#end block + + +
+ + +
+#block content +#end block +
+
+
+ + + diff --git a/templates/help.tmpl b/templates/help.tmpl new file mode 100644 index 0000000..48d12bc --- /dev/null +++ b/templates/help.tmpl @@ -0,0 +1,10 @@ +#def title: help +#def header: help +#extends templates.base +#def content +

Usage: POST to $scheme://$host/u with filedata given to "file" and original filename to "filename". + Login is sent by cookies with user id in "uid" and an identifier which is md5(uid+md5(password)).

+

cURL example: + curl -b 'uid=42; identifier=3858f62230ac3c915f300c664312c63f' -F 'file=@image.png' -F 'filename=image.png' http://myhost/u + Here user id is 42 and the password is "foobar".

+#end def diff --git a/templates/login.tmpl b/templates/login.tmpl new file mode 100644 index 0000000..6baee6c --- /dev/null +++ b/templates/login.tmpl @@ -0,0 +1,14 @@ +#def title: login +#def header: login +#extends templates.base +#def content +#set error = $error or '' +
$error
+
+

username

+

+

password

+

+

+
+#end def diff --git a/templates/my.tmpl b/templates/my.tmpl new file mode 100644 index 0000000..b1fb2cc --- /dev/null +++ b/templates/my.tmpl @@ -0,0 +1,14 @@ +#def title: myfiles +#def header: myfiles +#extends templates.base +#def content +

Your uploads:

+ +#end def diff --git a/templates/register.tmpl b/templates/register.tmpl new file mode 100644 index 0000000..2a9d1a9 --- /dev/null +++ b/templates/register.tmpl @@ -0,0 +1,16 @@ +#def title: register +#def header: register +#extends templates.base +#def content +#set error = $error or '' +
$error
+
+

username

+

+

password

+

+

repeat password

+

+

+
+#end def diff --git a/templates/upload.tmpl b/templates/upload.tmpl new file mode 100644 index 0000000..49b0212 --- /dev/null +++ b/templates/upload.tmpl @@ -0,0 +1,23 @@ +#def title: upload +#def header: upload +#extends templates.base +#def head + +#end def +#def content +
+ +

+

+
+#end def diff --git a/templates/uploaded.tmpl b/templates/uploaded.tmpl new file mode 100644 index 0000000..e36fc53 --- /dev/null +++ b/templates/uploaded.tmpl @@ -0,0 +1,11 @@ +#def title: upload +#def header: upload +#extends templates.base +#def content +

Your file has been uploaded: $scheme://$host/f/$hash/$filename. +#if $user +

Your file will also appear in your file list.

+#else +

If you were registered and logged in, your file would also appear in your file list.

+#end if +#end def -- cgit v1.2.3