Replies: 1 comment
-
Any ideas? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all!
Why does the gallery mode functionality disappear when I upload the site to GitHub, even though it works when I run it locally using
hugo server -D
?Step 1: Create a new partial
First, create a new partial file for the modal window. In your Hugo project, navigate to the
layouts/partials
directory and create a new file namedgallery-modal.html
. Add the following code to the file:Step 2: Modify the gallery shortcode
Next, you need to modify the
gallery.html
shortcode file in thelayouts/shortcodes
directory. Open the file and locate the{{ $relref := .Page.RelPermalink }}
line. Below that line, add the following code:Step 3: Add CSS styles
Finally, add the necessary CSS styles to your theme. Open the
assets/scss/custom.scss
file and add the following code:when I click on an image in the gallery, the modal window open with the clicked image displayed.
Beta Was this translation helpful? Give feedback.
All reactions