Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
U
uw_wcms_gesso
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
WCMS
uw_wcms_gesso
Commits
ab1535a7
Commit
ab1535a7
authored
Sep 14, 2020
by
Eric Bremner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ISTWCMS-4054: fixing image gallery
parent
0fe62719
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
12 deletions
+15
-12
js/component_scripts.min.js
js/component_scripts.min.js
+5
-3
source/_patterns/04-components/image-gallery/image-gallery.js
...ce/_patterns/04-components/image-gallery/image-gallery.js
+1
-3
source/_patterns/04-components/image-gallery/image-gallery.twig
.../_patterns/04-components/image-gallery/image-gallery.twig
+9
-6
No files found.
js/component_scripts.min.js
View file @
ab1535a7
...
...
@@ -123,9 +123,7 @@
// Get the id to reference the individual FF.
// Need this to ensure that if more than one FF on the page,
// that all FFs get the carousel added.
var
id
=
'
#uw-ig-someid
'
;
console
.
log
(
id
);
var
id
=
'
#uw-ig-
'
+
$
(
this
).
data
(
'
id
'
);
// Add the carousel to the FF using the id.
$
(
id
+
'
.owl-carousel
'
).
owlCarousel
({
...
...
@@ -165,6 +163,10 @@
const
tabs
=
document
.
querySelectorAll
(
'
[role="tab"]
'
);
const
tabList
=
document
.
querySelector
(
'
[role="tablist"]
'
);
if
(
tabs
.
length
==
0
)
{
return
;
}
// Add a click event handler to each tab
tabs
.
forEach
(
tab
=>
{
tab
.
addEventListener
(
"
click
"
,
changeTabs
);
...
...
source/_patterns/04-components/image-gallery/image-gallery.js
View file @
ab1535a7
...
...
@@ -9,9 +9,7 @@
// Get the id to reference the individual FF.
// Need this to ensure that if more than one FF on the page,
// that all FFs get the carousel added.
var
id
=
'
#uw-ig-someid
'
;
console
.
log
(
id
);
var
id
=
'
#uw-ig-
'
+
$
(
this
).
data
(
'
id
'
);
// Add the carousel to the FF using the id.
$
(
id
+
'
.owl-carousel
'
).
owlCarousel
({
...
...
source/_patterns/04-components/image-gallery/image-gallery.twig
View file @
ab1535a7
<div
id=
"uw-ig-
{{
images.id
}}
"
class=
"uw-ig data-id="
{{
images.id
}}
"
>
<div
id=
"uw-ig-
{{
images.id
}}
"
class=
"uw-ig
"
data-id=
"
{{
images.id
}}
"
>
<div
class=
"uw-ig__wrapper"
>
{%
embed
'@layouts/carousel/carousel.twig'
%}
...
...
@@ -6,6 +6,7 @@
{%
block
content
%}
{%
for
image
in
images.images
%}
<div
class=
"uw-ig__item-wrapper"
>
<div
class=
"uw_ig__image"
>
{%
include
'@components/responsive-image/responsive-image.twig'
with
{
...
...
@@ -14,11 +15,13 @@
'alt'
:
'some alt'
}
%}
</div>
<div
class=
"uw_ig__caption"
>
{%
include
'@components/caption/caption.twig'
with
{
'caption'
:
image.caption
}
%}
</div>
{%
if
image.caption
%}
<div
class=
"uw_ig__caption"
>
{%
include
'@components/caption/caption.twig'
with
{
'caption'
:
image.caption
}
%}
</div>
{%
endif
%}
</div>
{%
endfor
%}
...
...
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