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
|
from flask import Flask, render_template
|
||||||
|
import uuid
|
||||||
|
import csv
|
||||||
|
import os
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.jinja_env.trim_blocks = True
|
app.jinja_env.trim_blocks = True
|
||||||
app.jinja_env.lstrip_blocks = True
|
app.jinja_env.lstrip_blocks = True
|
||||||
|
|
||||||
|
datafile = "data.csv"
|
||||||
|
|
||||||
@app.route('/')
|
@app.route('/')
|
||||||
def index():
|
def index():
|
||||||
|
generate_id()
|
||||||
return render_template('index.html', title='Test', text='Hallo, Fooboar')
|
return render_template('index.html', title='Test', text='Hallo, Fooboar')
|
||||||
|
|
||||||
@app.route('/form')
|
@app.route('/form')
|
||||||
@ -27,3 +34,11 @@ def answers():
|
|||||||
def solution():
|
def solution():
|
||||||
return render_template('solution.html', title='Test', text='Hallo, Lösung')
|
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 */
|
||||||
header{
|
header{
|
||||||
display: block;
|
display: block;
|
||||||
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Navigation bar */
|
/* Navigation bar */
|
||||||
@ -71,3 +72,14 @@ li a{
|
|||||||
.btn-group button:hover {
|
.btn-group button:hover {
|
||||||
background-color: #3e8e41;
|
background-color: #3e8e41;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* logo image class */
|
||||||
|
.logo {
|
||||||
|
width: 10%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* headline for header */
|
||||||
|
header h1 {
|
||||||
|
display: inline;
|
||||||
|
vertical-align: center;
|
||||||
|
}
|
||||||
|
|||||||
@ -7,9 +7,9 @@
|
|||||||
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
|
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
........ <img src="WIAIlogo.png" alt="Fachschaft WIAI"/>
|
<img src="static/images/WIAILogo.png" alt="Fachschaft WIAI" class="logo"/>
|
||||||
........ <h1>SPIEL des Lebens</h1>
|
<h1>Das Spiel der 1001 Möglichkeiten</h1>
|
||||||
</header>
|
</header>
|
||||||
<nav>
|
<nav>
|
||||||
<ul>
|
<ul>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user