jpanther / congo

A powerful, lightweight theme for Hugo built with Tailwind CSS.
https://jpanther.github.io/congo/
MIT License
1.23k stars 328 forks source link

feat: add js to check height and decide if to top is required #806

Closed Jh123x closed 2 months ago

Jh123x commented 9 months ago

Set scroll to top element to available when page height -150 > browser height. -150 is based on testing

Closes #772

netlify[bot] commented 9 months ago

Deploy Preview for hugo-congo ready!

Built without sensitive environment variables

Name Link
Latest commit fce82b45b2a4fa19d424e5959b95b7b184f5dca1
Latest deploy log https://app.netlify.com/sites/hugo-congo/deploys/663a4c96941a350007d966c4
Deploy Preview https://deploy-preview-806--hugo-congo.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

jpanther commented 6 months ago

I'm not against making this a JS feature as frankly the current implementation using only CSS is a bit hacky, but I still think it should honour the .Site.Params.footer.showScrollToTop parameter.

Jh123x commented 6 months ago

I'm not against making this a JS feature as frankly the current implementation using only CSS is a bit hacky, but I still think it should honour the .Site.Params.footer.showScrollToTop parameter.

Hmm, let me try it in another way

Jh123x commented 6 months ago

It should also obey the rule in the config now

jpanther commented 2 months ago

Thanks, I'll merge this in now!