From 8abf1c607aa41886992496adf58dd8debd1d0a2e Mon Sep 17 00:00:00 2001 From: VG Date: Sat, 29 Nov 2014 00:03:28 +0100 Subject: Factorize templates base and add background color --- static/base.css | 3 +++ views/bad_format.tpl | 8 +------- views/bad_request.tpl | 8 +------- views/base.tpl | 10 ++++++++++ views/not_found.tpl | 8 +------- views/paste.tpl | 9 +-------- views/root.tpl | 10 +--------- 7 files changed, 18 insertions(+), 38 deletions(-) create mode 100644 static/base.css create mode 100644 views/base.tpl diff --git a/static/base.css b/static/base.css new file mode 100644 index 0000000..5dc464e --- /dev/null +++ b/static/base.css @@ -0,0 +1,3 @@ +html { + background-color: #002b36; +} 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 @@ - - -Bad paste format requested - - +% rebase('base.tpl', title='Bad paste format requested')

Hello

I do not understand the format you are trying to get for the past requested. Please try again with either colored or raw

- - 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 @@ - - -Bad request (400) - - +% rebase('base.tpl', title='Bad request (400)')

Hello

I don't know how to manage your request.

If you think that your request was valid, please report this issue

I'm sorry for you, but nonetheless I whish you a very good day.

- - 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 @@ + + + {{title or 'No title'}} + + + + +{{!base}} + + 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 @@ - - -Paste not available - - +% rebase('base.tpl', title='Paste not available')

Hello

I wanted to display you a paste, but I did not find it. There can be two reason for this:

@@ -12,5 +8,3 @@ reason for this:

I'm sorry for you, but nonetheless I whish you a very good day.

- - diff --git a/views/paste.tpl b/views/paste.tpl index 814cccf..6867e11 100644 --- a/views/paste.tpl +++ b/views/paste.tpl @@ -1,9 +1,2 @@ - - -Paste snippets - - - +% rebase('base.tpl', title='Paste snippets') {{!content}} - - 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 @@ - - -Paste snippets - - - +% 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: - - - -- cgit v1.2.3