Sphinx panels¶
- Sphinx extension 'sphinx-panels'
- Repository
- Documentation
Credit
At the moment the examples on this page are mostly a one to one copy of the sphinx-panels documentation.
Attention
These examples show what the extension is offering out of the box.
The TYPO3 community hasn't yet agreed on what possibilities we actually want to use. Note that we are using a different and dedicated extension for Sphinx-Tabs already.
This page
Examples¶
Example: Extension manual search¶
Extension manual search
fill in here
Example¶
Content of the top-left panel
Content of the top-right panel
example
Bottom-left panel
Hidden content
Example¶
Content of the top-left panel
Content of the top-right panel
Content of the bottom-left panel
Content of the bottom-right panel
Example¶
My content will fade in
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Tabbed Content¶
The tabbed
directive generates tabbed selection panels.
Sequential directives will be grouped together, unless the :new-group
option is added.
You can set which tab will be shown by default, using the :selected:
option.
Tab directives can contain any content, and you can also set CSS classes with :class-label:
and :class-content:
:
.. tabbed:: Tab 1
Tab 1 content
.. tabbed:: Tab 2
:class-content: pl-1 bg-primary
Tab 2 content
.. tabbed:: Tab 3
:new-group:
.. code-block:: python
import pip
.. tabbed:: Tab 4
:selected:
.. dropdown:: Nested Dropdown
Some content
Tab 1 content
Tab 2 content
import pip
Nested Dropdown
Some content
Here's an example of showing an example in multiple programming languages:
int main(const int argc, const char **argv) {
return 0;
}
def main():
return
class Main {
public static void main(String[] args) {
}
}
function main()
end
PROGRAM main
END PROGRAM main
Div Directive¶
The div
directive is the same as the container directive,
but does not add a container
class in HTML outputs, which is incompatible with Bootstrap CSS:
.. div:: text-primary
hallo
hallo
Combined Example¶
.. dropdown:: Panels in a drop-down
:title: bg-success text-warning
:open:
:animate: fade-in-slide-down
.. panels::
:container: container-fluid pb-1
:column: col-lg-6 col-md-6 col-sm-12 col-xs-12 p-2
:card: shadow
:header: border-0
:footer: border-0
---
:card: + bg-warning
header
^^^^^^
Content of the top-left panel
++++++
footer
---
:card: + bg-info
:footer: + bg-danger
header
^^^^^^
Content of the top-right panel
++++++
footer
---
:column: col-lg-12 p-3
:card: + text-center
.. link-button:: panels/usage
:type: ref
:text: Clickable Panel
:classes: btn-link stretched-link font-weight-bold