<nav class="navbar navbar-expand-lg navbar-light m-4">
    <a class="navbar-brand lead" href="#"> <i class="far fa-clipboard"></i> Attendance Checker</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav"
        aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarNav">
        <ul class="navbar-nav ml-auto">
            <li class="nav-item active">
                <a class="nav-link" href="#"><i class="fas fa-home"></i> Home</a>
            </li>
            <li class="nav-item active">
                <a class="nav-link" href="#">
                    <div class="custom-control custom-switch">
                        <input type="checkbox" class="custom-control-input" id="customSwitch1" name="checkbox">
                        <label class="custom-control-label" for="customSwitch1">Dark Mode ðŸŒ™</label>
                    </div>
                </i> </a>
            </li>
            <li class="nav-item active">
                <a class="nav-link" href="/logout">Logout <i class="fas fa-sign-out-alt"></i> </a>
            </li>
            
            
        </ul>
    </div>
    <script>
        var checkbox = document.querySelector("input[name=checkbox]");

            checkbox.addEventListener('change', function () {
                if (this.checked) {
                    document.documentElement.classList.toggle("dark-mode");
                } else {
                    document.documentElement.classList.toggle("dark-mode");
                }
            });
    </script>
</nav>