summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/bad_format.tpl8
-rw-r--r--views/bad_request.tpl8
-rw-r--r--views/base.tpl10
-rw-r--r--views/not_found.tpl8
-rw-r--r--views/paste.tpl13
-rw-r--r--views/root.tpl10
6 files changed, 19 insertions, 38 deletions
diff --git a/views/bad_format.tpl b/views/bad_format.tpl
index 6efdab8..dbf1376 100644
--- a/views/bad_format.tpl
+++ b/views/bad_format.tpl
@@ -1,10 +1,4 @@
-<html>
-<head>
-<title>Bad paste format requested</title>
-</head>
-<body>
+% rebase('base.tpl', title='Bad paste format requested')
<h2>Hello</h2>
<p>I do not understand the format you are trying to get for the past
requested. Please try again with either <i>colored</i> or <i>raw</i></p>
-</body>
-</html>
diff --git a/views/bad_request.tpl b/views/bad_request.tpl
index e21eddc..813e433 100644
--- a/views/bad_request.tpl
+++ b/views/bad_request.tpl
@@ -1,13 +1,7 @@
-<html>
-<head>
-<title>Bad request (400)</title>
-</head>
-<body>
+% rebase('base.tpl', title='Bad request (400)')
<h2>Hello</h2>
<p>I don't know how to manage your request.</p>
<p>If you think that your request was valid, please report this issue</p>
<p>I'm sorry for you, but <i>nonetheless</i> I whish you a very good day.</p>
-</body>
-</html>
diff --git a/views/base.tpl b/views/base.tpl
new file mode 100644
index 0000000..f3c3744
--- /dev/null
+++ b/views/base.tpl
@@ -0,0 +1,10 @@
+<html>
+<head>
+ <title>{{title or 'No title'}}</title>
+ <link rel="stylesheet" href="/static/pygments.css" />
+ <link rel="stylesheet" href="/static/base.css" />
+</head>
+<body>
+{{!base}}
+</body>
+</html>
diff --git a/views/not_found.tpl b/views/not_found.tpl
index 50a41db..93d4ad5 100644
--- a/views/not_found.tpl
+++ b/views/not_found.tpl
@@ -1,8 +1,4 @@
-<html>
-<head>
-<title>Paste not available</title>
-</head>
-<body>
+% rebase('base.tpl', title='Paste not available')
<h2>Hello</h2>
<p>I wanted to display you a paste, but I did not find it. There can be two
reason for this:</p>
@@ -12,5 +8,3 @@ reason for this:</p>
</ul>
<p>I'm sorry for you, but <i>nonetheless</i> I whish you a very good day.</p>
-</body>
-</html>
diff --git a/views/paste.tpl b/views/paste.tpl
index 814cccf..56902a4 100644
--- a/views/paste.tpl
+++ b/views/paste.tpl
@@ -1,9 +1,6 @@
-<html>
-<head>
-<title>Paste snippets</title>
-<link rel="stylesheet" href="/static/pygments.css" />
-</head>
-<body>
+% rebase('base.tpl', title='Paste snippets')
{{!content}}
-</body>
-</html>
+<div id="floatingmenu">
+<a href="/">Paste something again</a><br />
+<a href="/{{pid}}/raw">Raw format</a><br />
+</div>
diff --git a/views/root.tpl b/views/root.tpl
index 53c6393..b9acec8 100644
--- a/views/root.tpl
+++ b/views/root.tpl
@@ -1,9 +1,4 @@
-<html>
-<head>
-<title>Paste snippets</title>
-</head>
-<body>
-
+% rebase('base.tpl', title='Paste snippets')
You are on a simple paste deposit service.
Please copy your text on the box below:
@@ -14,6 +9,3 @@ Please copy your text on the box below:
<button for="content">Paste</button>
</form>
-
-</body>
-</html>