Add images to pages
This commit is contained in:
parent
c94bfe50d1
commit
438c7b5ae1
3 changed files with 30 additions and 20 deletions
|
@ -31,6 +31,7 @@ services:
|
||||||
- ./project/:/app/project/
|
- ./project/:/app/project/
|
||||||
- ./static/:/app/static/
|
- ./static/:/app/static/
|
||||||
- ./templates/:/app/templates/
|
- ./templates/:/app/templates/
|
||||||
|
- ./docker-data/media:/app/media
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{% load wagtailcore_tags %}
|
{% load wagtailcore_tags wagtailimages_tags %}
|
||||||
|
|
||||||
<div class="mb-3 image header-image" data-image=''></div>
|
|
||||||
|
{% if page.image %}
|
||||||
|
{% image page.image width-1000 as photo %}
|
||||||
|
<div class="mb-3 image header-image" data-image='{{ photo.url }}'></div>
|
||||||
|
{% endif %}
|
||||||
<h1 class="display-5">{{ page.title }}</h1>
|
<h1 class="display-5">{{ page.title }}</h1>
|
||||||
<h5 class="my-3">Subtitle</h5>
|
<h5 class="my-3">Subtitle</h5>
|
||||||
<p>{% include "common/content_details.html" with page=page %}</p>
|
<p>{% include "common/content_details.html" with page=page %}</p>
|
||||||
|
|
|
@ -1,20 +1,25 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% load static %}
|
{% load static wagtailimages_tags %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{% include "common/content.html" %}
|
{% include "common/content.html" %}
|
||||||
|
|
||||||
|
{% if page.body %}
|
||||||
<hr />
|
<hr />
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% for child in page.get_children.specific %}
|
{% for child in page.get_children.specific %}
|
||||||
<div class="media list-page-item mb-3">
|
<div class="media list-page-item mb-3">
|
||||||
<div class="d-none d-md-block align-self-center img-wrapper mr-3">
|
<div class="d-none d-md-block align-self-center img-wrapper mr-3">
|
||||||
|
{% if child.image %}
|
||||||
<a href="{{ child.url }}">
|
<a href="{{ child.url }}">
|
||||||
<div class="image" data-image=''></div>
|
{% image child.image width-300 as photo %}
|
||||||
|
<div class="image" data-image='{{ photo.url }}'></div>
|
||||||
</a>
|
</a>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<a href="{{ child.url }}">
|
<a href="{{ child.url }}">
|
||||||
|
|
Reference in a new issue