This commit is contained in:
87
templates/index.html
Normal file
87
templates/index.html
Normal file
@@ -0,0 +1,87 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{% block head %}
|
||||
<!-- Required meta tags -->
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
{% block styles %}
|
||||
<!-- Bootstrap CSS -->
|
||||
{{ bootstrap.load_css() }}
|
||||
{% endblock %}
|
||||
|
||||
<title>CoupleQuestions</title>
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<h1>CoupleQuestions</h1>
|
||||
<br>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title mb-4">Fragenkategorien auswählen</h4>
|
||||
<form method="post">
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Kategorien</label>
|
||||
{% for c in categories %}
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox"
|
||||
value="{{ c }}" id="cat_{{ loop.index }}"
|
||||
name="categories[]" {% if c in selected
|
||||
%}checked{% endif %}>
|
||||
<label class="form-check-label"
|
||||
for="cat_{{ loop.index }}">
|
||||
{{ c }}
|
||||
</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Einstellungen</label>
|
||||
<div class="form-check">
|
||||
<input class="form-control" type="number"
|
||||
value="{{ n }}" id="num" name="num">
|
||||
<label class="form-label" for="num">
|
||||
Anzahl der Fragen
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
Fragen auswählen!
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if questions | length > 0 %}
|
||||
<hr>
|
||||
<h2>Fragen</h2>
|
||||
<br>
|
||||
{% for category, c_questions in questions.items() %}
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title mb-4">{{ category }}</h4>
|
||||
<ul>
|
||||
{% for q in c_questions %}
|
||||
<li>{{ q }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
{{ bootstrap.load_js() }}
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user