Update templates/quiz.html
Browse files- templates/quiz.html +15 -3
templates/quiz.html
CHANGED
|
@@ -11,6 +11,7 @@
|
|
| 11 |
margin: 0;
|
| 12 |
padding: 0;
|
| 13 |
}
|
|
|
|
| 14 |
.container {
|
| 15 |
max-width: 600px;
|
| 16 |
margin: 50px auto;
|
|
@@ -19,17 +20,21 @@
|
|
| 19 |
border-radius: 8px;
|
| 20 |
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
| 21 |
}
|
|
|
|
| 22 |
h1 {
|
| 23 |
text-align: center;
|
| 24 |
color: #333;
|
| 25 |
}
|
|
|
|
| 26 |
p {
|
| 27 |
margin-bottom: 20px;
|
| 28 |
}
|
|
|
|
| 29 |
label {
|
| 30 |
display: block;
|
| 31 |
margin-bottom: 10px;
|
| 32 |
}
|
|
|
|
| 33 |
input[type="number"] {
|
| 34 |
width: 100%;
|
| 35 |
padding: 10px;
|
|
@@ -37,6 +42,7 @@
|
|
| 37 |
border: 1px solid #ccc;
|
| 38 |
border-radius: 5px;
|
| 39 |
}
|
|
|
|
| 40 |
.btn {
|
| 41 |
display: block;
|
| 42 |
width: 100%;
|
|
@@ -48,6 +54,7 @@
|
|
| 48 |
cursor: pointer;
|
| 49 |
transition: background-color 0.3s ease;
|
| 50 |
}
|
|
|
|
| 51 |
.btn:hover {
|
| 52 |
background-color: #0056b3;
|
| 53 |
}
|
|
@@ -56,14 +63,19 @@
|
|
| 56 |
<body>
|
| 57 |
<div class="container">
|
| 58 |
<h1>なんか...クイズ</h1>
|
| 59 |
-
<p
|
| 60 |
<form action="/" method="post">
|
| 61 |
<label for="user_input">答えを入力してください:</label>
|
| 62 |
-
<input type=
|
|
|
|
| 63 |
<button type="submit" class="btn">答え合わせ</button>
|
| 64 |
</form>
|
| 65 |
{% if result %}
|
| 66 |
<p>{{ result }}</p>
|
| 67 |
{% endif %}
|
| 68 |
<form action="/next" method="post">
|
| 69 |
-
<button type="submit" class="btn">次の問題</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
margin: 0;
|
| 12 |
padding: 0;
|
| 13 |
}
|
| 14 |
+
|
| 15 |
.container {
|
| 16 |
max-width: 600px;
|
| 17 |
margin: 50px auto;
|
|
|
|
| 20 |
border-radius: 8px;
|
| 21 |
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
| 22 |
}
|
| 23 |
+
|
| 24 |
h1 {
|
| 25 |
text-align: center;
|
| 26 |
color: #333;
|
| 27 |
}
|
| 28 |
+
|
| 29 |
p {
|
| 30 |
margin-bottom: 20px;
|
| 31 |
}
|
| 32 |
+
|
| 33 |
label {
|
| 34 |
display: block;
|
| 35 |
margin-bottom: 10px;
|
| 36 |
}
|
| 37 |
+
|
| 38 |
input[type="number"] {
|
| 39 |
width: 100%;
|
| 40 |
padding: 10px;
|
|
|
|
| 42 |
border: 1px solid #ccc;
|
| 43 |
border-radius: 5px;
|
| 44 |
}
|
| 45 |
+
|
| 46 |
.btn {
|
| 47 |
display: block;
|
| 48 |
width: 100%;
|
|
|
|
| 54 |
cursor: pointer;
|
| 55 |
transition: background-color 0.3s ease;
|
| 56 |
}
|
| 57 |
+
|
| 58 |
.btn:hover {
|
| 59 |
background-color: #0056b3;
|
| 60 |
}
|
|
|
|
| 63 |
<body>
|
| 64 |
<div class="container">
|
| 65 |
<h1>なんか...クイズ</h1>
|
| 66 |
+
<p>次の問題の答えは何でしょう?: <strong>{{ element }}</strong></p>
|
| 67 |
<form action="/" method="post">
|
| 68 |
<label for="user_input">答えを入力してください:</label>
|
| 69 |
+
<input type="number" id="user_input" name="user_input" required>
|
| 70 |
+
<input type="hidden" name="element" value="{{ element }}">
|
| 71 |
<button type="submit" class="btn">答え合わせ</button>
|
| 72 |
</form>
|
| 73 |
{% if result %}
|
| 74 |
<p>{{ result }}</p>
|
| 75 |
{% endif %}
|
| 76 |
<form action="/next" method="post">
|
| 77 |
+
<button type="submit" class="btn">次の問題</button>
|
| 78 |
+
</form>
|
| 79 |
+
</div>
|
| 80 |
+
</body>
|
| 81 |
+
</html>
|