Edited the HTML templates for Forum to use CSS

parent 2fd5a27e
{% extends 'base.html' %}
{% load static %}
{% block title %} Widget's Forum {% endblock %}
{% block content %}
<title>Widget's Forum</title>
<h1>Welcome to Widget's Forum</h1>
{% block header %} Welcome to Widget's Forum {% endblock %}
<h2>Forum posts:</h2>
{% block content %}
<div id = "object_container">
<ul id = "object_list">
{% for post in posts %}
<a href="forumposts/{{ post.pk }}/details/">{{ post.title }} by {{ post.author.first_name }} {{ post.author.last_name }}</a><br>
<a href="forumposts/{{ post.pk }}/details/" class="item">{{ post.title }} by {{ post.author.first_name }} {{ post.author.last_name }}</a><br>
{% endfor %}
<br><br>
<a href="forumposts/add/"><button value="click here">New Post</button></a><br><br>
<br>
<li>
<a href="forumposts/add/" class="item">New Post</a>
</li>
</ul>
</div>
{% endblock %}
<a href="/Dashboard/">Dashboard</a><br>
<a href="/announcements/">Announcements</a><br>
<a href="/assignments/">Assignments</a><br>
<a href="/widget_Calendar/">Calendar</a><br>
{% endblock content %}
\ No newline at end of file
{% block navbar %}
<div id = "navbar">
<a href = "/dashboard/">Dashboard</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="/announcements/">Announcements</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 = "/calendar/">Calendar</a>
</div>
{% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% load static %}
{% block title %} Add Post {% endblock %}
{% block header %} Add a new post: {% endblock %}
{% block content %}
<title>Add Post</title>
<h1>Add a new post:</h1>
<form method="post">
<form action="" method=POST>
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Save New Post">
</form>
{% endblock content %}
\ No newline at end of file
{% endblock %}
{% extends 'base.html' %}
{% load static %}
{% block title %} {{ posts.title }} {% endblock %}
{% block header %} {{ posts.title }} {% endblock %}
{% block content %}
<title>{{ posts.title }}</title>
<h1>{{ posts.title }}</h1>
<h2>by {{ posts.author.first_name }} {{ posts.author.last_name }}</h2>
<p>{{ posts.pub_datetime|date:"M/d/Y, f A"}}</p>
<p>{{ posts.body }}</p>
......@@ -14,5 +14,7 @@
{{ reply.pub_datetime|date:"M/d/Y, f A"}}<br>
{{ reply.body }}<br><br>
{% endfor %}
<a href="/forum/forumposts/{{ posts.pk }}/edit/"><button value="click here">Edit Post</button></a>
{% endblock content %}
\ No newline at end of file
<li>
<a href="/forum/forumposts/{{ posts.pk }}/edit/" class="item">Edit Post</a>
</li>
{% endblock %}
{% extends 'base.html' %}
{% load static %}
{% block title %} Edit Post {% endblock %}
{% block header %} Edit post: {% endblock %}
{% block content %}
<title>Edit Post</title>
<h1>Edit post:</h1>
<form method="post">
<form action="" method=POST>
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Save Changes to Post">
</form>
{% endblock content %}
\ No newline at end of file
{% endblock %}
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