ralfbiedert / cheats.rs

Rust Language Cheat Sheet - https://cheats.rs
https://cheats.rs
4.09k stars 382 forks source link

Add top button #185

Closed mfirhas closed 8 months ago

mfirhas commented 11 months ago

Add navigation button to scroll top to content indexes.

ralfbiedert commented 11 months ago

Thanks for the PR. This has been suggested before, see #109 on thoughts why I'm not entirely convinced.

ralfbiedert commented 11 months ago

Ok, I've now had a 2nd look and saw the .js logic.

The button only shows when scrolling back up? I could be see this being added and only show in very specific circumstances, like only on mobile browsers known not to have a scroll-to-top (e.g., Safari on iOS won't need it, FF on Android probably would) and only when scrolling up for a bit, as to not use screen estate.

Could you maybe deploy this somewhere and post a link so I could test this from a few browsers?

mfirhas commented 11 months ago

Hi, the button only shows up when you're top_button_scroll_threshold from top. I think you're right, only mobile without scroll top feature will need this, but Im not sure which ones. Beside, there might be some scroll-top plugins for those mobile browsers. I leave it to you if you want to close this.

ralfbiedert commented 8 months ago

Closing for now. Would need to see a demo and some more discussion beyond #109 why this shouldn't be a browser feature.