From e0d7d339c9c81f5c9db3e58651b6ad6015144cdd Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Mon, 18 May 2015 16:09:11 +0200 Subject: [PATCH] better style --- generator.py | 2 +- templates/board.html.j2 | 17 +++++++++++++- templates/boards.html.j2 | 17 +++++++++++++- templates/thread.html.j2 | 17 +++++++++++++- templates/user.html.j2 | 49 +++++++++++++++++++++++++--------------- templates/users.html.j2 | 17 +++++++++++++- 6 files changed, 96 insertions(+), 23 deletions(-) diff --git a/generator.py b/generator.py index 1a30195..2059d95 100755 --- a/generator.py +++ b/generator.py @@ -13,7 +13,7 @@ from datetime import datetime from jinja2 import Environment, FileSystemLoader import sys -reload(sys); sys.setdefaultencoding('utf-8') +#reload(sys); sys.setdefaultencoding('utf-8') def fromunixtime(value): return datetime.fromtimestamp(value).strftime('%Y-%m-%d %H:%M:%S') diff --git a/templates/board.html.j2 b/templates/board.html.j2 index 7a93291..a03498e 100644 --- a/templates/board.html.j2 +++ b/templates/board.html.j2 @@ -3,7 +3,22 @@ - + {{ title }} diff --git a/templates/boards.html.j2 b/templates/boards.html.j2 index dfaa1c1..c0b9472 100644 --- a/templates/boards.html.j2 +++ b/templates/boards.html.j2 @@ -3,7 +3,22 @@ - + {{ title }} diff --git a/templates/thread.html.j2 b/templates/thread.html.j2 index 71fc3d8..e8a8e49 100644 --- a/templates/thread.html.j2 +++ b/templates/thread.html.j2 @@ -3,7 +3,22 @@ - + {{ title }} diff --git a/templates/user.html.j2 b/templates/user.html.j2 index 913cad3..77d4eb0 100644 --- a/templates/user.html.j2 +++ b/templates/user.html.j2 @@ -1,24 +1,37 @@ - + + - + {{ title }} - - -

{{ user.name }}

-

{{ user.status }}

-

- {% if user.registered %} - registered {{ user.registered | fromunixtime }} - {% else %} - unregistered - {% endif %} -

- {% if user.signature %} -
- {{ user.signature | tohtml }} - {% endif %} - + + + +

{{ user.name }}

+

{{ user.status }}

+

+ {% if user.registered %} registered {{ user.registered | fromunixtime }} {% else %} unregistered {% endif %} +

+ {% if user.signature %} +
+ {{ user.signature | tohtml }} {% endif %} + + diff --git a/templates/users.html.j2 b/templates/users.html.j2 index 5218c73..829e60d 100644 --- a/templates/users.html.j2 +++ b/templates/users.html.j2 @@ -3,7 +3,22 @@ - + {{ title }}