From b8e9b9f57eeca42c36dac204694fc0f8897bb1cc Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 20 May 2021 11:46:24 -0700 Subject: [PATCH] Cleans up show/hide behavior --- bookwyrm/static/css/bookwyrm.css | 9 +++++---- bookwyrm/templates/directory/directory.html | 4 ---- bookwyrm/templates/layout.html | 1 + bookwyrm/templates/settings/announcement.html | 2 +- bookwyrm/templates/snippets/announcement.html | 19 ++++++++++++++----- 5 files changed, 21 insertions(+), 14 deletions(-) diff --git a/bookwyrm/static/css/bookwyrm.css b/bookwyrm/static/css/bookwyrm.css index 8e1aab25..fcb32e21 100644 --- a/bookwyrm/static/css/bookwyrm.css +++ b/bookwyrm/static/css/bookwyrm.css @@ -88,10 +88,11 @@ body { .transition-y.is-hidden { display: block !important; visibility: hidden !important; - height: 0; - width: 0; - margin: 0; - padding: 0; + height: 0 !important; + width: 0 !important; + margin: 0 !important; + padding: 0 !important; + overflow: auto; } .transition-x, diff --git a/bookwyrm/templates/directory/directory.html b/bookwyrm/templates/directory/directory.html index f97a8481..88a7b15c 100644 --- a/bookwyrm/templates/directory/directory.html +++ b/bookwyrm/templates/directory/directory.html @@ -49,7 +49,3 @@ {% endblock %} - -{% block scripts %} - -{% endblock %} diff --git a/bookwyrm/templates/layout.html b/bookwyrm/templates/layout.html index 112640fb..2f8001dd 100644 --- a/bookwyrm/templates/layout.html +++ b/bookwyrm/templates/layout.html @@ -238,6 +238,7 @@ var csrf_token = '{{ csrf_token }}'; + {% block scripts %}{% endblock %} diff --git a/bookwyrm/templates/settings/announcement.html b/bookwyrm/templates/settings/announcement.html index 9c367fa6..d6a26b75 100644 --- a/bookwyrm/templates/settings/announcement.html +++ b/bookwyrm/templates/settings/announcement.html @@ -54,7 +54,7 @@ - {% include 'snippets/announcement.html' with announcement=announcement pressed=True %} + {% include 'snippets/announcement.html' with announcement=announcement pressed=True admin_mode=True %} {% endblock %} diff --git a/bookwyrm/templates/snippets/announcement.html b/bookwyrm/templates/snippets/announcement.html index 1d82c07c..f9b48384 100644 --- a/bookwyrm/templates/snippets/announcement.html +++ b/bookwyrm/templates/snippets/announcement.html @@ -1,22 +1,31 @@ {% load humanize %}{% load i18n %}{% load utilities %} {% with announcement.id|uuid as uuid %} -