From fcd43741c57f327c8be441efbc49b20bfaa77815 Mon Sep 17 00:00:00 2001 From: Kara Engelhardt Date: Mon, 18 Dec 2023 18:49:20 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=9A=20Fix=20djlint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 2 - .../templates/fds_cms/card/card_image.html | 3 +- .../djangocms_picture/default/picture.html | 38 +++++++++---------- 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c38cc8890..bc7065952 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,8 +17,6 @@ jobs: cache: 'yarn' - uses: pre-commit/action@v3.0.0 - - uses: pre-commit-ci/lite-action@v1.0.1 - test: runs-on: ubuntu-latest strategy: diff --git a/fragdenstaat_de/fds_cms/templates/fds_cms/card/card_image.html b/fragdenstaat_de/fds_cms/templates/fds_cms/card/card_image.html index 9018de38f..81305fe51 100644 --- a/fragdenstaat_de/fds_cms/templates/fds_cms/card/card_image.html +++ b/fragdenstaat_de/fds_cms/templates/fds_cms/card/card_image.html @@ -19,6 +19,7 @@ {% endwith %} {% if instance.link %} - {% else %} + + {% else %} {% endif %} diff --git a/fragdenstaat_de/templates/djangocms_picture/default/picture.html b/fragdenstaat_de/templates/djangocms_picture/default/picture.html index 284ddff1b..67f504dda 100644 --- a/fragdenstaat_de/templates/djangocms_picture/default/picture.html +++ b/fragdenstaat_de/templates/djangocms_picture/default/picture.html @@ -35,24 +35,24 @@ /> {% if not instance.external_picture and not instance.use_no_cropping %}{% endif %} {% if picture_link %}{% endif %} - {# start render figure/figcaption #} - {% if instance.caption_text or instance.picture.author or instance.picture.description %} -
- {% if instance.caption_text or instance.picture.description %} -
- {% if instance.caption_text %} - {{ instance.caption_text }} - {% elif instance.picture.description %} - {{ instance.picture.description }}{% endif %} - {% if instance.picture.author %}–{% endif %} -
- {% endif %} - {% if instance.picture.author %}
{{ instance.picture.author|markdown }}
{% endif %} -
- - {% endif %} - {# end render figure/figcaption #} - {% comment %} + {# start render figure/figcaption #} + {% if instance.caption_text or instance.picture.author or instance.picture.description %} +
+ {% if instance.caption_text or instance.picture.description %} +
+ {% if instance.caption_text %} + {{ instance.caption_text }} + {% elif instance.picture.description %} + {{ instance.picture.description }}{% endif %} + {% if instance.picture.author %}–{% endif %} +
+ {% endif %} + {% if instance.picture.author %}
{{ instance.picture.author|markdown }}
{% endif %} +
+ + {% endif %} + {# end render figure/figcaption #} + {% comment %} # https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img # https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figure # https://github.com/divio/django-filer/blob/master/filer/models/imagemodels.py @@ -83,4 +83,4 @@ {% for plugin in instance.child_plugin_instances %} {% render_plugin plugin %} {% endfor %} - {% endcomment %} + {% endcomment %}