<!DOCTYPE html>
<html lang="it">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width">
        <meta name="keywords" content="Royal Games, RYG, gaming">
        {% block prehead %}{% endblock %}
        <title>{% block pagetitle %}{% endblock %} - Royal Games</title>
        <link href="{{ url_for('static', filename='pygments.css') }}" rel="stylesheet" type="text/css">
        <link href="{{ url_for('static', filename=g.css) }}" rel="stylesheet/less" type="text/css">
        <script src="https://cdnjs.cloudflare.com/ajax/libs/less.js/3.0.2/less.min.js"></script>
        {% block posthead %}{% endblock %}
    </head>
    <body>
        <nav>
            <div class="left">
                <img src="{{ url_for('static', filename='FixMeRYGLogo.jpg') }}" alt="" class="ryg-logo">
                <b>Royalnet</b>
                <a href="/">Home</a>
            </div>
            <div class="right">
                {% if config["DEBUG"] %}
                    <span id="debug-mode">DEBUG MODE</span>
                {% endif %}
                <span class="login-status">
                    {% if g.user %}
                        <img src="{{ g.user.get_gravatar_url() }}" class="gravatar">
                        <a href="{{ url_for('page_profile', name=g.user.username) }}">{{ g.user.username }}</a>
                        <a class="btn" href="{{ url_for('page_logout') }}">Logout</a>
                    {% else %}
                        <a class="btn" href="{{ url_for('page_login') }}">Login</a>
                    {% endif %}
                </span>
            </div>
        </nav>
        <div class="omnicontainer">
            {% block body %}{% endblock %}
        </div>
    </body>
</html>