notifications page cleanup
This commit is contained in:
parent
b1ad8ba317
commit
3df88f84e7
@ -97,6 +97,16 @@ h2 {
|
|||||||
width: 1rem;
|
width: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.notification {
|
||||||
|
margin-bottom: 1em;
|
||||||
|
padding: 1em 0;
|
||||||
|
background-color: #EEE;
|
||||||
|
}
|
||||||
|
.notification.unread {
|
||||||
|
background-color: #DDD;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
button .icon {
|
button .icon {
|
||||||
font-size: 1.1rem;
|
font-size: 1.1rem;
|
||||||
vertical-align: sub;
|
vertical-align: sub;
|
||||||
@ -194,7 +204,7 @@ ul.menu a {
|
|||||||
margin-bottom: 0.5em;
|
margin-bottom: 0.5em;
|
||||||
}
|
}
|
||||||
.follow-requests .row > *:first-child {
|
.follow-requests .row > *:first-child {
|
||||||
width: 15em;
|
width: 20em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login form {
|
.login form {
|
||||||
@ -291,6 +301,7 @@ button.warning {
|
|||||||
.time-ago {
|
.time-ago {
|
||||||
float: right;
|
float: right;
|
||||||
display: block;
|
display: block;
|
||||||
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.book-preview {
|
.book-preview {
|
||||||
@ -550,10 +561,6 @@ th, td {
|
|||||||
margin-left: 3em;
|
margin-left: 3em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.unread {
|
|
||||||
background-color: #DDD;
|
|
||||||
}
|
|
||||||
|
|
||||||
a .icon {
|
a .icon {
|
||||||
color: black;
|
color: black;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
@ -1,41 +1,43 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'layout.html' %}
|
||||||
{% load humanize %}l
|
{% load humanize %}l
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="content">
|
<div class="content-container">
|
||||||
<div>
|
|
||||||
<h2>Notifications</h2>
|
<h2>Notifications</h2>
|
||||||
|
|
||||||
<form name="clear" action="/clear-notifications" method="POST">
|
<form name="clear" action="/clear-notifications" method="POST">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<button type="submit">Delete notifications</button>
|
<button type="submit" class="secondary">Delete notifications</button>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="content-container">
|
||||||
{% for notification in notifications %}
|
{% for notification in notifications %}
|
||||||
<div class="notification{% if notification.id in unread %} unread{% endif %}">
|
<div class="notification{% if notification.id in unread %} unread{% endif %}">
|
||||||
<p>
|
<small class="time-ago">{{ notification.created_date | naturaltime }}</small>
|
||||||
{% if notification.notification_type == 'FAVORITE' %}
|
|
||||||
{% include 'snippets/username.html' with user=notification.related_user %}
|
{% include 'snippets/username.html' with user=notification.related_user %}
|
||||||
|
{% if notification.notification_type == 'FAVORITE' %}
|
||||||
favorited your
|
favorited your
|
||||||
<a href="{{ notification.related_status.absolute_id}}">status</a>
|
<a href="{{ notification.related_status.absolute_id}}">status</a>
|
||||||
|
|
||||||
{% elif notification.notification_type == 'REPLY' %}
|
{% elif notification.notification_type == 'REPLY' %}
|
||||||
{% include 'snippets/username.html' with user=notification.related_user %}
|
|
||||||
<a href="{{ notification.related_status.absolute_id}}">replied</a>
|
<a href="{{ notification.related_status.absolute_id}}">replied</a>
|
||||||
to your
|
to your
|
||||||
<a href="{{ notification.related_status.reply_parent.absolute_id}}">status</a>
|
<a href="{{ notification.related_status.reply_parent.absolute_id}}">status</a>
|
||||||
|
|
||||||
{% elif notification.notification_type == 'FOLLOW' %}
|
{% elif notification.notification_type == 'FOLLOW' %}
|
||||||
{% include 'snippets/username.html' with user=notification.related_user %}
|
|
||||||
followed you
|
followed you
|
||||||
|
|
||||||
{% elif notification.notification_type == 'FOLLOW_REQUEST' %}
|
{% elif notification.notification_type == 'FOLLOW_REQUEST' %}
|
||||||
{% include 'snippets/username.html' with user=notification.related_user %}
|
|
||||||
sent you a follow request
|
sent you a follow request
|
||||||
|
<div class="row shrink">
|
||||||
{% include 'snippets/follow_request_buttons.html' with user=notification.related_user %}
|
{% include 'snippets/follow_request_buttons.html' with user=notification.related_user %}
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<small>{{ notification.created_date | naturaltime }}</small>
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
{% if not notifications %}
|
||||||
|
<p>You're all caught up!</p>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user