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 %}