<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
    <title>buyme</title>
    <link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="assets/css/styles.css">
</head>

<body>
    <nav class="navbar navbar-dark navbar-expand-md bg-primary">
        <div class="container"><a class="navbar-brand" href="/">buyme</a><button data-bs-toggle="collapse" class="navbar-toggler" data-bs-target="#navcol-1"><span class="visually-hidden">Toggle navigation</span><span class="navbar-toggler-icon"></span></button>
            <div class="collapse navbar-collapse" id="navcol-1">
                <ul class="navbar-nav">
                    <li class="nav-item"><a class="nav-link" href="/">Home</a></li>
                    <li class="nav-item"><a class="nav-link" href="/flags">Flags</a></li>
                </ul>
            </div>
        </div>
    </nav>
    {{#if message}}
    <div class="container alert alert-primary mt-3" role="alert">
        {{message}}
    </div>
    {{/if}}
    {{#if error}}
    <div class="container alert alert-danger mt-3" role="alert">
        {{error}}
    </div>
    {{/if}}
    {{{body}}}
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"></script>
    <script>
        window.onload = () => {
            if(location.search) {
                // remove ?message and ?error params
                history.replaceState({}, "", location.origin + location.pathname);
            }
        };
    </script>
</body>
</html>