diff --git a/layouts/posts/single.html b/layouts/posts/single.html index a38bb83..fe10eb6 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -116,15 +116,17 @@ x-data="{ open: false, idx: 0, + fill: false, items: {{ $lbItems | jsonify }}, show(i) { this.idx = i; this.open = true }, - close() { this.open = false }, + close() { this.open = false; this.fill = false }, prev() { this.idx = (this.idx - 1 + this.items.length) % this.items.length }, next() { this.idx = (this.idx + 1) % this.items.length } }" @keydown.escape.window="open && close()" @keydown.arrow-left.window="open && prev()" @keydown.arrow-right.window="open && next()" + @keydown.f.window="open && (fill = !fill)" >
@@ -174,6 +176,15 @@
+ + + -
+
@@ -205,7 +220,8 @@ x-show="items[idx] && !items[idx].video" :src="items[idx] && !items[idx].video ? items[idx].img : ''" alt="" - class="max-w-full max-h-full object-contain" + :class="fill ? 'w-full h-full object-cover' : 'max-w-full max-h-full object-contain'" + class="transition-all duration-300" >