kdevo / osprey-delight

Osprey Delight is the free-minded artist's choice for a clutter-free and blazingly fast single-page portfolio.
https://hugo-mods.github.io/
Apache License 2.0
99 stars 44 forks source link

Image gallery #11

Closed ghost closed 3 years ago

ghost commented 3 years ago

I use Osprey Delight on my commercial website. There are some features i needed to add/modify, so I did that. One of the features I modified was gallery. My version is just picture gallery it works like that:

  1. Gallery contains miniatures of images
  2. Nothing happens on-hover
  3. On-click event displays popup with nothing, but larges size of this image and (X) in corner

I think it would be really beneficial to add this feature to theme, since it probably is popular use case. In best-case scenario theme would auto-detect if content/gallery/*.md files have actual content. Other scenario would be just adding flag in config.yaml. I won't open pull request with what I currently have, because my version overrides default one, is based on v3 and doesn't work perfectly on all screen sizes.

kdevo commented 3 years ago

Hello @wilmhit,

Could you point me to the site and the forked theme repo? I think I know how you mean it, but to ensure that we speak about the same thing, it's better to see it in action.

ghost commented 3 years ago

Unfortunately the live site is down due to covid restrictions in my country, but site repo is here.

kdevo commented 3 years ago

As far as I can see, what you would like to have is a Lightbox-Gallery (example). While I think that it would indeed be nice to have a proper image gallery, I do not think that we should (mis)use the current gallery modal boxes for it, as they are meant for project showoff with descriptions. The gallery was never meant to be a pure image gallery and co-opting this feature with the current approach would require much work and testing to get it right. I do not have the resources to maintain it. Nevertheless, I might add a proper image gallery via an existing library some day. Unfortunately I did not find one yet that is a) not bloated b) has a compatible license and c) fits into the theme's minimalistic style. Open to any suggestions here!

Some advice: Forking/Copying a project like you did is a good way to customize everything, but I think it makes future upgrades hard. I suggest that you migrate the theme to the new version without manually copying it and use a git submodule instead. You can then e.g. use the new section-loading mechanism to add new layouts that are considered in the navbar. In your case, you would e.g. add partials/sections/clips.html, with the identifier "clips". Combine this with Hugo's virtual file system (do not use the theme's layouts directory, but instead use your project-relative/local one, e.g. PROJECT-ROOT/layouts/partials/sections/clips.html) and future upgrades are way more welcoming than always merging/rebasing your own modifications with upstream.

kdevo commented 3 years ago

See above referenced issue for a survey regarding the next iteration