Commit 1d48dac0 authored by Cherish Magpayo's avatar Cherish Magpayo

Add base, details, and index html templates to use in announcement views

parent 30c0c4a3
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href ={% static 'announcements/style.css' %}>
<title>Project Jupert</title>
</head>
<body>
{% block content %}
{% endblock %}
</body>
</html>
\ No newline at end of file
{% extends "announcements/base.html" %}
{% block content %}
<h1>{{ announcement.announcement_title }}</h1>
<h3>{{ announcement.author.first_name }} {{ announcement.author.last_name }}, {{ announcement.pub_date|date:"d/m/Y" }}</h3>
<p id="announcement_body">
{{ announcement.announcement_body }}
</p>
<p id="reactions">
{% for reaction in announcement.reaction_set.all %}
{{ reaction.reaction_name|lower|capfirst }}: {{ reaction.tally }} <br>
{% endfor %}
</p>
<img src= {{announcement.image.url}}>
{% endblock %}
\ No newline at end of file
{% extends "announcements/base.html" %}
{% block content %}
<h1>Announcement Board</h1>
<h3>Important announcements:</h2>
{% if announcement_list %}
<ul>
{% for announcement in announcement_list %}
<li><a href = "{% url 'announcements:details' announcement.id %}"> <b>{{ announcement.announcement_title }}</b> by {{ announcement.author.first_name }} {{ announcement.author.last_name }} dated {{ announcement.pub_date|date:"d/m/Y" }} </a></li>
{% endfor %}
</ul>
{% else %}
<p>No announcements are available.</p>
{% endif %}
{% endblock %}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment