diff --git a/docker-compose.yml b/docker-compose.yml index 0740ac0..2f91bfe 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -31,6 +31,7 @@ services: - ./project/:/app/project/ - ./static/:/app/static/ - ./templates/:/app/templates/ + - ./docker-data/media:/app/media depends_on: - db diff --git a/templates/common/content.html b/templates/common/content.html index 4a6680b..2ba5eba 100644 --- a/templates/common/content.html +++ b/templates/common/content.html @@ -1,6 +1,10 @@ -{% load wagtailcore_tags %} +{% load wagtailcore_tags wagtailimages_tags %} -
+ +{% if page.image %} + {% image page.image width-1000 as photo %} +
+{% endif %}

{{ page.title }}

Subtitle

{% include "common/content_details.html" with page=page %}

diff --git a/templates/pages/section_index_page.html b/templates/pages/section_index_page.html index d349f47..73810af 100644 --- a/templates/pages/section_index_page.html +++ b/templates/pages/section_index_page.html @@ -1,30 +1,35 @@ {% extends "base.html" %} -{% load static %} +{% load static wagtailimages_tags %} {% block content %}
- {% include "common/content.html" %} + {% include "common/content.html" %} -
+ {% if page.body %} +
+ {% endif %} - {% for child in page.get_children.specific %} -
-
- -
-
+ {% for child in page.get_children.specific %} +
+
+ {% if child.image %} + + {% image child.image width-300 as photo %} +
+
+ {% endif %} +
+
+ +
{{ child.title }}
+
+ {% include "common/content_details.html" with page=child %} +

{{ child.get_short_body }}

+
-
- -
{{ child.title }}
-
- {% include "common/content_details.html" with page=child %} -

{{ child.get_short_body }}

-
-
- {% endfor %} + {% endfor %}
{% endblock %}