<?php
$uri = service('uri');
$segment1 = $uri->getSegment(1);
$segment2 = $uri->getSegment(2);
$active_activities = ($segment2 == 'activities');
$active_biodata = ($segment2 == 'biodata');
$active_education = ($segment2 == 'education');
?>
<div class="admin-sidebar">
    <div class="admin-sidebar-header">
        Admin Panel
    </div>
    <ul class="admin-sidebar-nav">
        <li class="nav-item">
            <a class="nav-link <?= $active_activities ? 'active' : '' ?>" href="<?= base_url('admin/activities') ?>">
                Data Aktivitas
            </a>
        </li>
        <li class="nav-item">
            <a class="nav-link <?= $active_biodata ? 'active' : '' ?>" href="<?= base_url('admin/biodata') ?>">
                Data Biodata
            </a>
        </li>
        <li class="nav-item">
            <a class="nav-link <?= $active_education ? 'active' : '' ?>" href="<?= base_url('admin/education') ?>">
                Data Pendidikan
            </a>
        </li>
    </ul>
</div>





