<?= $this->extend('layout/default') ?>

<?= $this->section('content') ?>
<div class="container pt-5 pb-5">
    <div class="row justify-content-center">
        <div class="col-md-10">
            <h3 class="fw-bold mb-4 text-center">Manajemen Konten Jurusan</h3>
            <div class="row">
                <?php foreach ($jurusan as $j) : ?>
                    <div class="col-md-4 mb-4">
                        <div class="card shadow-sm border-0 h-100 text-center p-4">
                            <div class="mb-3">
                                <?php if ($j['logo_jurusan']) : ?>
                                    <img src="<?= base_url('assets/img/jurusan/' . $j['logo_jurusan']) ?>" width="80">
                                <?php else : ?>
                                    <i class="fa fa-graduation-cap fa-3x text-success"></i>
                                <?php endif; ?>
                            </div>
                            <h5 class="fw-bold"><?= $j['nama_jurusan'] ?></h5>
                            <hr>
                            <a href="<?= base_url('admin/jurusan/edit/' . $j['slug']) ?>" class="btn btn-primary rounded-pill">
                                <i class="fa fa-edit me-1"></i> Edit Konten
                            </a>
                        </div>
                    </div>
                <?php endforeach; ?>
            </div>
        </div>
    </div>
</div>
<?= $this->endSection() ?>