summaryrefslogtreecommitdiffstats
path: root/tpl/objects/lightbox.pug
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2024-10-26 18:13:16 +0200
committerVolpeon <git@volpeon.ink>2024-10-26 18:13:16 +0200
commit1c1a00c12c1be4989e28d6c3bf19b9139396250f (patch)
treea01d622427566c09b8d17517df87aa4cd4b6c31a /tpl/objects/lightbox.pug
parentAdd media-view (diff)
downloadiro-design-1c1a00c12c1be4989e28d6c3bf19b9139396250f.tar.gz
iro-design-1c1a00c12c1be4989e28d6c3bf19b9139396250f.tar.bz2
iro-design-1c1a00c12c1be4989e28d6c3bf19b9139396250f.zip
Move lightbox thumbnail to own object
Diffstat (limited to 'tpl/objects/lightbox.pug')
-rw-r--r--tpl/objects/lightbox.pug21
1 files changed, 14 insertions, 7 deletions
diff --git a/tpl/objects/lightbox.pug b/tpl/objects/lightbox.pug
index 85c468f..842d44a 100644
--- a/tpl/objects/lightbox.pug
+++ b/tpl/objects/lightbox.pug
@@ -9,10 +9,14 @@ mixin lightbox(images)
9 let linksClasses = { 9 let linksClasses = {
10 's-links': true, 10 's-links': true,
11 } 11 }
12 let thumbnailClasses = {
13 'o-thumbnail': true,
14 }
12 15
13 if (attributes.theme) { 16 if (attributes.theme) {
14 classes[`o-lightbox--${attributes.theme}`] = true; 17 classes[`o-lightbox--${attributes.theme}`] = true;
15 linksClasses[`s-links--${attributes.theme}`] = true; 18 linksClasses[`s-links--${attributes.theme}`] = true;
19 thumbnailClasses[`o-thumbnail--${attributes.theme}`] = true;
16 } 20 }
17 21
18 div(class=classes) 22 div(class=classes)
@@ -30,10 +34,13 @@ mixin lightbox(images)
30 34
31 .o-lightbox__thumbnails 35 .o-lightbox__thumbnails
32 each img, i in images 36 each img, i in images
33 - classes = i === 0 ? 'is-selected' : '' 37 -
34 a.o-lightbox__thumbnail(class=classes href='#image-' + i) 38 let classes = { 'is-selected': i === 0 }
35 img.o-lightbox__thumbnail-img(src=img) 39 Object.assign(classes, thumbnailClasses)
36 button.o-lightbox__thumbnail 40
37 +icon('volume-2')(class='o-lightbox__thumbnail-icon') 41 a.o-thumbnail(class=classes href='#image-' + i)
38 button.o-lightbox__thumbnail 42 img.o-thumbnail__image(src=img)
39 +icon('video')(class='o-lightbox__thumbnail-icon') 43 button(class=thumbnailClasses)
44 +icon('volume-2')(class='o-thumbnail__icon')
45 button(class=thumbnailClasses)
46 +icon('video')(class='o-thumbnail__icon')