@using Microsoft.AspNetCore.Http
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>@ViewData["Title"] - Trainav</title>
    <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="~/css/site.css"/>
</head>
<body>
<header>
    <nav class="navbar navbar-expand-md navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
        <div class="container">
            <a class="navbar-brand" asp-area="" asp-page="/Index">Trainav <sup>v2</sup></a>
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent"
                    aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="navbar-collapse collapse">
                <ul class="navbar-nav flex-grow-1">
                    <li class="nav-item">
                        <a class="nav-link text-dark" asp-area="" asp-page="/Index">Home</a>
                    </li>
                    @if (Context.Session.GetString("authorized") == "true") {
                        <li class="nav-item">
                            <a class="nav-link text-dark" asp-area="" asp-page="/Plain">Plain</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link text-dark" asp-area="" asp-page="/Cards">Cards</a>
                        </li>
                    }
                </ul>
                <ul class="navbar-nav ml-auto">
                    @if (Context.Session.GetString("authorized") != "true") {
                        <li class="nav-item">
                            <a class="nav-link text-dark" asp-area="" asp-page="/Login">Login</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link text-dark" asp-area="" asp-page="/Register">Register</a>
                        </li>
                    }

                    else {
                        <li class="nav-item">
                            <a class="nav-link text-dark" asp-area="" asp-page="/Logout">Logout</a>
                        </li>
                    }

                </ul>
            </div>
        </div>
    </nav>
</header>
<div class="container">
    <main role="main" class="pb-3">
        @RenderBody()
    </main>
</div>

<footer class="border-top footer text-muted">
    <div class="container">
        &copy; 2020-@DateTime.Now.Year - Laura Hausmann - <a asp-area="" asp-page="/Privacy">Privacy</a>
    </div>
</footer>

<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="~/js/site.js" asp-append-version="true"></script>

@RenderSection("Scripts", false)
</body>
</html>
