mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 19:41:11 +00:00
Show announcements on all pages
This commit is contained in:
parent
346d718265
commit
c73c063949
2 changed files with 30 additions and 4 deletions
|
@ -1,5 +1,4 @@
|
||||||
{% load layout %}
|
{% load layout %}{% load i18n %}{% load humanize %}
|
||||||
{% load i18n %}
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="{% get_lang %}">
|
<html lang="{% get_lang %}">
|
||||||
<head>
|
<head>
|
||||||
|
@ -182,6 +181,33 @@
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
{% if active_announcements.exists %}
|
||||||
|
<div class="block is-flex-grow-1">
|
||||||
|
<div class="container">
|
||||||
|
{% for announcement in active_announcements %}
|
||||||
|
<div class="notification p-3">
|
||||||
|
<div class="columns mb-0">
|
||||||
|
<div class="column">
|
||||||
|
{% if announcement.event_date %}
|
||||||
|
<strong>{{ announcement.event_date|naturalday|title }}:</strong>
|
||||||
|
{% endif %}
|
||||||
|
{{ announcement.preview }}
|
||||||
|
</div>
|
||||||
|
<div class="column is-narrow">
|
||||||
|
{% trans "Open" as button_text %}
|
||||||
|
{% include 'snippets/toggle/open_button.html' with text=button_text controls_text="announcement" class="is-small" controls_uid=announcement.id icon_with_text="arrow-down" %}
|
||||||
|
{% trans "Close" as button_text %}
|
||||||
|
{% include 'snippets/toggle/close_button.html' with text=button_text controls_text="announcement" class="is-small" controls_uid=announcement.id icon_with_text="arrow-up" %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="box is-shadowless m-0 is-hidden" id="announcement-{{ announcement.id }}">
|
||||||
|
{{ announcement.content|safe }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div class="section is-flex-grow-1">
|
<div class="section is-flex-grow-1">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
|
@ -28,9 +28,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="column is-narrow">
|
<div class="column is-narrow">
|
||||||
{% trans "Open" as button_text %}
|
{% trans "Open" as button_text %}
|
||||||
{% include 'snippets/toggle/open_button.html' with text=button_text small=True controls_text="more-results-panel" controls_uid=result_set.connector.identifier class="is-small" icon_with_text="arrow-down" pressed=forloop.first %}
|
{% include 'snippets/toggle/open_button.html' with text=button_text controls_text="more-results-panel" controls_uid=result_set.connector.identifier class="is-small" icon_with_text="arrow-down" pressed=forloop.first %}
|
||||||
{% trans "Close" as button_text %}
|
{% trans "Close" as button_text %}
|
||||||
{% include 'snippets/toggle/close_button.html' with text=button_text small=True controls_text="more-results-panel" controls_uid=result_set.connector.identifier class="is-small" icon_with_text="arrow-up" pressed=forloop.first %}
|
{% include 'snippets/toggle/close_button.html' with text=button_text controls_text="more-results-panel" controls_uid=result_set.connector.identifier class="is-small" icon_with_text="arrow-up" pressed=forloop.first %}
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue