Skip to content

Commit

Permalink
fixing topbar for single page mode
Browse files Browse the repository at this point in the history
  • Loading branch information
choldgraf committed Apr 25, 2020
1 parent 5c61d6a commit 4efb85f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 1 addition & 3 deletions sphinx_book_theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@
{% block docs_main %}
<main class="col py-md-3 pl-md-4 bd-content overflow-auto{{ single_page }}" role="main">
{% block docs_body %}
{% if theme_single_page != True %}
{% include "topbar.html" %}
{% endif %}
{% include "topbar.html" %}
<div id="main-content" class="row">
<div class="col-12 col-md-9 col-xxl-7 pl-md-3 pr-md-0">
{{ super() }}
Expand Down
3 changes: 3 additions & 0 deletions sphinx_book_theme/topbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<div class="col-12 col-md-3 bd-topbar-whitespace site-navigation show">
</div>
<div class="col pl-2 topbar-main">
{% if theme_single_page != True %}
<button id="navbar-toggler" class="navbar-toggler ml-0" type="button" data-toggle="collapse" data-target=".site-navigation" aria-controls="navbar-menu" aria-expanded="true" aria-label="Toggle navigation" aria-controls="site-navigation">
<i class="fas fa-bars"></i>
<i class="fas fa-arrow-left"></i>
Expand Down Expand Up @@ -42,6 +43,8 @@

<!-- Extra buttons -->
{% if theme_use_edit_page_button and github_repo %}<a class="edit-button" href="{{ get_edit_url() }}"><button type="button" class="btn btn-secondary topbarbtn"><i class="fas fa-pencil-alt"></i><span class="topbar-button-text">Edit</span></button></a>{% endif %}

{% endif %}
</div>
<div class="d-none d-md-block col-md-2 bd-toc {{ show_if_no_margin() }}">
{%- include "docs-toc.html" %}
Expand Down

0 comments on commit 4efb85f

Please sign in to comment.