From 27616aff3eaa1fb8baecfcfec1f0542473d1fb36 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Tue, 15 Feb 2022 18:57:05 +0100 Subject: Added lightbox --- tpl/objects/backdrop.pug | 12 +++++++++++- tpl/objects/lightbox.pug | 5 +++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 tpl/objects/lightbox.pug (limited to 'tpl/objects') diff --git a/tpl/objects/backdrop.pug b/tpl/objects/backdrop.pug index 5d0c9e8..3de1f99 100644 --- a/tpl/objects/backdrop.pug +++ b/tpl/objects/backdrop.pug @@ -1,3 +1,13 @@ mixin backdrop - .o-backdrop.u-p-static(style={ width: '100%', 'min-height': '5em', 'max-height': '40em' }) + - + let classes = { + 'o-backdrop': true, + 'u-p-relative': true, + 'o-backdrop--center': attributes.center + } + if (attributes.class) { + classes[attributes.class] = true; + } + + div(class=classes, style={ width: '100%', 'min-height': '5em', 'max-height': '40em' }) block diff --git a/tpl/objects/lightbox.pug b/tpl/objects/lightbox.pug new file mode 100644 index 0000000..ba68299 --- /dev/null +++ b/tpl/objects/lightbox.pug @@ -0,0 +1,5 @@ +mixin lightbox(src) + .o-lightbox + header.o-lightbox__header + +action-button(round=true quiet=true icon='x' class='o-lightbox__close-btn') + img.o-lightbox__img(src=src) -- cgit v1.2.3-70-g09d2