-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[HTML Theme]: Add "Navigate to Top" Button #12618
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we have some visual examples? maybe a GIF showing how it renders?
Also, how do you enable / disable the feature actually? I think you need to setup the configuration file of the theme as well with an additional boolean (and document it as well in the RST files)
I haven't added anything that enable/disable this button. I'll have to dive deep to see how this can be achieved. Can you provide me some guidance for the same? And, currently it looks like this - navigate_to_top_recording.mov |
I didn't forget about you but I am travelling this week. I'll be able to provide guidance in 10 days or so (or someone else can if they have time). So don't worry about me not replying! By the way, I like how it currently renders (we need to make the button a bit.. less crude but the overall idea is fine). |
I don't think this should be part of |
@@ -11,6 +11,10 @@ | |||
|
|||
/* -- main layout ----------------------------------------------------------- */ | |||
|
|||
html { | |||
scroll-behavior: smooth; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is something we should force onto every derived theme.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HTML specifies the #top anchor which seems simpler than this script.
I agree with Matthias (@mgeier) that this isn't wanted in every theme. Perhaps you could propose a PR to add it to sphinx13 and add a recipe for it to the docs in a tutorial? I'll close this PR for now, though. A |
Feature
Purpose
Detail
Relates