better style

This commit is contained in:
Sebastian Hugentobler 2015-05-18 16:09:11 +02:00
parent 4321607b7b
commit e0d7d339c9
6 changed files with 96 additions and 23 deletions

View File

@ -13,7 +13,7 @@ from datetime import datetime
from jinja2 import Environment, FileSystemLoader from jinja2 import Environment, FileSystemLoader
import sys import sys
reload(sys); sys.setdefaultencoding('utf-8') #reload(sys); sys.setdefaultencoding('utf-8')
def fromunixtime(value): def fromunixtime(value):
return datetime.fromtimestamp(value).strftime('%Y-%m-%d %H:%M:%S') return datetime.fromtimestamp(value).strftime('%Y-%m-%d %H:%M:%S')

View File

@ -3,7 +3,22 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width"> <meta name="viewport" content="width=device-width">
<link href="styles.css" rel="stylesheet" type="text/css" /> <style type="text/css">
body {
margin: 40px auto;
max-width: 650px;
line-height: 1.6;
font-size: 18px;
color: #444;
padding: 0 10px
}
h1,
h2,
h3 {
line-height: 1.2
}
</style>
<title>{{ title }}</title> <title>{{ title }}</title>
</head> </head>
<body> <body>

View File

@ -3,7 +3,22 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width"> <meta name="viewport" content="width=device-width">
<link href="styles.css" rel="stylesheet" type="text/css" /> <style type="text/css">
body {
margin: 40px auto;
max-width: 650px;
line-height: 1.6;
font-size: 18px;
color: #444;
padding: 0 10px
}
h1,
h2,
h3 {
line-height: 1.2
}
</style>
<title>{{ title }}</title> <title>{{ title }}</title>
</head> </head>
<body> <body>

View File

@ -3,7 +3,22 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width"> <meta name="viewport" content="width=device-width">
<link href="styles.css" rel="stylesheet" type="text/css" /> <style type="text/css">
body {
margin: 40px auto;
max-width: 650px;
line-height: 1.6;
font-size: 18px;
color: #444;
padding: 0 10px
}
h1,
h2,
h3 {
line-height: 1.2
}
</style>
<title>{{ title }}</title> <title>{{ title }}</title>
</head> </head>
<body> <body>

View File

@ -1,24 +1,37 @@
<!doctype html> <!doctype html>
<html> <html>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width"> <meta name="viewport" content="width=device-width">
<link href="styles.css" rel="stylesheet" type="text/css" /> <style type="text/css">
body {
margin: 40px auto;
max-width: 650px;
line-height: 1.6;
font-size: 18px;
color: #444;
padding: 0 10px
}
h1,
h2,
h3 {
line-height: 1.2
}
</style>
<title>{{ title }}</title> <title>{{ title }}</title>
</head> </head>
<body> <body>
<h1>{{ user.name }}</h1> <h1>{{ user.name }}</h1>
<h3>{{ user.status }}</h3> <h3>{{ user.status }}</h3>
<p> <p>
{% if user.registered %} {% if user.registered %} registered {{ user.registered | fromunixtime }} {% else %} unregistered {% endif %}
registered {{ user.registered | fromunixtime }}
{% else %}
unregistered
{% endif %}
</p> </p>
{% if user.signature %} {% if user.signature %}
<hr> <hr>
<i>{{ user.signature | tohtml }}</i> <i>{{ user.signature | tohtml }}</i> {% endif %}
{% endif %}
</body> </body>
</html> </html>

View File

@ -3,7 +3,22 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width"> <meta name="viewport" content="width=device-width">
<link href="styles.css" rel="stylesheet" type="text/css" /> <style type="text/css">
body {
margin: 40px auto;
max-width: 650px;
line-height: 1.6;
font-size: 18px;
color: #444;
padding: 0 10px
}
h1,
h2,
h3 {
line-height: 1.2
}
</style>
<title>{{ title }}</title> <title>{{ title }}</title>
</head> </head>
<body> <body>