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

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

{% block title %}{{announcement.announcement_title}}{% endblock %}
{% block content %}
    <h1>{{announcement.announcement_title}}</h1>
    <h2>by {{announcement.author.first_name}} {{announcement.author.last_name}}, {{announcement.pub_date|date:"d/m/Y"}}</h2>
    <div> 
        <p>
            Description: {{announcement.announcement_body}}<br><br>
            {% if announcement.announcement_image %}
                <img src = "{{ announcement.announcement_image.url }}"><br>
            {% endif %}
            Reactions:<br>
                {% for reaction in reaction_list %} 
                    {% if reaction.announcement.id == announcement.id %}
                        {{reaction.reaction_name}}: {{reaction.tally}}<br>
                    {% endif %}
                {% endfor %}
                
            
            
        </p>
    </div>
{% endblock  %}