107 lines
2.6 KiB
PHP
107 lines
2.6 KiB
PHP
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Data Siswa</title>
|
|
<style>
|
|
body {
|
|
background: linear-gradient(to bottom right, #92e2f2, #b0d9f8);
|
|
font-family: Arial, sans-serif;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.container {
|
|
width: 80%;
|
|
margin: 50px auto;
|
|
background-color: white;
|
|
border-radius: 20px;
|
|
box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.15);
|
|
padding: 30px;
|
|
text-align: center;
|
|
}
|
|
|
|
h1 {
|
|
color: #2c3e50;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
border-radius: 12px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
th, td {
|
|
padding: 15px;
|
|
text-align: center;
|
|
}
|
|
|
|
th {
|
|
background-color: #3498db;
|
|
color: white;
|
|
}
|
|
|
|
tr:nth-child(even) {
|
|
background-color: #ecf6fd;
|
|
}
|
|
|
|
tr:nth-child(odd) {
|
|
background-color: #d9effb;
|
|
}
|
|
|
|
.btn {
|
|
background-color: #3498db;
|
|
color: white;
|
|
padding: 10px 18px;
|
|
border: none;
|
|
border-radius: 20px;
|
|
cursor: pointer;
|
|
font-weight: bold;
|
|
transition: background-color 0.3s ease;
|
|
}
|
|
|
|
.btn:hover {
|
|
background-color: #2980b9;
|
|
}
|
|
|
|
.add-btn {
|
|
margin-top: 20px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<h1>Data Siswa</h1>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>No</th>
|
|
<th>Nama</th>
|
|
<th>Kelas</th>
|
|
<th>Umur</th>
|
|
<th>Absen</th>
|
|
<th>Aksi</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($siswa as $index => $item)
|
|
<tr>
|
|
<td>{{ $index + 1 }}</td>
|
|
<td>{{ $item->nama }}</td>
|
|
<td>{{ $item->kelas }}</td>
|
|
<td>{{ $item->umur }}</td>
|
|
<td>{{ $item->absen }}</td>
|
|
<td>
|
|
<a href="{{ url('/siswa/' . $item->id . '/edit') }}" class="btn">Edit</a>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
<br>
|
|
<a href="{{ url('/siswa/create') }}" class="btn add-btn">+ Tambah Data Siswa</a>
|
|
</div>
|
|
</body>
|
|
</html>
|