File size: 1,331 Bytes
8afab12
56c2e81
 
8afab12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56c2e81
8afab12
 
 
 
 
56c2e81
8afab12
 
 
 
 
 
56c2e81
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!DOCTYPE html>  
<html lang="ja">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>元素記号から原子番号当てクイズ</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      background-color: #f0f0f0;
      margin: 0;
      padding: 0;
    }
    h1 {
      color: #333;
      text-align: center;
    }
    form {
      text-align: center;
    }
    input[type="text"] {
      padding: 5px;
      margin-top: 10px;
      width: 100px;
      border: 1px solid #ccc;
      border-radius: 5px;
    }
    input[type="submit"] {
      padding: 8px 20px;
      margin-top: 10px;
      background-color: #007bff;
      color: #fff;
      border: none;
      border-radius: 5px;
      cursor: pointer;
    }
    input[type="submit"]:hover {
      background-color: #0056b3;
    }
    p {
      color: #666;
      text-align: center;
    }
  </style>
</head>
<body>
  <h1>{{ element }}の原子番号は?</h1>

  <form method="POST">
    <label>答え: <input type="text" name="user_input"></label>
    <br>
    <input type="submit" value="回答">
  </form>

  {% if result %}
    <p>{{ result }}</p>
    <form method="POST" action="/next_element2num">
      <input type="submit" value="次の問題"> 
    </form>
  {% endif %}

</body>
</html>