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