{% extends 'base.html' %}
{% load static %}

    {% block styles %}
        <link rel="stylesheet" type="text/css" href="{% static 'homepage/style.css' %}">   
    {% endblock %}

{% block title %}Homepage{% endblock %}
{% block content %}

    <h1 class="welcome">Welcome to Widget!</h1>
    <div class="users">
        <h2>Widget Users:</h2>
        {% if user_list %}
            <ol>
            {% for user in user_list %}
                <li><a href="{% url 'homepage:userDetails' user.id%}">{{user.last_name}}, {{user.first_name}} {{user.middle_name}}</a></li>
            {% endfor %}
            </ol>
        {% else %}
            <p>There are no existing users.</p>
        {% endif %}
    </div>

    <div class="add-button">
        <a href="{% url 'homepage:userCreate' %}">
            <button type="button">Add Widget User</button>
        </a>
    </div>
{% endblock %}