From 289fe914d73d7b936cb0b3a22616b0f2062f70c1 Mon Sep 17 00:00:00 2001 From: Alexis BENOIT <alex@noesya.coop> Date: Fri, 22 Nov 2024 16:14:36 +0100 Subject: [PATCH] =?UTF-8?q?Slider=20et=20visionneuse=20:=20am=C3=A9liorati?= =?UTF-8?q?ons=20multiples=20(#744)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/sass/_theme/components/lightbox.sass | 19 ++++++------ .../sass/_theme/configuration/components.sass | 12 ++++++-- .../templates/gallery/carousel-image.html | 7 ----- .../blocks/templates/gallery/images.html | 29 ------------------- 4 files changed, 20 insertions(+), 47 deletions(-) delete mode 100644 layouts/partials/blocks/templates/gallery/carousel-image.html delete mode 100644 layouts/partials/blocks/templates/gallery/images.html diff --git a/assets/sass/_theme/components/lightbox.sass b/assets/sass/_theme/components/lightbox.sass index 492c7260..82c431ae 100644 --- a/assets/sass/_theme/components/lightbox.sass +++ b/assets/sass/_theme/components/lightbox.sass @@ -50,15 +50,15 @@ > button @include button-reset @include meta - background-color: var(--color-background) - color: var(--color-text) + background-color: $lightbox-button-background-color + color: $lightbox-button-color height: $spacing-4 outline-color: $lightbox-focus-outline-color margin: 0 padding: 0 width: $spacing-4 &:not(:last-child) - border-right: 1px solid var(--color-border) + border-right: 1px solid $lightbox-button-border-color &.lightbox-button-next @include icon(arrow-right-s-line, before) &.lightbox-button-previous @@ -76,15 +76,16 @@ &.lightbox-button-close @include icon(close-line, before) &[aria-expanded='true'] - background-color: var(--color-text) - color: var(--color-background) + background-color: $lightbox-button-color + color: $lightbox-button-background-color &:disabled - background: var(--color-background-alt) + background: $lightbox-button-disabled-background &::before - color: var(--color-border) + color: $lightbox-button-disabled-color &-detail - background-color: var(--color-background) + background: $lightbox-detail-background bottom: calc(var(--spacing-4) + var(--spacing-2) + 1px) + color: $lightbox-detail-color display: none padding: $spacing-2 position: fixed @@ -95,7 +96,7 @@ width: columns(6) &__title, &__close @include meta - color: var(--color-text-alt) + color: $lightbox-detail-meta-color &__close @include button-reset cursor: pointer diff --git a/assets/sass/_theme/configuration/components.sass b/assets/sass/_theme/configuration/components.sass index ecc96c5c..d5822d95 100644 --- a/assets/sass/_theme/configuration/components.sass +++ b/assets/sass/_theme/configuration/components.sass @@ -92,8 +92,16 @@ $breadcrumb-icon-color: var(--color-text-alt) !default // Lightbox $lightbox-backdrop: blur(5px) !default -$lightbox-background-color: rgba(0, 0, 0, 0.80) !default -$lightbox-focus-outline-color: white !default +$lightbox-background-color: white !default +$lightbox-button-background-color: var(--color-background) !default +$lightbox-button-color: var(--color-text) !default +$lightbox-button-border-color: var(--color-border) !default +$lightbox-button-disabled-background: var(--color-background-alt) !default +$lightbox-button-disabled-color: var(--color-border) !default +$lightbox-detail-background: var(--color-background) !default +$lightbox-detail-color: var(--color-text) !default +$lightbox-detail-meta-color: var(--color-text-alt) !default +$lightbox-focus-outline-color: black !default // Table of content $toc-color: var(--color-text) !default diff --git a/layouts/partials/blocks/templates/gallery/carousel-image.html b/layouts/partials/blocks/templates/gallery/carousel-image.html deleted file mode 100644 index d4eb9e18..00000000 --- a/layouts/partials/blocks/templates/gallery/carousel-image.html +++ /dev/null @@ -1,7 +0,0 @@ -{{ partial "commons/image-figure.html" (dict - "image" .params - "sizes" site.Params.image_sizes.blocks.gallery.carousel - "is_gallery" true - "role" "tabpanel" - ) -}} \ No newline at end of file diff --git a/layouts/partials/blocks/templates/gallery/images.html b/layouts/partials/blocks/templates/gallery/images.html deleted file mode 100644 index 4354767c..00000000 --- a/layouts/partials/blocks/templates/gallery/images.html +++ /dev/null @@ -1,29 +0,0 @@ -{{- $has_text := false -}} -{{- range .images }} - {{- if .text }} - {{- $has_text = true -}} - {{ end -}} -{{ end -}} - -{{ $sizes := "" }} -{{if eq .layout "grid"}} - {{ $sizes = site.Params.image_sizes.blocks.gallery.grid }} -{{ else if eq .layout "large" }} - {{ $sizes = site.Params.image_sizes.blocks.gallery.large }} -{{ else }} - {{ $sizes = site.Params.image_sizes.blocks.image }} -{{ end }} - -{{ $totalimages := .images | len }} -<div class="gallery{{- if $has_text }} gallery--with-text {{ end -}}"> -{{ range $index, $image := .images }} - {{ partial "commons/image-figure.html" (dict - "image" . - "sizes" $sizes - "is_gallery" true - "index" $index - "total" $totalimages - ) - }} -{{ end }} -</div> \ No newline at end of file -- GitLab