-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstudents.html
More file actions
150 lines (122 loc) · 3.52 KB
/
students.html
File metadata and controls
150 lines (122 loc) · 3.52 KB
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Student Management System</title>
<style>
body {
margin: 0;
font-family: Arial, Helvetica, sans-serif;
background-color: #f4f6f8;
text-align: center;
}
/* Navbar */
.navbar {
background-color: #2c3e50;
color: white;
padding: 15px;
font-size: 22px;
font-weight: bold;
text-align: left;
}
/* Main container */
.container {
max-width: 1100px;
margin: 40px auto;
background-color: #ffffff;
padding: 30px;
border-radius: 10px;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
h1 {
text-align: center;
margin-bottom: 10px;
color: #2c3e50;
font-size: 45px;
}
/* Button section */
.action-bar {
text-align: right;
margin-bottom: 25px;
}
.btn {
display: inline-block;
padding: 10px 22px;
background-color: #2c3e50;
color: #ffffff;
text-decoration: none;
border-radius: 6px;
font-weight: 500;
transition: background-color 0.3s ease;
}
.btn:hover {
background-color: #1f2d3a;
}
.btn {
margin-right: 10px; /* space between buttons */
}
/* Table */
table {
width: 100%;
border-collapse: collapse;
}
thead {
background-color: #2c3e50;
color: #ffffff;
}
th, td {
padding: 12px 16px;
text-align: center;
}
tbody tr {
border-bottom: 1px solid #e0e0e0;
}
tbody tr:hover {
background-color: #f1f5f9;
}
.no-data {
text-align: center;
padding: 20px;
color: #888888;
font-style: italic;
}
</style>
</head>
<body>
<!-- Navbar -->
<div class="navbar">
Student Management System
</div>
<!-- Main Content -->
<div class="container">
<h1>Student List</h1>
<!-- Action Button -->
<div class="action-bar">
<!-- Replace / with your controller mapping later -->
<a th:href="@{/student/new}" class="btn">Add Student</a>
</div>
<!-- Student Table -->
<table>
<thead>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Email</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr th:each="studentdata : ${Students}">
<td th:text="${studentdata.firstname}"></td>
<td th:text="${studentdata.lastname}"></td>
<td th:text="${studentdata.email}"></td>
<td> <a th:href="@{/students/update/{id} (id=${studentdata.id})}" class="btn">Update</a> <a th:href="@{/students/{id} (id=${studentdata.id})}" class="btn">Delete</a> </td>
</tr>
<tr th:if="${#lists.isEmpty(Students)}">
<td colspan="3" class="no-data">No students found</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>