Create solution page and add home content
This commit is contained in:
parent
1d61a5ff18
commit
5292794178
@ -1,5 +1,7 @@
|
||||
from flask import Flask, render_template
|
||||
app = Flask(__name__)
|
||||
app.jinja_env.trim_blocks = True
|
||||
app.jinja_env.lstrip_blocks = True
|
||||
|
||||
@app.route('/')
|
||||
def index():
|
||||
@ -20,3 +22,8 @@ def admin():
|
||||
@app.route('/answers')
|
||||
def answers():
|
||||
return render_template('answers.html', title='Test', text='Hallo, Admin Fooboar')
|
||||
|
||||
@app.route('/solution')
|
||||
def solution():
|
||||
return render_template('solution.html', title='Test', text='Hallo, Lösung!')
|
||||
|
||||
|
||||
@ -3,16 +3,17 @@
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>{{ title }}</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='main.css') }}"
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='main.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="{{ url_for('index') }}">Home</a></li>
|
||||
<li><a href="{{ url_for('form') }}">Questionnaire</a></li>
|
||||
<li><a href="{{ url_for('answers') }}">My Answers</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<p>{{ text }}</p>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="{{ url_for('index') }}">Home</a></li>
|
||||
<li><a href="{{ url_for('form') }}">Questionnaire</a></li>
|
||||
<li><a href="{{ url_for('answers') }}">My Answers</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -1 +1,10 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<div>
|
||||
<ul>
|
||||
<li><a href="{{ url_for('form') }}">Jetzt mitspielen</a></li>
|
||||
<li><a href="{{ url_for('answers') }}">Hier geht's zu deinen Antworten</a></li>
|
||||
<li><a href="{{ url_for('solution') }}">Lösung einreichen</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
4
templates/solution.html
Normal file
4
templates/solution.html
Normal file
@ -0,0 +1,4 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
index
|
||||
{% endblock %}
|
||||
Loading…
x
Reference in New Issue
Block a user