gallerydeluxe icon indicating copy to clipboard operation
gallerydeluxe copied to clipboard

Add spaceBetweenImages to config

Open cnichte opened this issue 1 year ago • 6 comments

How to change the gap between the images?

cnichte avatar Dec 28 '24 16:12 cnichte

I don't think you currently can do that (or at least not easily).

I notice that Pig (the JS library in use) has a ´spaceBetweenImages` which I have hardcoded to 1, but we could export that option to the Hugo config, I guess.

bep avatar Dec 28 '24 18:12 bep

Yep, I've found that too :-D there are a bunch of options. Would be cool if they all went into the Hugo config and were passed to pig.js:

var options = {
  containerId: 'pig',
  classPrefix: 'pig',
  figureTagName: 'figure',
  spaceBetweenImages: 8,
  transitionSpeed: 500,
  primaryImageBufferHeight: 1000,
  secondaryImageBufferHeight: 300,
  thumbnailSize: 20
  }

cnichte avatar Dec 28 '24 22:12 cnichte

I wouldn't mind just adding pigOptions to the config struct and just pass that on to Pig. Pull request would be welcomed.

bep avatar Dec 28 '24 22:12 bep

Cloned the repo and added the Change allready :-D

cnichte avatar Dec 28 '24 23:12 cnichte

Hi, I have no idea if I have done everything right. I can't create a pull request with my changes.

If you want to see how I used the galleries deluxe: binary-voids.de

  • improved the navigation
  • added theme support, and a toggle to switch to dark mode
  • added a to Top Button

Have a good start into the new year!

cnichte avatar Dec 30 '24 15:12 cnichte

Have a good start into the new year!

Same to you. Some really great looking galleries at binary-voids.de.

I will look into getting your suggestions into the theme ... next year. I have been busy doing nothing this xmas.

bep avatar Dec 30 '24 17:12 bep