Commit e1e5857b authored by Bryan Carlo Guanlao's avatar Bryan Carlo Guanlao

added styles on all announcement templates

parent c30f3764
<h1>{{object.announcement_title}}</h1> {% extends 'base.html' %}
<h3>by {{announcement.author.first_name}} {{announcement.author.last_name}} dated {% block content %}
<div class="header">
<h1>{{object.announcement_title}}</h1>
</div>
<div class="subheader">
<h3>by {{announcement.author.first_name}} {{announcement.author.last_name}} dated
{{announcement.pub_date|date:"d/m/Y"}}</h3> {{announcement.pub_date|date:"d/m/Y"}}</h3>
</div>
<body>{{object.announcement_body}}<br><br> <div class="line">
</body> <hr>
</div>
<div class="details"> {{object.announcement_body}}
</div>
<body>{% if object.reaction.all %} <body>
Reactions: <table>{% if object.reaction.all %}
<tr>
<th>
<div class="reactions">Reactions:</div>
</th>
</tr>
<tr>
<th>
{% for reaction in object.reaction.all %} {% for reaction in object.reaction.all %}
{% if reaction.reaction_name == "Like" %} {% if reaction.reaction_name == "Like" %}
<li>{{reaction}}: {{reaction.tally}}</li> <li>{{reaction}}: {{reaction.tally}}</li>
...@@ -27,10 +45,19 @@ ...@@ -27,10 +45,19 @@
<li>{{reaction}}: {{reaction.tally}}</li> <li>{{reaction}}: {{reaction.tally}}</li>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</th>
</tr>
{% else %}
<tr>
<th>There are no reactions</th>
</tr>
{% endif %} {% endif %}
</table>
<a href="{% url 'announcements:announcement-list' %}"><button>Go back</button></a>
{% load static %} {% load static %}
<img src="{% static 'announcements/tsukasa.png' %}" alt="image"> <img src="{% static 'announcements/tsukasa.png' %}" alt="image">
</body> </body>
<div>
<a class="go-back" href="{% url 'announcements:announcement-list' %}"><button>Go back</button></a>
</div>
<link rel="stylesheet" href="{% static 'announcements/css/announcement-detail.css' %}">
{% endblock content %}
\ No newline at end of file
{% extends 'base.html' %} {% extends 'base.html' %}
{% block content %} {% block content %}
<h1>New Announcement</h1> <div class="header">
<form method="POST"> <h1>New Announcement</h1>
</div>
<div class="form">
<form method="POST">
{% csrf_token %} {% csrf_token %}
{{form.as_p}} <table border="1">
<input type="submit" value="Save Announcement"> {{form.as_table}}
</form> <tr>
<a href="{% url 'announcements:announcement-list' %}"><button>Go back</button></a> <td colspan="2"><input class="save-btn" type="submit" value="Save Announcement"></td>
</tr>
</table>
</form>
<a class="go-back" href="{% url 'announcements:announcement-list' %}"><button>Go back</button></a>
</div>
{% load static %}
<link rel="stylesheet" href="{% static 'announcements/css/announcement-form.css' %}">
{% endblock content %} {% endblock content %}
\ No newline at end of file
{% extends 'base.html' %} {% extends 'base.html' %}
{% block content %} {% block content %}
<h1>Announcements</h1> <div class="header">
<div> <h1>Announcements</h1>
</div>
<div class="announcement-list">
<br>
{% for announcement in object_list %} {% for announcement in object_list %}
<li> <li>
<a href="{% url 'announcements:announcement-detail' announcement.id %}"> <a href="{% url 'announcements:announcement-detail' announcement.id %}">
{{announcement.announcement_title}} by {{announcement.announcement_title}} by
{{announcement.author.first_name}} {{announcement.author.last_name}} dated {{announcement.author.first_name}} {{announcement.author.last_name}} dated
{{announcement.pub_date|date:"d/m/Y"}}</a> {{announcement.pub_date|date:"d/m/Y"}} </a>
<br>
</li> </li>
{% endfor %} {% endfor %}
<a href="{% url 'announcements:announcement-add' %}"><button>New Announcement</button></a> <a class="new-assign" href="{% url 'announcements:announcement-add' %}"><button>New Announcement</button></a>
</div> </div>
{% load static %}
<link rel="stylesheet" href="{% static 'announcements/css/announcement-list.css' %}">
{% endblock content %} {% endblock content %}
\ No newline at end of file
.header {
color: rgb(77, 1, 1);
font-size: 3ch;
margin-left: 20px;
margin-top: 20px;
}
.subheader {
margin-top: 10px;
margin-left: 40px;
color: rgb(77, 1, 1);
}
.details {
margin-left: 50px;
margin-top: 30px;
font-size: 20px;
}
.line {
margin-top: 25px;
margin-left: 20px;
width: 400px;
}
table {
font-size: 20px;
border: 1px solid;
margin-left: 30px;
margin-top: 50px;
width: 300px;
}
th,
tr {
border: 1px solid;
text-align: left;
margin-left: 20px;
}
.reactions {
margin-left: 10px;
}
li {
margin-left: 20px;
}
.go-back {
margin: 0.4%;
}
.go-back button {
margin-top: 50px;
width: 15em;
height: 5em;
background-color: rgb(238, 248, 255);
font-size: 13px;
margin-left: 40px;
}
.go-back button:hover {
background-color: rgb(202, 255, 246);
}
img {
margin-left: 20px;
}
\ No newline at end of file
table {
margin-left: auto;
margin-right: auto;
margin-top: 30px;
}
.header {
margin-top: 30px;
text-align: center;
color: rgb(77, 1, 1);
}
.save-btn {
width: 100%;
background-color: rgb(238, 248, 255);
}
.save-btn:hover {
background-color: rgb(202, 255, 246);
}
.go-back {
margin: 0;
position: absolute;
left: 43%;
}
.go-back button {
width: 20em;
height: 5em;
background-color: rgb(238, 248, 255);
}
.go-back button:hover {
background-color: rgb(202, 255, 246);
}
\ No newline at end of file
.header {
color: rgb(77, 1, 1);
font-size: 3ch;
margin-left: 20px;
margin-top: 30px;
}
.announcement-list {
font-size: 25px;
line-height: 200%;
margin-left: 30px;
;
}
a:link {
color: rgb(39, 3, 20);
text-decoration: none;
}
a:visited {
color: rgb(9, 24, 51);
text-decoration: none;
}
a:hover {
color: rgb(2, 172, 107);
text-decoration: underline;
}
.new-assign {
margin: 0.4%;
}
.new-assign button {
margin-top: 30px;
width: 20em;
height: 5em;
background-color: rgb(238, 248, 255);
font-size: 15px;
}
.new-assign button:hover {
background-color: rgb(202, 255, 246);
}
li {
list-style-type: square;
}
\ 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