From 46832b96a5ed60a1299f4450a01688d74e56d17e Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Fri, 24 Mar 2017 21:53:13 +0100 Subject: Replaced cheetah templates with jinja2 templates. --- templates/__init__.py | 3 --- templates/base.html | 20 ++++++++++++++++++++ templates/base.tmpl | 20 -------------------- templates/message.html | 5 +++++ templates/message.tmpl | 5 ----- templates/paste.html | 34 ++++++++++++++++++++++++++++++++++ templates/paste.tmpl | 34 ---------------------------------- templates/view.html | 26 ++++++++++++++++++++++++++ templates/view.tmpl | 29 ----------------------------- 9 files changed, 85 insertions(+), 91 deletions(-) delete mode 100644 templates/__init__.py create mode 100644 templates/base.html delete mode 100644 templates/base.tmpl create mode 100644 templates/message.html delete mode 100644 templates/message.tmpl create mode 100644 templates/paste.html delete mode 100644 templates/paste.tmpl create mode 100644 templates/view.html delete mode 100644 templates/view.tmpl (limited to 'templates') diff --git a/templates/__init__.py b/templates/__init__.py deleted file mode 100644 index defb657..0000000 --- a/templates/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -from paste import paste -from view import view -from message import message diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..196a03e --- /dev/null +++ b/templates/base.html @@ -0,0 +1,20 @@ + + + + {{ title }} + +{% block head %} +{% endblock %} + + +
+ +
+{% block content %} +{% endblock %} +
+
+ + diff --git a/templates/base.tmpl b/templates/base.tmpl deleted file mode 100644 index 6374752..0000000 --- a/templates/base.tmpl +++ /dev/null @@ -1,20 +0,0 @@ - - - - $title - -#block head -#end block - - -
- -
-#block content -#end block -
-
- - diff --git a/templates/message.html b/templates/message.html new file mode 100644 index 0000000..540b64a --- /dev/null +++ b/templates/message.html @@ -0,0 +1,5 @@ +{% extends "base.html" %} +{% block content %} +

New paste

+ {{ text }} +{% endblock %} diff --git a/templates/message.tmpl b/templates/message.tmpl deleted file mode 100644 index 9f69ebc..0000000 --- a/templates/message.tmpl +++ /dev/null @@ -1,5 +0,0 @@ -#extends templates.base -#def content -

New paste

- $text -#end def diff --git a/templates/paste.html b/templates/paste.html new file mode 100644 index 0000000..e22f76d --- /dev/null +++ b/templates/paste.html @@ -0,0 +1,34 @@ +{% extends "base.html" %} +{% block head %} + +{% endblock %} +{% block content %} +
+ +
+{% endblock %} diff --git a/templates/paste.tmpl b/templates/paste.tmpl deleted file mode 100644 index f9c9504..0000000 --- a/templates/paste.tmpl +++ /dev/null @@ -1,34 +0,0 @@ -#extends templates.base -#def head - -#end def -#def content -
- -
-#end def diff --git a/templates/view.html b/templates/view.html new file mode 100644 index 0000000..0a20a62 --- /dev/null +++ b/templates/view.html @@ -0,0 +1,26 @@ +{% extends "base.html" %} +{% block head %} + + +{% endblock %} +{% block content %} +

New paste

+
+

{{ pastetitle }}

+
Pasted by {{ nick }} on {{date }} + {% if syntax %} as {{ syntax }}{% endif %} +
+ + {% if rendered %} +
+ {% endif %} + {{ text }} + {% if rendered %} +
+ {% endif %} +
+{% endblock %} diff --git a/templates/view.tmpl b/templates/view.tmpl deleted file mode 100644 index a23c36e..0000000 --- a/templates/view.tmpl +++ /dev/null @@ -1,29 +0,0 @@ -#extends templates.base -#def head - - -#end def -#def content -

New paste

-
-

$pastetitle

-
Pasted by $nick on $date#slurp -#if $syntax - as $syntax#slurp -#end if -. -
- -#if $rendered -
-#end if - $text -#if $rendered -
-#end if -
-#end def -- cgit v1.2.3