cajames / kirby-editor-gallery-block Goto Github PK
View Code? Open in Web Editor NEWA gallery block for the Kirby Editor
License: MIT License
A gallery block for the Kirby Editor
License: MIT License
Hey,
great plugin - love it :-)
Is it possible to link the image - maybe a lightboxlink?
In the gallery.php i try:
<div class="k-editor-gallery-image-wrapper" style="<?= $imageStyle ?>">
<a href="<?= $image['image']->url()?>" data-fancybox="gallery">
<img class="k-editor-gallery-image <?= $image['imageClass'] ?>" srcset="<?= $image['image']->srcset([500, 1000, 1500]) ?>" sizes="(max-width: 640px) 500px, (max-width: 1200px) 1000px, 1500px" itemprop="thumbnail" alt="<?= $image['altText'] ?>" />
</a>
</div>
Thx for help.
I noticed you calculate the widths and number of images in the rows automatically. Depending on where you want to go with this plugin it would make sense to optionally have a simpler image group without set widths โ for example when using the block as a slideshow.
Or do you think it would be better to create a fork for something like that?
It might actually be enough to make the batchRatioLimit
variable editable via an option: https://github.com/cajames/kirby-editor-gallery-block/blob/master/src/components/Gallery.vue#L209
Hi, @cajames, thank you for creating this beautiful plugin.
I especially love your snippet width math, it is a masterpiece. :-)
But there is an issue in the editor every time when I try to delete gallery block
can't access property "open", this.$refs.settings is undefined
How to reproduce:
I added 7 images, they went to 4 rows.
When I try to delete rows from the bottom one, this happens every time on the second one from the bottom.
Great work! I have 3 feature requests :)
I would like being able to
thanx
I'm wondering how feasible it would be to add support for inline videos within the gallery block.
Video settings could include: Loop, Autoplay, Muted, Show/hide controls.
I'm not sure if it's me or the plugin, but I can't make it work with more than one langauge. Default language is showing the images, second language doesn't.
Hey!
I really love the plugin, thanks so much for making it!
I'm trying to do something kind of like a slideshow and I'm wondering if it's possible to get the index of the current image and the count() of all images in each gallery block?
In the gallery.php snippet I've tried this (which I found on the forum)
<?php
$total = $images->count();
...
...
?>
and then in the loop I would like to be able to do something like this:
<?= $images->indexOf($image) + 1 . "/" . $total;?>
Currently when I try this I'm getting this error:
Method Kirby\Editor\Blocks::__toString() must not throw an exception, caught Error: Call to a member function count() on array
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.