<div class="sidebar-wrapper" data-layout="stroke-svg">
    <div class="logo-wrapper">
        <a href="<?= base_url('home') ?>" style="color: white;">
            <img class="img-fluid" width="40" src="<?= base_url('assets/img/') . $setting->logo ?>" alt="">
            <b>CANDY SKL</b>
        </a>
        <div class="back-btn"><i class="fa fa-angle-left"> </i></div>
        <div class="toggle-sidebar"><i class="status_toggle middle sidebar-toggle" data-feather="grid"> </i></div>
    </div>
    <div class="logo-icon-wrapper"><a href="<?= base_url('home') ?>"><img class="img-fluid" width="40" src="<?= base_url('assets/img/') . $setting->logo ?>" alt=""></a></div>
    <nav class="sidebar-main">
        <div class="left-arrow" id="left-arrow"><i data-feather="arrow-left"></i></div>
        <div id="sidebar-menu">
            <ul class="sidebar-links" id="simple-bar">
                <li class="back-btn"><a href="index.html"><img class="img-fluid" width="40" src="<?= base_url('assets/img/') . $setting->logo ?>" alt=""></a>
                    <div class="mobile-back text-end"> <span>Back </span><i class="fa fa-angle-right ps-2" aria-hidden="true"></i></div>
                </li>
                <li class="pin-title sidebar-main-title">
                    <div>
                        <h6>Pinned</h6>
                    </div>
                </li>
                <li class="sidebar-main-title">
                    <div>
                        <h6 class="lan-1">General</h6>
                    </div>
                </li>
                <li class="sidebar-list"><i class="fa fa-thumb-tack"></i><a class="sidebar-link sidebar-title link-nav" href="<?= base_url('home') ?>">
                        <svg class="stroke-icon">
                            <use href="<?= base_url() ?>assets/svg/icon-sprite.svg#stroke-home"></use>
                        </svg>
                        <svg class="fill-icon">
                            <use href="<?= base_url() ?>assets/svg/icon-sprite.svg#fill-home"> </use>
                        </svg><span>Dashboard</span></a>
                </li>
                <li class="sidebar-list"><i class="fa fa-thumb-tack"></i><a class="sidebar-link sidebar-title link-nav" href="<?= base_url('siswa') ?>">
                        <svg class="stroke-icon">
                            <use href="<?= base_url() ?>assets/svg/icon-sprite.svg#stroke-user"></use>
                        </svg>
                        <svg class="fill-icon">
                            <use href="<?= base_url() ?>assets/svg/icon-sprite.svg#fill-user"> </use>
                        </svg><span>Data Siswa</span></a>
                </li>
                <li class="sidebar-list"><i class="fa fa-thumb-tack"></i><a class="sidebar-link sidebar-title link-nav" href="<?= base_url('matapelajaran') ?>">
                        <svg class="stroke-icon">
                            <use href="<?= base_url() ?>assets/svg/icon-sprite.svg#stroke-knowledgebase"></use>
                        </svg>
                        <svg class="fill-icon">
                            <use href="<?= base_url() ?>assets/svg/icon-sprite.svg#fill-knowledgebase"> </use>
                        </svg><span>Mata Pelajaran</span></a>
                </li>
                <li class="sidebar-list"><i class="fa fa-thumb-tack"></i><a class="sidebar-link sidebar-title link-nav" href="<?= base_url('penilaian') ?>">
                        <svg class="stroke-icon">
                            <use href="<?= base_url() ?>assets/svg/icon-sprite.svg#stroke-sample-page"></use>
                        </svg>
                        <svg class="fill-icon">
                            <use href="<?= base_url() ?>assets/svg/icon-sprite.svg#fill-sample-page"> </use>
                        </svg><span>Penilaian</span></a>
                </li>
                <li class="sidebar-list"><i class="fa fa-thumb-tack"></i><a class="sidebar-link sidebar-title link-nav" href="<?= base_url('user') ?>">
                        <svg class="stroke-icon">
                            <use href="<?= base_url() ?>assets/svg/icon-sprite.svg#stroke-editors"></use>
                        </svg>
                        <svg class="fill-icon">
                            <use href="<?= base_url() ?>assets/svg/icon-sprite.svg#fill-editors"> </use>
                        </svg><span>Data User</span></a>
                </li>
                <li class="sidebar-list"><i class="fa fa-thumb-tack"></i><a class="sidebar-link sidebar-title link-nav" href="<?= base_url('pengumuman') ?>">
                        <svg class="stroke-icon">
                            <use href="<?= base_url() ?>assets/svg/icon-sprite.svg#stroke-chat"></use>
                        </svg>
                        <svg class="fill-icon">
                            <use href="<?= base_url() ?>assets/svg/icon-sprite.svg#fill-chat"> </use>
                        </svg><span>Pengumuman</span></a>
                </li>
                <li class="sidebar-list"><i class="fa fa-thumb-tack"> </i><a class="sidebar-link sidebar-title" href="javascript:void(0);">
                        <svg class="stroke-icon">
                            <use href="<?= base_url() ?>assets/svg/icon-sprite.svg#stroke-table"></use>
                        </svg>
                        <svg class="fill-icon">
                            <use href="<?= base_url() ?>assets/svg/icon-sprite.svg#fill-table"></use>
                        </svg><span>Print SKL </span></a>
                    <ul class="sidebar-submenu">
                        <li><a href="<?= base_url('kelulusan/template') ?>">Template SKL</a></li>
                        <li><a href="<?= base_url('kelulusan') ?>">Cetak SKL</a></li>
                    </ul>
                </li>
                <li class="sidebar-list active"><i class="fa fa-thumb-tack"> </i><a class="sidebar-link sidebar-title" href="javascript:void(0);">
                        <svg class="stroke-icon">
                            <use href="<?= base_url() ?>assets/svg/icon-sprite.svg#stroke-others"></use>
                        </svg>
                        <svg class="fill-icon">
                            <use href="<?= base_url() ?>assets/svg/icon-sprite.svg#fill-others"></use>
                        </svg><span>Pengaturan </span></a>
                    <ul class="sidebar-submenu active">
                        <li><a class="active" href="<?= base_url('pengaturan/sekolah') ?>">Sekolah</a></li>
                        <li><a href="<?= base_url('pengaturan/patch') ?>">Patch Update</a></li>
                    </ul>
                </li>



            </ul>
            <div class="right-arrow" id="right-arrow"><i data-feather="arrow-right"></i></div>
        </div>
    </nav>
</div>

<?= $this->section('pagejs'); ?>
<script type="text/javascript">
    $(document).ready(function() {
        var currentUrl = window.location.href;
        $(".sidebar-link").each(function() {
            var href = $(this).attr("href");
            if (currentUrl == href) {
                $(this).addClass("active");
                $(this).closest(".sidebar-list").addClass("active");
                $(this).closest(".sidebar-list").find(".sidebar-submenu").addClass("active");
                $(this).closest(".sidebar-list").find(".sidebar-submenu").find("a").addClass("active");
            }
        });
    });
</script>
<?= $this->endSection(); ?>