Edited the HTML templates for Announcements to use CSS

parent 5017f00a
{% extends 'base.html' %}
{% load static %}
{% block content %}
{% block title %} Add Announcement {% endblock %}
{% block header %} Add a new announcement: {% endblock %}
<title>Add Announcement</title>
<h1>Add a new announcement:</h1>
{% block content %}
<form action="" method=POST>
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Add Announcement">
</form>
{% endblock content %}
\ No newline at end of file
{% endblock %}
{% extends 'base.html' %}
{% load static %}
{% block content %}
{% block title %} {{ announce.title }} {% endblock %}
<title>{{ announce.title }}</title>
{% block header %} {{ announce.title }} {% endblock %}
<h1>{{ announce.title }}</h1>
{% block content %}
<h2>by {{ announce.author.first_name }} {{ announce.author.last_name }}</h2>
<p>{{ announce.pub_datetime|date:'m/d/Y, h:i A' }}</p>
<p>{{ announce.body }}</p>
<p>
{% for react in announce.react.all %}
{{ react.name }}: {{ react.tally }}<br>
{% endfor %}
</p>
<a href = "/announcements/{{ announce.pk }}/edit/"><button value="">Edit Announcement</button></a>
{% endblock content %}
\ No newline at end of file
{% endblock %}
{% extends 'base.html' %}
{% load static %}
{% block content %}
{% block title %} Edit Announcement {% endblock %}
{% block header %} Edit announcement: {% endblock %}
<title>Edit Announcement</title>
<h1>Edit announcement:</h1>
{% block content %}
<form action="" method=POST>
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Save Changes to Announcement">
</form>
{% endblock content %}
\ No newline at end of file
{% endblock %}
{% extends 'base.html' %}
{% load static %}
{% block content %}
{% block title %} Widget's Announcement Board {% endblock %}
<title>Widget's Announcement Board</title>
<h1>Welcome to Widget's Announcement Board!</h1>
{% block header %} Welcome to Widget's Announcement Board! {% endblock %}
<h3>Announcements:</h3>
{% block content %}
<div id = "object_container">
<ul id = "object_list">
{% for announce in announcement %}
<a href = "{{ announce.pk }}/details/">{{ announce.title }} by {{ announce.author.first_name }} {{ announce.author.last_name }}</a><br>
{% endfor %} <br>
<li>
<a href = "{{ announce.pk }}/details/" class = "item">{{ announce.title }} by {{ announce.author.first_name }} {{ announce.author.last_name }}</a> <br>
</li>
{% endfor %}
<a href="add/" class="item"><button value="click here">Add Announcement</button></a><br><br>
<a href="add/"><button value="click here">Add Announcement</button></a><br><br>
</ul>
</div>
{% endblock %}
<a href = "/Dashboard/">Dashboard</a><br>
<a href = "/forum/">Forum</a><br>
<a href = "/assignments/">Assignments</a><br>
{% block navbar %}
<div id = "navbar">
<a href = "/dashboard/">Dashboard</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href = "/forum/">Forum</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href = "/assignments/">Assignments</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href = "/widget_Calendar/">Calendar</a>
{% endblock content %}
\ No newline at end of file
</div>
{% 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