{% extends "base.html" %}

{% block content %}
<nav class="bg-white shadow-sm mb-6">
    <div class="max-w-screen-xl mx-auto px-6 py-4">
        <div class="flex justify-between items-center">
            <a href="/" class="text-xl font-bold">ayb</a>
            <div>
                {% if logged_in_entity %}
                <div class="uk-inline">
                    <a class="uk-link-text inline-flex items-center gap-1" href="#">{{ logged_in_entity }} <uk-icon icon="chevron-down" class="uk-icon" style="width: 16px; height: 16px;"></uk-icon></a>
                    <div uk-dropdown="mode: click; pos: bottom-right">
                        <ul class="uk-nav uk-dropdown-nav">
                            <li><a href="/{{ logged_in_entity }}">Profile</a></li>
                            <li><a href="/settings/tokens">Tokens</a></li>
                            <li class="uk-nav-divider"></li>
                            <li><a href="/log_out">Log out</a></li>
                        </ul>
                    </div>
                </div>
                {% else %}
                <div class="flex items-center gap-4">
                    <a href="/log_in" class="uk-link-text">Log in</a>
                    <a href="/register" class="uk-btn uk-btn-default uk-btn-sm">Sign up</a>
                </div>
                {% endif %}
            </div>
        </div>
    </div>
</nav>
<div class="max-w-screen-xl mx-auto px-6">
    {% block page_content %}{% endblock %}
</div>
{% endblock %}
