<head>
<meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
    <link rel="stylesheet" href="/css/index.css">
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js" integrity="sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js" integrity="sha384-0pUGZvbkm6XF6gxjEnlmuGrJXVbNuzT9qBBavbLwCsOGabYfZo0T0to5eqruptLy" crossorigin="anonymous"></script>
    <script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4=" crossorigin="anonymous"></script>
    <!-- prieks ta lai ajax linki stradatu ieksa .js failos -->
    <script>
        var baseURL = '<?= base_url(); ?>';
        //sakas session
        <?php $session = service('session'); ?>
    </script>
    <!-- Javascript funkcijas -->
    <script src="/js/index.js"></script>
</head>
<div class="container text-center">
    <div class="row m-4 align-items-center">
        <div class="col-4">
            
        </div>
        <div class="col-4">
            <h2 class="text-center">Fenikss 2.0</h2>
        </div>
        <div class="col-4 justify-content-end">
            <div class="row" id></div>
            <button class="btn btn-danger text-center me-3" id="logoutButton" hidden onclick="logout()">Log out</button>
            <button class="btn btn-primary text-center me-3" id="loginButton" onclick="window.location.href='/login'">Login</button>
            <button class="btn btn-secondary text-center" onclick="changePageMode()">Change Theme</button>
        </div>
    </div>
</div>
<?php
    // poga pazud type shit

    $logged_in = $session->get('logged_in');
    if($logged_in){
        echo "<script>
        document.getElementById('loginButton').hidden = true;
        document.getElementById('logoutButton').hidden = false;
        </script>";
    }
?>
