Skip to content
Snippets Groups Projects
Unverified Commit f41fdc0e authored by Alexis BENOIT's avatar Alexis BENOIT Committed by GitHub
Browse files

Merge pull request #360 from osunyorg/block-gallery-large

Bloc Galerie : fix figcaption
parents 51c6a5d7 9ee33988
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,10 @@
width: 100%
figcaption
@include small
margin-top: $spacing-2
position: relative
> * + *
margin-top: $spacing-1
p
margin-bottom: 0
.credit
......@@ -37,10 +40,7 @@
&--with-text
@include in-page-without-sidebar
@include flexbox-grid(4)
figure
display: flex
flex-direction: column
gap: $spacing-2
&--large
figure
margin-bottom: $spacing-5
......@@ -54,6 +54,19 @@
picture
width: columns(8)
margin-left: offset(2)
@include in-page-without-sidebar
figcaption
display: flex
justify-content: space-between
align-items: baseline
p
max-width: columns(8)
*
flex: 1 1
.credit
margin-top: 0
text-align: right
&--carousel
overflow: hidden
position: relative
......@@ -104,10 +117,6 @@
height: $block-gallery-carousel-max-height
width: auto
max-width: none
figcaption
margin-top: $spacing-2
> * + *
margin-top: $spacing-1
&__arrows
margin-left: pxToRem(-18)
......
......@@ -27,9 +27,14 @@
aria-label="{{- i18n "commons.lightbox.link.title" -}}">
</a>
{{ end }}
{{ with .text }}
{{ if or .text .credit }}
<figcaption>
<p>{{- . | safeHTML -}}</p>
{{ with .text }}
<p>{{ . | safeHTML }}</p>
{{ end }}
{{ with .credit }}
<div class="credit">{{ . | safeHTML }}</div>
{{ end }}
</figcaption>
{{ end }}
</figure>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment