Spaces:
Sleeping

File size: 2,914 Bytes
e7f8493
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Student Marks Entry</title>
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
  <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
  <style>
    body {
      background: #f4f6f9;
      font-family: 'Segoe UI', sans-serif;
      display: flex;
      justify-content: center;
      align-items: center;
      min-height: 100vh;
    }
    .form-card {
      max-width: 800px;
      width: 100%;
      background: #fff;
      border-radius: 12px;
      box-shadow: 0 6px 20px rgba(0,0,0,0.1);
      padding: 40px;
    }
    .form-header {
      text-align: center;
      margin-bottom: 30px;
    }
    .form-header h2 {
      font-weight: bold;
      color: #0d6efd;
    }
    .form-header p {
      color: #6c757d;
    }
    .form-control {
      border-radius: 8px;
      padding: 12px;
    }
    .btn-custom {
      border-radius: 8px;
      padding: 12px 30px;
      font-size: 16px;
      font-weight: 600;
    }
    .btn-success {
      background-color: #198754;
      border: none;
    }
    .btn-success:hover {
      background-color: #157347;
    }
    .btn-outline-secondary {
      border: 2px solid #6c757d;
    }
    .btn-outline-secondary:hover {
      background-color: #6c757d;
      color: #fff;
    }
  </style>
</head>
<body>

  <div class="form-card">
    <!-- Header -->
    <div class="form-header">
      <h2>📋 Student Marks Entry</h2>
      <p>Please fill in the details below</p>
    </div>

    <!-- Form -->
    <form method="POST" action="/arrays/results">
      <input type="hidden" name="num_students" value="{{ num_students }}">

      <div class="row">
        {% for i in range(num_students) %}
        <div class="col-md-6 mb-4">
          <div class="border rounded p-3 bg-light">
            <h6 class="fw-bold text-secondary mb-3">Student {{ loop.index }}</h6>
            <div class="mb-3">
              <label class="form-label">Name</label>
              <input type="text" name="name{{ i }}" class="form-control" placeholder="Enter student name" required>
            </div>
            <div class="mb-3">
              <label class="form-label">Mark</label>
              <input type="number" name="mark{{ i }}" class="form-control" placeholder="Enter mark" required>
            </div>
          </div>
        </div>
        {% endfor %}
      </div>

      <!-- Buttons -->
      <div class="text-center mt-4">
        <button type="submit" class="btn btn-success btn-custom me-3 shadow-sm">
          <i class="bi bi-check-circle"></i> Submit Marks
        </button>
        <button type="reset" class="btn btn-outline-secondary btn-custom shadow-sm">
          <i class="bi bi-arrow-counterclockwise"></i> Reset Form
        </button>
      </div>
    </form>
  </div>

</body>
</html>