{% extends "base.html" %}

{% block nonauth_content %}
<p> hello world
{% endblock %}


{% block content %}
    <!-- <p>This is what the JWT contains currently. See all <a style="color: -->
    <!--     #009486;" href="/users">users</a> from database.</p> -->
    <!-- <div style="padding: 8px 16px; background: #161618; border-radius: 6px;"> -->
    <!--     <pre style="max-width: 800px; white-space: pre-wrap;">{{ json.dumps(request.user, indent=4) }}</pre> -->
    <!-- </div> -->


    <p>Your are logged in to <br/><img src="/static/{{current_site}}.svg"
    style="width: 150px; height: 150px; margin-right: 50px;  "</img>

    <p>Please choose an identity to link to your account:

    <div style="display: flex; align-items: center; ">
        <table>
        {% for provider in external_providers %}
        <tr><td><a href="oauth2/{{ provider.name }}/authorize" style="display: flex; align-items: center;">
                <img
                        alt="{{ provider.name }} icon"
                        src="/static/{{ provider.name }}.svg"
                        style="width: 80px; height: 80px; margin-right: 50px; margin-left: 50px"
                > </a>
            </td>
            <td>
                {% if not provider.is_linked %}
                Not linked. 
                <a href="{{current_site}}/link/{{ provider.name }}">Link identity</a>
                {% else %}
                Linked.
                <a href="{{current_site}}/unlink/{{ provider.name }}">Unlink identity</a>
                {% endif %}
            </td>
        </tr>
        {% endfor %}
        </table>
    </div>
{% endblock %}



