Guggenheim - An algorithm for a perfectly balanced Gallery for Kirby

Thatā€™s so cool!

So itā€™s a merge of PhotoSwipe and Masonry (besides the client-side / server-side part) ?

I didnā€™t make that out of the opening post - thanks for mentioning!

ā€¦and sorry for the misunderstanding (bad, my English!).

Thanks @distantnative for clearing things up. The kirbytag is already there, thereā€™s just the opportunity missing (at least as far as I can tell) that the plugin automatically gets a caption for PhotoSwipe from a field defined in the txt-source file.

Yeah, like @distantnative just said, youā€™re bit on the wrong track about the plugin :grin:

Iā€™m only suggesting using PhotoSwipe through my referencing Gist because the two goes beautiful together and creates an experience comparable to medium.comā€™s image grids, you can in fact disable PhotoSwipe and leave it out completely - So PhotoSwipe is actually only added sugar on top of Guggenheim which on the other hand introduces an magically awesome algorithm for creating the responsive gallery layout you see on the screenshot and live demo (unless youā€™re on a mobile in portrait mode).

Masonry, doesnā€™t balance its grid anything like this, and if you care about mobile performance (expensive browser paints, reflows, grid calculations and DOM manipulations) youā€™ll love Guggenheim as itā€™s completely server-side - just like seen ONLY at medium.com.

By the way, Iā€™m happy to tell that Dmitry, the creator of PhotoSwipe, likes the plugin and now have listed Kirby CMS in his list of integrations on the repo https://github.com/dimsemenov/PhotoSwipe

Iā€™m doing the captions very soon, i just didnā€™t think that part through before it shipped :ok_hand:

3 Likes

Thatā€™s so very cool!

I visited the Guggenheim Museum SoHo way back in the 1970ā€™s of the previous century and itā€™s nice to have it back ā€œonlineā€ :smile:

I still remember the silence of the white walls and itā€™s impressive architecture!

No problem :blush:

Thatā€™s awesome - Sure it was in fact the idea behind naming it Guggenheim - to leave all of its complexities entirely behind and just present the content in the most clean and simple way possible.

Guggenheim is perfect :smile:

Once youā€™ve been there, youā€™ll never forget itā€™s architecture and impressive state of mind!

1 Like

Thanks mate. And again, awesome work youā€™ve done with this!

1 Like

Thank you @jakobploens! :blush:

  • It now supports figcaptions if a ā€˜captionā€™ field is present for the image, which is visually hidden, but shows when opened in PhotoSwipe.

Beautiful beautiful beautiful. I currently have a codepen open trying to achieve this exact alignmentā€¦ and Iā€™m headed down the exact wrong path. More than happy to pay for a moral license.

Thank you very much @samnabi and also for your contribution which I have received and by the way was the first! :+1:

  • Iā€™m happy to hear that you like it! :blush:

I already said it on Twitter. I love this!! Having a server side implementation is awesome and exactly what I needed for a current client project. Just bought a license as well.

A little side-note: I think itā€™s brilliant that more and more Kirby plugin developers go for the moral license. But please keep in mind that this model has its limitations. So far it works great for Kirby, but it only works because of Kirbyā€™s main target audience is a very professional and decent bunch of people :slight_smile: Iā€™m not sure if this easily scales to all plugins though. Iā€™m more than happy if it does, but donā€™t feel bad about just taking money for something you spent time and knowledge on in the old fashioned way. Many people forget how much it takes to maintain and support code you put out there. Building something is easy. Taking care for it over a long time is not. Kirby is getting better and better with all the available plugins out there. The more sustainable those plugins are for their creators the more other users can rely on them. Iā€™m a huge fan of open-source, of sharing knowledge and code, but we should never forget the people behind the projects we build upon.

9 Likes

Thank you, @bastianallgeier it means a lot to me! :blush:

This plugin is actually my first real code project in the wild, to be honest I was indeed really really worried about how it mightā€™ve been received if I went that exact old fashioned route youā€™re mentioning. But I have actually now decided to put it on hold for a minute, as Iā€™m rethinking itā€™s future a bit (I promise it will be back again soon).

Hi,
thats really bad to hear that you have decided to put the code out off the web.
And I canā€™t understood why you do this btw. where a problem could be?
That plugin would solve a problem actually for me.

Kind

Itā€™s still out there (or maybe again?): https://github.com/SiteMarina/guggenheim

Hi,
but without any files :smile:.

Oh, sorry, I didnā€™t see that itā€™s empty ā€¦

Iā€™m really sorry guys, Iā€™m currently working on a way that follows Kirbyā€™s well known way of maintaining updates through Git.

Iā€™ve just added a Pre-launch Option for those off you who wants the plugin earlier, and Iā€™m making sure to also update and email you as soon as I have the better and more streamlined option for future updates ready.

This looks very promising!

How predictable is the algorithm? For example, if I select two portrait photos, would it split them 50/50? What about three? Are there ways of defining a preferred layout or column-count (either in the kirbytag or by modifying the pluginā€™s core)?

Either way, this will be very useful for an upcoming project.

Thank you very much @onartis! :smiley:

I really havenā€™t met any edge cases against its use case, which is exactly what you see in the demo.

If you give it two photos, itā€™ll most likely split 'em two up aside each other (unless it collides with the width and height options, which you can specify and manipulate its calculations from by yourself, that way you can interfeer with its behaviour), so the images will not necessarily come out as 50%/50% unless they have the same aspect ratio because remember, this is weighted out from the aspect ratios of the images against a overall width and an ideal row height - but what I can assure you of, is that itā€™ll go beautifully up - letā€™s say the aspect ratio of the images is exactly the same, then theyā€™ll be balanced 50%/50% at some height, but if you give it an image in portrait ratio and one in landscape ratio, theyā€™ll not be 50%/50% but balanced out, two up aside each other. I hope this makes sense :grin:

Theres no way to define layout or column count, as that would essentially disable the algorithm from exactly figuring all this stuff out on its own from the images and their order you feed the gallery with - but you can tweak the overall width and the ideal height, to somewhat interfeer with how it balance them.