<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}The Dewey Oracle{% endblock %}</title>
    <link rel="stylesheet" href="/static/css/style.css">
    {% block extra_head %}{% endblock %}
</head>
<body>
    {% if user %}
    <nav class="navbar">
        <div class="nav-container">
            <div class="nav-brand">
                <a href="/">
                    <img src="/static/img/logo.svg" alt="The Dewey Oracle Logo" class="nav-logo">
                    The Dewey Oracle
                </a>
            </div>
            <ul class="nav-links">
                <li><a href="/">Dashboard</a></li>
                <li><a href="/reading-log">Reading Log</a></li>
                {% if user.is_admin %}
                <li><a href="/admin">Admin</a></li>
                {% endif %}
            </ul>
            <div class="nav-user">
                <span class="user-name">{{ user.display_name }}</span>
                <button onclick="logout()" class="btn btn-text">Logout</button>
            </div>
        </div>
    </nav>
    {% endif %}

    <div class="container">
        {% block content %}{% endblock %}
    </div>

    <script src="/static/js/app.js"></script>
    {% block extra_scripts %}{% endblock %}
</body>
</html>
