aboutsummaryrefslogtreecommitdiff
path: root/data/templates
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2012-03-25 21:08:29 +0200
committerChristian Weiske <cweiske@cweiske.de>2012-03-25 21:08:29 +0200
commit6d0777840e50ce98f3d96629b4e92bbdccd3001c (patch)
tree161a753bf54b4fec0c4357b16dc68ff838e20383 /data/templates
parent568bf6f9a487a3dc33ce52e45cd31cfbea2cb79e (diff)
downloadphorkie-6d0777840e50ce98f3d96629b4e92bbdccd3001c.tar.gz
phorkie-6d0777840e50ce98f3d96629b4e92bbdccd3001c.zip
first code that allows you to create pastes and view them
Diffstat (limited to 'data/templates')
-rw-r--r--data/templates/base.htm17
-rw-r--r--data/templates/display.htm16
-rw-r--r--data/templates/index.htm25
3 files changed, 58 insertions, 0 deletions
diff --git a/data/templates/base.htm b/data/templates/base.htm
new file mode 100644
index 0000000..f406f00
--- /dev/null
+++ b/data/templates/base.htm
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <!--<link rel="stylesheet" href="phorkie.css" />-->
+ <title>{% block title %}{% endblock %} - Phorkie</title>
+ </head>
+ <body>
+ <nav>
+ <ul>
+ <a href="/">New paste</a>
+ <a href="/list">List all</a>
+ <a href="/search">Search</a>
+ </ul>
+ </nav>
+ <article>{% block content %}{% endblock %}</article>
+ </body>
+</html> \ No newline at end of file
diff --git a/data/templates/display.htm b/data/templates/display.htm
new file mode 100644
index 0000000..1f33b61
--- /dev/null
+++ b/data/templates/display.htm
@@ -0,0 +1,16 @@
+{% extends "base.htm" %}
+{% block title %}{{description}}{% endblock %}
+
+{% block content %}
+<h1>{{description}}</h1>
+<p><a href="{{links.edit}}">edit</a></p>
+{% for file in files %}
+<div>
+ <h2>{{file.filename}}</h2>
+ <p>
+ <a href="{{file.raw}}">raw</a>
+ </p>
+ <pre>{{file.content}}</pre>
+</div>
+{% endfor %}
+{% endblock %}
diff --git a/data/templates/index.htm b/data/templates/index.htm
new file mode 100644
index 0000000..eea509b
--- /dev/null
+++ b/data/templates/index.htm
@@ -0,0 +1,25 @@
+
+<form method="post" action="/">
+ <p>
+ <label for="description">Description</label>
+ <input type="text" name="description" id="description" value="{{description}}"/>
+ </p>
+ <p>
+ <label for="filename_1">Filename</label>
+ <input type="text" name="file[1][name]" id="filename_1" value="{{ file[1]['name'] }}"/>
+ </p>
+ <p>
+ <label for="type_1">Type</label>
+ <select name="file[1][type]" id="type_1">
+ <option value="css">CSS</option>
+ <option value="php">PHP</option>
+ <option value="xml">XML</option>
+ </select>
+ </p>
+ <p>
+ <textarea name="file[1][content]" id="content_1">{{ file[1]['content'] }}</textarea>
+ </p>
+ <p>
+ <input type="submit" value="Go"/>
+ </p>
+</form> \ No newline at end of file