[IMP] extensions/spoilers: add an extension for spoilers
It is often needed in developer tutorials to show excerpts of code for
examples and solutions. This takes quite some page space and, for the
latter, it is not always desired to show the final code result right
after the exercise objective.
This commit adds a spoiler feature to the documentation to allow hiding
content until the reader wants to display it.
The feature relies on the new `.. spoiler:: Button label` directive.
task-3036845
closes odoo/documentation#2876
X-original-commit: 4d7a88639a
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Morgan Meganck <morm@odoo.com>
Co-authored-by: Stefano Rigano <sri@odoo.com>
This commit is contained in:
@@ -714,6 +714,24 @@ Code blocks
|
||||
def main():
|
||||
print("Hello world!")
|
||||
|
||||
.. _contributing/spoilers:
|
||||
|
||||
Spoilers
|
||||
========
|
||||
|
||||
.. list-table::
|
||||
:class: o-showcase-table
|
||||
|
||||
* - .. spoiler:: Answer to the Ultimate Question of Life, the Universe, and Everything
|
||||
|
||||
**42**
|
||||
|
||||
* - .. code-block:: text
|
||||
|
||||
.. spoiler:: Answer to the Ultimate Question of Life, the Universe, and Everything
|
||||
|
||||
**42**
|
||||
|
||||
.. _contributing/tabs:
|
||||
|
||||
Content tabs
|
||||
|
||||
Reference in New Issue
Block a user