summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2016-07-08 20:04:32 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2016-07-08 20:04:32 +0200
commit47652149374cf253554a3d11b01ef0a304a11186 (patch)
tree7581af3ef2835690bb1f7268bbd8e090d60b36c6
parent358d69d4ba9b4f54dd2ecd31c3b4ede964b3f39d (diff)
downloadjokevote-47652149374cf253554a3d11b01ef0a304a11186.tar.gz
jokevote-47652149374cf253554a3d11b01ef0a304a11186.zip
abstract use case
-rw-r--r--app.py1
-rw-r--r--config-template.py3
-rw-r--r--templates/index.html8
3 files changed, 7 insertions, 5 deletions
diff --git a/app.py b/app.py
index 0beab92..bd9f087 100644
--- a/app.py
+++ b/app.py
@@ -546,6 +546,7 @@ def page(num):
perpage=perpage,
jokes=jokes,
abusemail=config['abusemail'],
+ title=config['title'],
user=user))
resp.headers.set('X-SmoothState-Location',
request.path + "?" +
diff --git a/config-template.py b/config-template.py
index 347e5c9..f673bff 100644
--- a/config-template.py
+++ b/config-template.py
@@ -2,5 +2,6 @@ config = {
'secret_key': b'',
'debug': False,
'superuser': 'admin',
- 'abusemail': 'admin@host.example.com'
+ 'abusemail': 'admin@host.example.com',
+ 'title': 'My awesome voting page'
}
diff --git a/templates/index.html b/templates/index.html
index 812bf55..ae1eaa4 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -2,7 +2,7 @@
<!doctype html>
<html lang="de">
<head>
- <title>Lehrerspruch-Wahlplattform</title>
+ <title>{{ title }}</title>
<link rel="stylesheet" type="text/css" href="/static/materialize.min.css">
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<meta charset="utf-8">
@@ -15,7 +15,7 @@
<header>
<div class="navbar-fixed">
<nav class="nav-wrapper">
- <a href="#" class="hide-on-small-only left brand-logo">Lehrersprüche</a>
+ <a href="#" class="hide-on-small-only left brand-logo">{{ title }}</a>
<ul class="right">
<li>
{% if user.loggedin %}
@@ -137,7 +137,7 @@
<input type="hidden" name="id" value="{{ joke.id }}">
<button type="button" class="btn-floating right blue noteditor" onclick="openEditor(this)"><i class="material-icons">edit</i></button>
<div class="input-field hide editor">
- <label for="text">Spruch bearbeiten</label>
+ <label for="text">Inhalt bearbeiten</label>
<textarea class="materialize-textarea" name="text">{{ joke.text }}</textarea>
<button type="submit" class="btn-floating right blue"><i class="material-icons">done</i></button>
</div>
@@ -179,7 +179,7 @@
</div>
<form id="modal-submit" class="modal bottom-sheet" action="/submit{{ query() }}" method="post">
<div class="modal-content">
- <h4>Spruch hinzufügen</h4>
+ <h4>Inhalt hinzufügen</h4>
<p>Du kannst <em>/kursiv/</em>, <b>*fett*</b> schreiben, und <a>#Tags</a> verwenden.</p>
<div class="input-field">
<textarea class="materialize-textarea" name="text"></textarea>