62 lines
1.9 KiB
PHP
62 lines
1.9 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="id">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Daftar Guru</title>
|
|
<style>
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
body { font-family: DejaVu Sans, sans-serif; font-size: 12px; color: #1e293b; padding: 24px; }
|
|
.header { text-align: center; margin-bottom: 20px; }
|
|
.header h2 { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
|
|
.header p { font-size: 11px; color: #64748b; }
|
|
table { width: 100%; border-collapse: collapse; }
|
|
thead tr { background-color: #a5e6ba; }
|
|
th, td { border: 1px solid #cbd5e1; padding: 7px 9px; text-align: left; }
|
|
th { font-weight: 700; font-size: 11px; }
|
|
td { font-size: 11px; }
|
|
tr:nth-child(even) { background-color: #f8fafc; }
|
|
.footer { margin-top: 16px; font-size: 10px; color: #94a3b8; text-align: right; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="header">
|
|
<h2>DAFTAR GURU</h2>
|
|
<p>Dicetak pada {{ now()->format('d M Y, H:i') }}</p>
|
|
</div>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th style="width:40px">No</th>
|
|
<th>Nama Lengkap</th>
|
|
<th>NIP</th>
|
|
<th>Mata Pelajaran</th>
|
|
<th>Kelas</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($gurus as $i => $guru)
|
|
<tr>
|
|
<td>{{ $i + 1 }}</td>
|
|
<td>{{ $guru->nama }}</td>
|
|
<td>{{ $guru->nip }}</td>
|
|
<td>
|
|
@foreach($guru->mengajars as $m)
|
|
<div>{{ optional($m->mapel)->nama_mapel ?? '-' }}</div>
|
|
@endforeach
|
|
</td>
|
|
<td>
|
|
@foreach($guru->mengajars as $m)
|
|
<div>{{ optional($m->kelas)->tingkat }} {{ optional($m->kelas)->nama_kelas }}</div>
|
|
@endforeach
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="footer">Total: {{ count($gurus) }} guru</div>
|
|
|
|
</body>
|
|
</html> |