-
Notifications
You must be signed in to change notification settings - Fork 336
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
How to put content in tabs? #1667
Comments
I don't think it's possible out of the box at the moment. In rmarkdown, tabsets work thanks to a script (and CSS) added by rmarkdown. In pkgdown, one would probably have to use Bootstrap tabs, i.e. adding some more HTML tweaking to mimick the necessary HTML structure. <nav>
<div class="nav nav-tabs" id="nav-tab" role="tablist">
<a class="nav-link active" id="nav-home-tab" data-toggle="tab" href="#nav-home" role="tab" aria-controls="nav-home" aria-selected="true">Home</a>
<a class="nav-link" id="nav-profile-tab" data-toggle="tab" href="#nav-profile" role="tab" aria-controls="nav-profile" aria-selected="false">Profile</a>
<a class="nav-link" id="nav-contact-tab" data-toggle="tab" href="#nav-contact" role="tab" aria-controls="nav-contact" aria-selected="false">Contact</a>
</div>
</nav>
<div class="tab-content" id="nav-tabContent">
<div class="tab-pane fade show active" id="nav-home" role="tabpanel" aria-labelledby="nav-home-tab">...</div>
<div class="tab-pane fade" id="nav-profile" role="tabpanel" aria-labelledby="nav-profile-tab">...</div>
<div class="tab-pane fade" id="nav-contact" role="tabpanel" aria-labelledby="nav-contact-tab">...</div>
</div> |
Thanks for the pointer, @maelle. I have been playing around with but not yet had success. I can get tabs to appear but no content. I'll keep playing with it. |
Oh, what I meant is that maybe pkgdown should do the transformation to this html structure needed by Bootstrap, but maybe it's a too niche feature. |
draft PR #1694 |
I have attempted to create tabs following this R Markdown Cookbook section, but the tabs render as sequential entries in the rendered website.
My goal is to demonstrate the use of a package in both R and python. Any advice?
Here's what I would like to do:
The text was updated successfully, but these errors were encountered: