{% extends 'base.html' %}

{% block title %}{{profile.username}}'s Profile{% endblock %}

{% block sidebar %}
{% endblock %}

{% block content %}
<div class="w3-card-4 w3-green w3-container  w3-padding profile">
{% if request.user.is_authenticated %}
  <h2>{{profile.username}}'s Profile</h2>
  <ul>
      <li><strong>First Name:</strong> {{profile.first_name}}</li>
      <li><strong>Last Name:</strong> {{profile.last_name}}</li>
      <li><strong>Email Address:</strong> {{profile.email}}</li>
  </ul>
  {% if profile.username == request.user.username %}
  <a href="edit" class="buttoned">Edit user profile</a>
  {% endif %}
{% else %}
    <p>Please <a href="{% url 'login' %}">log in</a> to your account to view {{profile.username}}'s profile.</p>
{% endif %}
</div>
{% endblock %}
