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>
<h3>by {{announcement.author.first_name}} {{announcement.author.last_name}} dated
{{announcement.pub_date|date:"d/m/Y"}}</h3>
<body>{{object.announcement_body}}<br><br>
</body>
<body>{% if object.reaction.all %}
Reactions:
{% for reaction in object.reaction.all %}
{% if reaction.reaction_name == "Like" %}
<li>{{reaction}}: {{reaction.tally}}</li>
{% endif %}
{% endfor %}
{% for reaction in object.reaction.all %}
{% if reaction.reaction_name == "Love" %}
<li>{{reaction}}: {{reaction.tally}}</li>
{% endif %}
{% endfor %}
{% for reaction in object.reaction.all %}
{% if reaction.reaction_name == "Angry" %}
<li>{{reaction}}: {{reaction.tally}}</li>
{% endif %}
{% endfor %}
{% endif %}
<a href="{% url 'announcements:announcement-list' %}"><button>Go back</button></a>
{% extends 'base.html' %}
{% 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>
</div>
<div class="line">
<hr>
</div>
<div class="details"> {{object.announcement_body}}
</div>
<body>
<table>{% if object.reaction.all %}
<tr>
<th>
<div class="reactions">Reactions:</div>
</th>
</tr>
<tr>
<th>
{% for reaction in object.reaction.all %}
{% if reaction.reaction_name == "Like" %}
<li>{{reaction}}: {{reaction.tally}}</li>
{% endif %}
{% endfor %}
{% for reaction in object.reaction.all %}
{% if reaction.reaction_name == "Love" %}
<li>{{reaction}}: {{reaction.tally}}</li>
{% endif %}
{% endfor %}
{% for reaction in object.reaction.all %}
{% if reaction.reaction_name == "Angry" %}
<li>{{reaction}}: {{reaction.tally}}</li>
{% endif %}
{% endfor %}
</th>
</tr>
{% else %}
<tr>
<th>There are no reactions</th>
</tr>
{% endif %}
</table>
{% load static %}
<img src="{% static 'announcements/tsukasa.png' %}" alt="image">
</body>
\ No newline at end of file
</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' %}
{% block content %}
<h1>New Announcement</h1>
<form method="POST">
{% csrf_token %}
{{form.as_p}}
<input type="submit" value="Save Announcement">
</form>
<a href="{% url 'announcements:announcement-list' %}"><button>Go back</button></a>
<div class="header">
<h1>New Announcement</h1>
</div>
<div class="form">
<form method="POST">
{% csrf_token %}
<table border="1">
{{form.as_table}}
<tr>
<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 %}
\ No newline at end of file
{% extends 'base.html' %}
{% block content %}
<h1>Announcements</h1>
<div>
<div class="header">
<h1>Announcements</h1>
</div>
<div class="announcement-list">
<br>
{% for announcement in object_list %}
<li>
<a href="{% url 'announcements:announcement-detail' announcement.id %}">
{{announcement.announcement_title}} by
{{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>
{% 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>
{% load static %}
<link rel="stylesheet" href="{% static 'announcements/css/announcement-list.css' %}">
{% 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