From e9397eaedd19e54e4f0debd5ac1b0fca70ddd51d Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 17 Feb 2022 10:02:27 -0800 Subject: [PATCH] Adds setup templates --- bookwyrm/templates/basic_layout.html | 274 +++++++++++++++++++++++++++ bookwyrm/templates/layout.html | 5 +- bookwyrm/templates/setup/admin.html | 14 ++ bookwyrm/templates/setup/layout.html | 39 ++++ 4 files changed, 329 insertions(+), 3 deletions(-) create mode 100644 bookwyrm/templates/basic_layout.html create mode 100644 bookwyrm/templates/setup/admin.html create mode 100644 bookwyrm/templates/setup/layout.html diff --git a/bookwyrm/templates/basic_layout.html b/bookwyrm/templates/basic_layout.html new file mode 100644 index 000000000..febb17221 --- /dev/null +++ b/bookwyrm/templates/basic_layout.html @@ -0,0 +1,274 @@ +{% load layout %} +{% load i18n %} +{% load static %} + + + + {% block title %}BookWyrm{% endblock %} - {{ site.name }} + + + + + + + + + + {% if preview_images_enabled is True %} + + {% else %} + + {% endif %} + + + + + + {% block opengraph_images %} + {% include 'snippets/opengraph_images.html' %} + {% endblock %} + + + {% block head_links %}{% endblock %} + + +{% block body %} + + +{% if request.user.is_authenticated and active_announcements.exists %} +
+
+ {% for announcement in active_announcements %} + {% include 'snippets/announcement.html' with announcement=announcement %} + {% endfor %} +
+
+{% endif %} + +
+
+ {# almost every view needs to know the user shelves #} + {% with request.user.shelf_set.all as user_shelves %} + {% block content %} + {% endblock %} + {% endwith %} +
+
+ +
+ + +
+{% endblock %} + + + + + + + + + +{% block scripts %}{% endblock %} + + + + diff --git a/bookwyrm/templates/layout.html b/bookwyrm/templates/layout.html index 43e8eb227..434406bed 100644 --- a/bookwyrm/templates/layout.html +++ b/bookwyrm/templates/layout.html @@ -32,6 +32,7 @@ {% block head_links %}{% endblock %} +{% block body %}