diff options
| author | Volpeon <git@volpeon.ink> | 2024-06-29 10:01:02 +0200 |
|---|---|---|
| committer | Volpeon <git@volpeon.ink> | 2024-06-29 10:01:02 +0200 |
| commit | 6376f1a5225b2fa45f6c861d4a265bf13b56d038 (patch) | |
| tree | 7c2ec8bea63df05b6a533fdfa6dab4b2f17f7a1f /tpl/objects/lightbox.pug | |
| parent | Update (diff) | |
| download | iro-design-6376f1a5225b2fa45f6c861d4a265bf13b56d038.tar.gz iro-design-6376f1a5225b2fa45f6c861d4a265bf13b56d038.tar.bz2 iro-design-6376f1a5225b2fa45f6c861d4a265bf13b56d038.zip | |
Update
Diffstat (limited to 'tpl/objects/lightbox.pug')
| -rw-r--r-- | tpl/objects/lightbox.pug | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/tpl/objects/lightbox.pug b/tpl/objects/lightbox.pug index 58abdae..02a3200 100644 --- a/tpl/objects/lightbox.pug +++ b/tpl/objects/lightbox.pug | |||
| @@ -1,20 +1,33 @@ | |||
| 1 | include icon.pug | 1 | include icon.pug |
| 2 | 2 | ||
| 3 | mixin lightbox(images) | 3 | mixin lightbox(images) |
| 4 | .o-lightbox | 4 | - |
| 5 | let classes = { | ||
| 6 | 'o-lightbox': true, | ||
| 7 | } | ||
| 8 | let linksClasses = { | ||
| 9 | 's-links': true, | ||
| 10 | } | ||
| 11 | |||
| 12 | if (attributes.theme) { | ||
| 13 | classes[`o-lightbox--${attributes.theme}`] = true; | ||
| 14 | linksClasses[`s-links--${attributes.theme}`] = true; | ||
| 15 | } | ||
| 16 | |||
| 17 | div(class=classes) | ||
| 5 | header.o-lightbox__header | 18 | header.o-lightbox__header |
| 6 | .s-links.s-links--colored | 19 | div(class=linksClasses) |
| 7 | block | 20 | block |
| 8 | +action-button(round=true quiet=true icon='x' class='o-lightbox__close-btn') | 21 | +action-button(theme=attributes.theme pill=true quiet=true icon='x' class='o-lightbox__close-btn') |
| 9 | each img, i in images | 22 | each img, i in images |
| 10 | img.o-lightbox__img(src=images[i] id='image-' + i) | 23 | img.o-lightbox__img(src=images[i] id='image-' + i) |
| 11 | +action-button(round=true quiet=true icon='chevron-left' class='o-lightbox__nav-btn o-lightbox__nav-btn--prev') | 24 | +action-button(theme=attributes.theme pill=true quiet=true icon='chevron-left' class='o-lightbox__nav-btn o-lightbox__nav-btn--prev') |
| 12 | +action-button(round=true quiet=true icon='chevron-right' class='o-lightbox__nav-btn o-lightbox__nav-btn--next') | 25 | +action-button(theme=attributes.theme pill=true quiet=true icon='chevron-right' class='o-lightbox__nav-btn o-lightbox__nav-btn--next') |
| 13 | 26 | ||
| 14 | img.o-lightbox__img.o-lightbox__img--default(src=images[0]) | 27 | img.o-lightbox__img.o-lightbox__img--default(src=images[0]) |
| 15 | if images.length > 1 | 28 | if images.length > 1 |
| 16 | +action-button(round=true quiet=true icon='chevron-left' class='o-lightbox__nav-btn o-lightbox__nav-btn--prev') | 29 | +action-button(theme=attributes.theme pill=true quiet=true icon='chevron-left' class='o-lightbox__nav-btn o-lightbox__nav-btn--prev') |
| 17 | +action-button(round=true quiet=true icon='chevron-right' class='o-lightbox__nav-btn o-lightbox__nav-btn--next') | 30 | +action-button(theme=attributes.theme pill=true quiet=true icon='chevron-right' class='o-lightbox__nav-btn o-lightbox__nav-btn--next') |
| 18 | .o-lightbox__thumbnails | 31 | .o-lightbox__thumbnails |
| 19 | each img, i in images | 32 | each img, i in images |
| 20 | - classes = i === 0 ? 'is-selected' : '' | 33 | - classes = i === 0 ? 'is-selected' : '' |
