Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ shortcode gallery #450

Merged
merged 2 commits into from
Jan 16, 2023
Merged

✨ shortcode gallery #450

merged 2 commits into from
Jan 16, 2023

Conversation

mircea-pavel-anton
Copy link
Contributor

Fixes #428

@mircea-pavel-anton
Copy link
Contributor Author

@nunocoracao For this one, I decided to go with the verbose list as a solution since it makes it that much more easier to set the custom width for each element.

@nunocoracao
Copy link
Owner

@mirceanton I don't agree with this implementation.

  1. can we use tailwind components please, defining styles in shortcodes is going to lead to problems.
  2. why do we need the new import?

@nunocoracao nunocoracao changed the title Feat 428/shortcode gallery ✨ shortcode gallery Jan 16, 2023
@nunocoracao nunocoracao changed the base branch from main to dev January 16, 2023 16:24
@mircea-pavel-anton
Copy link
Contributor Author

@nunocoracao Okay, I'll see what I can do. Sorry if this isn't following best practices, I don't normally do HTML, CSS & JS, it's all a bit new to me.

@mircea-pavel-anton
Copy link
Contributor Author

@nunocoracao As for the javascript import, should I simply dump the minified js into a file under static/js like we have zoom.min.js?

@nunocoracao
Copy link
Owner

For the CSS it will be super clear if you look at other shortcodes or partials. Tailwindcss docs are also super great.
Pro-tip for dev: run npm run example in one terminal window and npm run dev in another. The first one runs Hugo server and the second one compiles tailwind in real time if there are any changes. When you finish use npm run build to generate the final CSS file for the theme.

For the imports check what is happening for typeit for example.

  • add a new npm module to devDependencies
  • change the package.json copy-to-from array to add the new dependency
  • run npm run fullinstall
  • final lib should be in assets
  • change vendors partials to ONLY import the lib if the shortcode is being used (there are other examples there)

Sounds like a lot of effort but it will make everything super easy to update and maintain. My advice, check if you really need a new dependency for this or if could be achieved using just tailwind. Aka a quick search for twailwind image gallery might surprise you.

@nunocoracao
Copy link
Owner

@mirceanton if you want I can open a feature branch an we can collab before merging to dev (release branch)

@mircea-pavel-anton
Copy link
Contributor Author

@nunocoracao that would be amazing! This is the first time I'm touching this tech stack so I am quite lost to be honest.

@nunocoracao nunocoracao changed the base branch from dev to feature-shortcode-gallery January 16, 2023 23:20
@nunocoracao
Copy link
Owner

merging into feature branch for final alterations

@nunocoracao nunocoracao merged commit f11ef08 into nunocoracao:feature-shortcode-gallery Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🌟 Shortcode: Gallery
2 participants