Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
WCMS
uw_wcms_gesso
Commits
34fc39a2
Commit
34fc39a2
authored
Jan 04, 2022
by
Eric Bremner
Browse files
ISTWCMS-4872: updating image gallery for grid
parent
0c1ce1e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
23 deletions
+39
-23
source/_patterns/04-components/image-gallery/image-gallery.twig
.../_patterns/04-components/image-gallery/image-gallery.twig
+39
-23
No files found.
source/_patterns/04-components/image-gallery/image-gallery.twig
View file @
34fc39a2
<div
id=
"uw-ig-
{{
images.id
}}
"
class=
"uw-ig"
data-id=
"
{{
images.id
}}
"
>
<div
class=
"uw-ig__wrapper"
>
{%
if
type
==
''
or
type
==
'slider'
%}
<div
id=
"uw-ig-
{{
images.id
}}
"
class=
"uw-ig"
data-id=
"
{{
images.id
}}
"
>
<div
class=
"uw-ig__wrapper"
>
{%
embed
'@layouts/carousel/carousel.twig'
%}
{%
embed
'@layouts/carousel/carousel.twig'
%}
{%
block
content
%}
{%
block
content
%}
{%
for
image
in
images.images
%}
{%
for
image
in
images.images
%}
<div
class=
"uw-ig__item-wrapper"
>
<div
class=
"uw_ig__image"
>
{%
include
'@components/responsive-image/responsive-image.twig'
with
{
'sources'
:
image.image.sources
,
'img_element'
:
image.image.img_element
[
'#uri'
],
'alt'
:
image.image.alt
}
%}
</div>
{%
if
image.caption
%}
<div
class=
"uw_ig__caption"
>
{%
include
'@components/caption/caption.twig'
with
{
'caption'
:
image.caption
<div
class=
"uw-ig__item-wrapper"
>
<div
class=
"uw_ig__image"
>
{%
include
'@components/responsive-image/responsive-image.twig'
with
{
'sources'
:
image.image.sources
,
'img_element'
:
image.image.img_element
[
'#uri'
],
'alt'
:
image.image.alt
}
%}
</div>
{%
endif
%}
</div>
{%
if
image.caption
%}
<div
class=
"uw_ig__caption"
>
{%
include
'@components/caption/caption.twig'
with
{
'caption'
:
image.caption
}
%}
</div>
{%
endif
%}
</div>
{%
endfor
%}
{%
endblock
%}
{%
endembed
%}
{%
endfor
%}
{%
endblock
%}
{%
endembed
%}
</div>
</div>
</div>
{%
else
%}
{%
for
images
in
image_gallery.images
%}
{%
for
image
in
images
%}
<a
href=
"
{{
image.image.original
}}
"
{%
if
image.caption
%}
title=
"
{{
image.caption
}}
"
{%
endif
%}
class=
"colorbox cboxElement"
data-colorbox-gallery=
"
{{
image_gallery.images.id
}}
"
data-cbox-img-attrs=
"{"alt":"
{{
image.image.alt
}}
"}"
>
<img
src=
"
{{
image.image.thumbnail
}}
"
/>
</a>
{%
endfor
%}
{%
endfor
%}
{%
endif
%}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment