Merge branch 'master' of ssh://git.stuve-bamberg.de:22222/asauer/gruppenbildungsspiel

This commit is contained in:
Amma 2019-04-11 22:00:58 +02:00
commit 156dcf8431
3 changed files with 30 additions and 3 deletions

View File

@ -1,10 +1,17 @@
from flask import Flask, render_template
import uuid
import csv
import os
app = Flask(__name__)
app.jinja_env.trim_blocks = True
app.jinja_env.lstrip_blocks = True
datafile = "data.csv"
@app.route('/')
def index():
generate_id()
return render_template('index.html', title='Test', text='Hallo, Fooboar')
@app.route('/form')
@ -27,3 +34,11 @@ def answers():
def solution():
return render_template('solution.html', title='Test', text='Hallo, Lösung')
def generate_id():
data = list()
new_id = uuid.uuid1().split("-")[0]
if not os.path.exists(datafile):
open(datafile, "a").close()
with open(datafile, "r") as f:

View File

@ -6,6 +6,7 @@ html{
/* Header */
header{
display: block;
vertical-align: middle;
}
/* Navigation bar */
@ -71,3 +72,14 @@ li a{
.btn-group button:hover {
background-color: #3e8e41;
}
/* logo image class */
.logo {
width: 10%;
}
/* headline for header */
header h1 {
display: inline;
vertical-align: center;
}

View File

@ -7,9 +7,9 @@
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
</head>
<body>
<header>
........ <img src="WIAIlogo.png" alt="Fachschaft WIAI"/>
........ <h1>SPIEL des Lebens</h1>
<header>
<img src="static/images/WIAILogo.png" alt="Fachschaft WIAI" class="logo"/>
<h1>Das Spiel der 1001 Möglichkeiten</h1>
</header>
<nav>
<ul>