Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/gethugothemes/hugo-modules/shortcodes/gallery

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/gethugothemes/hugo-modules/shortcodes/gallery

  • v0.0.0-20241203025515-30ad48e108af
  • Source
  • Go
  • Socket score

Version published
Created
Source

use this new version instead https://github.com/gethugothemes/hugo-modules/tree/master/gallery-slider

Install Module

Add the following code to your module list in the config/_default/module.toml file.

[[imports]]
path = "github.com/gethugothemes/hugo-modules/shortcodes/gallery"

Add the following code to your js plugins list in the config.toml file.

[[params.plugins.js]]
link = "plugins/glightbox.js"

Add the following code to your assets/scss/main.scss or assets/scss/style.scss file.

@import 'gallery';

Shortcode Implementation

<!-- internal link -->
{{< gallery dir="images/gallery">}}
<!-- external link -->
{{< gallery dir="images/gallery" class="your-class" height="400" width="400" webp="false" command="Fit" option="" zoomable="true" >}}

Slider

Note: You must need to add swiper slider to use this shortcode.

Add the following code to your js plugins list in the config.toml file.

[[params.plugins.js]]
link = "plugins/swiper-bundle.js"

Add the following code to your css plugins list in the config.toml file.

[[params.plugins.css]]
link = "plugins/swiper-bundle.css"
<!-- internal link -->
{{< slider dir="images/gallery">}}
<!-- external link -->
{{< slider dir="images/gallery" class="your-class" height="400" width="400" webp="false" command="Fit" option="" zoomable="true" >}}

Initialize slider into your script

// gallery slider
new Swiper(".gallery-slider", {
  slidesPerView: 1,
  loop: true,
  autoHeight: true,
  spaceBetween: 0,
  speed: 1500,
  autoplay: {
    delay: 5000,
  },
  navigation: {
    nextEl: ".swiper-button-next",
    prevEl: ".swiper-button-prev",
  },
});

FAQs

Package last updated on 03 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc