Edited the HTML templates for Announcements to use CSS

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