diff --git a/bookwyrm/templates/layout.html b/bookwyrm/templates/layout.html index 3a4fd6c8..6adab96a 100644 --- a/bookwyrm/templates/layout.html +++ b/bookwyrm/templates/layout.html @@ -1,5 +1,4 @@ -{% load layout %} -{% load i18n %} +{% load layout %}{% load i18n %}{% load humanize %} @@ -182,6 +181,33 @@ +{% if active_announcements.exists %} +
+
+ {% for announcement in active_announcements %} +
+
+
+ {% if announcement.event_date %} + {{ announcement.event_date|naturalday|title }}: + {% endif %} + {{ announcement.preview }} +
+
+ {% 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" %} +
+
+ +
+ {% endfor %} +
+
+{% endif %}
diff --git a/bookwyrm/templates/search/book.html b/bookwyrm/templates/search/book.html index 08e1dad2..ce907219 100644 --- a/bookwyrm/templates/search/book.html +++ b/bookwyrm/templates/search/book.html @@ -28,9 +28,9 @@
{% 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 %} - {% 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 %}
{% endif %}