Merge branch 'master' of ssh://git.stuve-bamberg.de:22222/asauer/gruppenbildungsspiel
This commit is contained in:
commit
156dcf8431
@ -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:
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
........ <img src="WIAIlogo.png" alt="Fachschaft WIAI"/>
|
||||
........ <h1>SPIEL des Lebens</h1>
|
||||
<img src="static/images/WIAILogo.png" alt="Fachschaft WIAI" class="logo"/>
|
||||
<h1>Das Spiel der 1001 Möglichkeiten</h1>
|
||||
</header>
|
||||
<nav>
|
||||
<ul>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user