Add expand button for some block elements
autoreconf opened this issue · 2 comments
When some block elements contains longer displays of verbatim text, it's better only render block elements a small height. Using expand button to get full height.
Examples:
code block
table
Javascript files in those html:
js for code block
js for table
:)
Are you sure this is something a theme should do?
Wouldn't this be more appropriate for a Sphinx extension?
This way, it could probably also allow switching this behavior on and off via reST syntax.
Since your examples also show a copy button, this is maybe something that could be combined with https://github.com/executablebooks/sphinx-copybutton/?
This also reminds me a bit of https://github.com/executablebooks/sphinx-design, but AFAICT, they don't provide anything for code blocks.
Examples:
...
table
I see a button there but it doesn't seem to do anything?
I see a button there but it doesn't seem to do anything?
Button is working, may be your browser not support it. Could you please try another browser if you want, both mobile and desktop.
Are you sure this is something a theme should do?
Wouldn't this be more appropriate for a Sphinx extension?
May be you are right, I already integrated sphinx-copybutton extension into all my docs. And also open an issue in that project. executablebooks/sphinx-copybutton#208
This way, it could probably also allow switching this behavior on and off via reST syntax.
I'm using MyST(markdown). You may be interested in this article https://hexatomic.github.io/documentation/tooling/evaluation.html