-
Notifications
You must be signed in to change notification settings - Fork 213
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
sphinx_tabs.tabs are not rendered properly #207
Comments
Looking at sphinx-tabs it does a lot of direct JS manipulation in many of the same areas that sphinx-bootstrap-theme does whereas I'm guessing those other things are mostly just server-rendered without heavy JS stuff. Would welcome a PR that can accommodate / harmonize both worlds! |
Under the hood they're using semantic-ui. Can semantic-ui and bootstrap mix well? If you're wanting to hack things, might be worth trying to modify the In your html_static_path = ["_static"]
# called automagically for you by sphinx as long as in conf.py
def setup(app):
# relative to html_static_path! so file is _static/hack.js
app.add_js_file("hack.js") If you're better at javascript, maybe you see a clever way to transform the classes you need from semantic-ui classes to bootstrap classes? (I know almost zero js ... just trying to point you in a direction that will let you tinker if you want to!) Hope that helps some! But unless bootstrap and semantic-ui are supposed to be able to play well with each other, I don't think this is an issue with this theme. You may need to choose one or the other 🙁 |
Yeah, unfortunately, I don't know JS. |
😱 It's voodoo to me too. FWIW, if you want to keep using the bootstrap theme and you don't have a large number of these tab things you want to do, you can get by using .. raw:: html
<ul class="nav nav-tabs" role="tablist">
<li class="active">
<a href="#tab-conda" role="tab" data-toggle="tab">(recommended) Conda (Linux/MacOS/Windows)</a>
</li>
<li>
<a href="#tab-debian" role="tab" data-toggle="tab">Debian/Ubuntu</a>
</li>
</ul>
.. raw:: html
<div class="tab-content panel panel-default">
<div class="tab-pane active panel-body" id="tab-conda">
1. Create your conda environment (e.g., `elephant_env`):
.. code-block:: sh
conda create --name elephant_env python=3.7 numpy scipy tqdm
2. Activate your environment:
.. code-block:: sh
conda activate elephant_env
.. raw:: html
</div><!-- /tab-conda -->
<div class="tab-pane panel-body" id="tab-debian">
Open a terminal and run:
.. code-block:: sh
sudo apt-get install python-pip python-numpy python-scipy python-pip python-six python-tqdm
.. raw:: html
</div><!-- /tab-debian -->
</div><!-- /tab-content --> Mostly just copy-pasta from this SO answer, but I added It may be worth asking the author of |
The bootstrap theme does not render
sphinx_tabs.tabs
properly.Sphinx-tabs project: https://github.com/djungelorm/sphinx-tabs
Results in
Expected
I don't experience this problem with other themes like alabaster (default) or sphinx-rtd.
The text was updated successfully, but these errors were encountered: