{% extends "base.html" %}
{% block content %}
<div class="header">
    <h1>✨ Your shortiepy Links 🌸</h1>
    <p><a href="/" class="btn">← Back to homepage</a></p>
</div>

<div class="card">
    {% if urls %}
    <table>
        <thead>
            <tr>
                <th>Code</th>
                <th>Short URL</th>
                <th>Original URL</th>
                <th>Created At</th>
            </tr>
        </thead>
        <tbody>
        {% for url in urls %}
            <tr>
                <td>{{ url.code }}</td>
                <td><a href="{{ url.short_url }}" target="_blank" rel="nofollow noopener">{{ url.short_url }}</a></td>
                <td>{{ url.display_url }}</td>
                <td>{{ url.created }}</td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
    {% else %}
    <p style="text-align: center; color: #a07cb2;">(;´༎ຶД༎ຶ`) No links yet!</p>
    {% endif %}
</div>
{% endblock %}
