From d1bc08e38124f42c32c9417f41705b54a8dffc9f Mon Sep 17 00:00:00 2001 From: Jarmil <jarmil.halamicek@seznam.cz> Date: Wed, 30 Sep 2020 11:42:15 +0200 Subject: [PATCH] Gallerie do stranky program2021 programovy bod --- program2021/templates/program2021/base.html | 2 +- .../program2021/program2021_point_page.html | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/program2021/templates/program2021/base.html b/program2021/templates/program2021/base.html index 3bad8dad..7bca669c 100644 --- a/program2021/templates/program2021/base.html +++ b/program2021/templates/program2021/base.html @@ -1,4 +1,4 @@ -{% load static wagtailcore_tags wagtailmetadata_tags %} +{% load static wagtailcore_tags wagtailimages_tags wagtailmetadata_tags %} <!doctype html> <html lang="en"> <head> diff --git a/program2021/templates/program2021/program2021_point_page.html b/program2021/templates/program2021/program2021_point_page.html index e3d9202c..7bcdfcde 100644 --- a/program2021/templates/program2021/program2021_point_page.html +++ b/program2021/templates/program2021/program2021_point_page.html @@ -1,5 +1,6 @@ {% extends "program2021/base.html" %} -{% load wagtailimages_tags wagtailcore_tags %} +{% load static wagtailimages_tags wagtailcore_tags %} + {% block content %} <div class="container"> @@ -92,7 +93,17 @@ <p>{{ page.sources|richtext }}</p> </div> - <div class="w-100 my-4"></div> + {% if page.images %} + <div class="row about-images mb-5 mt-3 jumbotron"> + {% for block in page.images %} + {% image block.value width-2000 as img %} + {% image block.value fill-300x200 as thumb %} + <div class="col-6 col-md-3 mb-4"> + <a data-fancybox="gallery" href="{{ img.url }}"><img data-src="{{ thumb.url }}" class="lazyload img-fluid" alt="{{ thumb.alt }}"></a> + </div><!-- /column --> + {% endfor %} + </div><!-- /row --> + {% endif %} </div> </div> -- GitLab