Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New style for notifications #37

Merged
merged 3 commits into from
Nov 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions css/publika.base.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,20 @@
margin-left: 0px;
}

.publika-base .notification {
float: right;
position: absolute;
background-color: black;
.publika-base #notifications {
margin-bottom: 10px;
}

.publika-base .notification table td {
.publika-base #notifications .notification {
border: 1px solid;
border-radius: 5px;
padding: 30px;
padding: 10px;
max-width: 1px;
text-align: left;
}

.publika-base #notifications .notification-div {
font-size: 10px;
}

.publika-base .now {
Expand Down
5 changes: 5 additions & 0 deletions css/publika.color.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,8 @@
.publika-color .realtime:not(.cancelled-trip) .time {
color: #46850e;
}

.publika-color #notifications .notification {
background-color: #f2b62d;
color: #000;
}
15 changes: 8 additions & 7 deletions templates/elements/notifications.njk
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{% if data.notifications.length %}
<div class="notification">
<table id="notifications">
{% for notification in data.notifications %}
<tr>
<td colspan="{{defaults.colspan}}">
{{notification.message}}
</td>
</tr>
<tr>
<td class="notification" colspan="{{defaults.colspan}}">
{{notification.message}}
</td>
</tr>
<tr>
<td class="notification-div" data-context="notifications">&nbsp;</td>
</tr>
{% endfor %}
</table>
</div>
{% endif %}