Commit fb564398 authored by Trisha Angel Millena's avatar Trisha Angel Millena

Added stylesheets

parent 57d7b9f0
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
{% load static %} {% load static %}
{% block stylesheets %}
<link rel = "stylesheet" type ="text/css" href = "{% static 'stylesheets/forms.css' %}">
{% endblock %}
{% block title %}Add Post{% endblock %} {% block title %}Add Post{% endblock %}
{% block content %} {% block content %}
...@@ -18,9 +22,12 @@ ...@@ -18,9 +22,12 @@
{% endfor %} {% endfor %}
<h1>Add a new post: </h1> <h1>Add a new post: </h1>
<div class = "form">
<form method = 'POST'> <form method = 'POST'>
{% csrf_token %} {% csrf_token %}
{{ form.as_p }} {{ form.as_p }}
<input type = "submit" value = "Save New Post"> <input type = "submit" value = "Save New Post">
</form> </form>
</div>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -2,29 +2,35 @@ ...@@ -2,29 +2,35 @@
{% load static %} {% load static %}
{% block stylesheets %}
<link rel="stylesheet" type="text/css" href="{% static ‘forum/forum.css' %}">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
{% block title %} {{ object.title }} {% endblock %} {% block title %} {{ object.title }} {% endblock %}
{% block content %} <div class ="forum-content">
<h1>{{ object.title }}</h1> {% block content %}
<h2>by {{ object.author.first_name }} {{ object.author.last_name }}</h2> <h1>{{ object.title }}</h1>
<h3>{{ object.pub_datetime|date:'m/d/Y, H:i A' }}</h2> <h2>by {{ object.author.first_name }} {{ object.author.last_name }}</h2>
<p>{{ object.body }}</h2> <h3>{{ object.pub_datetime|date:'m/d/Y, H:i A' }}</h2>
<p>{{ object.body }}</h2>
<h2>POST REPLIES:</h2>
<ul> <h2>POST REPLIES:</h2>
{% for reply in object.replies.all %} <ul>
<li> {% for reply in object.replies.all %}
<h2>by {{ reply.author.first_name }} {{ reply.author.last_name }}</h2> <li>
<h3>by {{ reply.pub_datetime|date:'m/d/Y, H:i A' }}</h3> <h2>by {{ reply.author.first_name }} {{ reply.author.last_name }}</h2>
<p>{{ reply.body }}</p> <h3>by {{ reply.pub_datetime|date:'m/d/Y, H:i A' }}</h3>
</li> <p>{{ reply.body }}</p>
{% endfor %} </li>
</ul> {% endfor %}
</ul>
<a href = "{% url 'forum:formpost-edit' forumpost.id %}" class = "edit-btn" ><i class = "fa fa-edit"></i>Edit Post</a> <a href = "{% url 'forum:formpost-edit' forumpost.id %}" class = "edit-btn" ><i class = "fa fa-edit"></i>Edit Post</a>
<form action = "./edit"> <form action = "./edit">
<input type = "submit" value = "Edit Post"> <input type = "submit" value = "Edit Post">
</form> </form>
</div>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
{% load static %} {% load static %}
{% block stylesheets %}
<link rel="stylesheet" type="text/css" href="{% static 'stylesheets/forms.css' %}">
{% endblock %}
{% block title %}Edit Post{% endblock %} {% block title %}Edit Post{% endblock %}
{% block content %} {% block content %}
...@@ -18,9 +22,12 @@ ...@@ -18,9 +22,12 @@
{% endfor %} {% endfor %}
<h1>Edit Post:</h1> <h1>Edit Post:</h1>
<div class = "form">
<form method = 'POST'> <form method = 'POST'>
{% csrf_token %} {% csrf_token %}
{{ form.as_p }} {{ form.as_p }}
<input type = "submit" value = "Save Changes to Post"> <input type = "submit" value = "Save Changes to Post">
</form> </form>
</div>
{% endblock %} {% 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