<!-- templates/base.html -->

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Flask Auth Example</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.2/css/bulma.min.css" />
</head>

<body>
    <section class="hero is-primary is-fullheight">

        <div class="hero-head">
            <nav class="navbar">
                <div class="container">

                    <div id="navbarMenuHeroA" class="navbar-menu">
                        <div class="navbar-end">
                            <a href="{{ url_for('main.index') }}" class="navbar-item">
                                خانه
                            </a>
                            {% if current_user.is_authenticated %}
                            <a href="{{ url_for('main.profile') }}" class="navbar-item">
                                پروفایل
                            </a>
                            <a href="{{ url_for('auth.logout') }}" class="navbar-item">
                                خروج
                            </a>
                            {% else %}
                            <a href="{{ url_for('auth.login') }}" class="navbar-item">
                                ورود
                            </a>
                            <a href="{{ url_for('auth.signup') }}" class="navbar-item">
                                ثبت نام
                            </a>
                            {% endif %}

                        </div>
                    </div>
                </div>
            </nav>
        </div>

        <div class="hero-body">
            <div class="container has-text-centered">
               {% block content %}
               {% endblock %}
            </div>
        </div>
    </section>
</body>

</html>