<?php
// Coff PHP Framework
// Created by Ubden Community
// GitHub: https://github.com/ubden/coff-framework
// Contributors: https://github.com/ck-cankurt
// License: GNU GENERAL PUBLIC LICENSE
// Framework Website: https://coff.dev
// Sponsored Website: https://ubden.com
// Version: ubden/coff-framework/version.txt
// Release Date: 2024

// Requiring configuration file
$config = require_once __DIR__ . '/../../config/config.php';
?>
<!DOCTYPE html>
<html lang="tr">
<head>
    <meta charset="UTF-8">
    <title><?php echo $config['app']['app_name']; ?> - Version <?php echo getVersion(); ?></title>
    <meta name="description" content="Coff PHP Framework is a simple and lightweight PHP framework.">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="icon" href="/assets/images/coff_dev_ico.png" type="image/x-icon">
    <link rel="stylesheet" href="/assets/css/app.css">
    <script src="/assets/js/app.js" defer></script>
</head>
<body>
    <header>
        <nav class="navbar navbar-expand-lg navbar-light bg-light">
            <a class="navbar-brand" href="./index.php"><?php echo $config['app']['app_name']; ?> - Version <?php echo getVersion(); ?></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 mr-auto">
                    <li class="nav-item">
                        <a class="nav-link" href="/Home">Home</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="/About">About</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="/Contact">Contact</a>
                    </li>
                </ul>
                <span class="navbar-text">
                    <a href="https://github.com/ubden/coff-framework" target="_blank">ubden/coff-framework</a>
                </span>
                <?php if (isset($_SESSION['user'])): ?>
                    <form class="form-inline my-2 my-lg-0" action="/../../public/logout.php" method="post">
                        <button class="btn btn-outline-danger my-2 my-sm-0" type="submit">Çıkış Yap</button>
                    </form>
                <?php endif; ?>
            </div>
        </nav>
    </header>
    <main class="container mt-4">
