| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
- In the javascript setup, also configure the whole admonition title element to be clickable. This happens only in the case where it is a direct descendent of the admonition box and there is only one admonition title descendent. - This is not designed to be perfect, but is designed to be mostly safe with most themes. It still could cause problems, but it has been tested with alabaster, sphinx_book_theme, and sphinx_rtd_theme.
|
Just wondering if this was noticed (I submitted it during the holiday times) |
Sorry, something went wrong.
There was a problem hiding this comment.
Ooh I did miss this! But I think that it's a nice addition! Ideally we could do this purely with CSS, but I think adding the JS functionality is a nice step forward nonetheless.
I added a quick additional CSS rule so that the mouse becomes a "pointer" when you hover over toggle-able admonition titles, but other than that this seems good to go. I also removed some specific selectors for div so that this works with newer versions of sphinx/docuils
Sorry, something went wrong.
|
Let me know if my commits look good to you @rkdarst - then we can merge 👍 |
Sorry, something went wrong.
|
many thanks for this improvement @rkdarst ! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This was inspired by the discussion in Improve toggle button design and structure #28, and having a bit of
spare time and wanting to try something. This gets the "admonition"
part of those design ideas.
In the javascript setup, also configure the whole admonition title
element to be clickable. This happens only in the case where it is
a direct descendent of the admonition box and there is only one
admonition title descendent.
This is not designed to be perfect, but is designed to be mostly
safe with most themes. It still could cause problems, but it has
been tested with alabaster, sphinx_book_theme, and sphinx_rtd_theme.
I don't claim to know javascript or CSS, or have deep knowledge of
sphinx-togglebutton. But I do know enough and could read and web
search enough to see how to add the onclick watcher + data to
identify the right thing to toggle.
Suggested reviews:
sense.
three themes above and firefox/chrome)
could be released and fixed later.