diff options
| author | Christian Weiske <cweiske@cweiske.de> | 2012-03-25 21:08:29 +0200 |
|---|---|---|
| committer | Christian Weiske <cweiske@cweiske.de> | 2012-03-25 21:08:29 +0200 |
| commit | 6d0777840e50ce98f3d96629b4e92bbdccd3001c (patch) | |
| tree | 161a753bf54b4fec0c4357b16dc68ff838e20383 /data | |
| parent | 568bf6f9a487a3dc33ce52e45cd31cfbea2cb79e (diff) | |
| download | phorkie-6d0777840e50ce98f3d96629b4e92bbdccd3001c.tar.gz phorkie-6d0777840e50ce98f3d96629b4e92bbdccd3001c.zip | |
first code that allows you to create pastes and view them
Diffstat (limited to 'data')
| -rw-r--r-- | data/config.default.php | 6 | ||||
| -rw-r--r-- | data/templates/base.htm | 17 | ||||
| -rw-r--r-- | data/templates/display.htm | 16 | ||||
| -rw-r--r-- | data/templates/index.htm | 25 |
4 files changed, 64 insertions, 0 deletions
diff --git a/data/config.default.php b/data/config.default.php index e69de29..ec68622 100644 --- a/data/config.default.php +++ b/data/config.default.php @@ -0,0 +1,6 @@ +<?php +$GLOBALS['phorkie']['cfg'] = array( + 'repos' => __DIR__ . '/../repos/', + 'tpl' => __DIR__ . '/templates/', +); +?>
\ No newline at end of file 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 |
