|
| 1 | +{#- |
| 2 | + |
| 3 | +Hi there! |
| 4 | + |
| 5 | +You might be interested in https://pradyunsg.me/furo/customisation/sidebar/ |
| 6 | + |
| 7 | +Although if you're reading this, chances are that you're either familiar |
| 8 | +enough with Sphinx that you know what you're doing, or landed here from that |
| 9 | +documentation page. |
| 10 | + |
| 11 | +Hope your day's going well. :) |
| 12 | + |
| 13 | +-#} |
| 14 | +<a class="sidebar-brand{% if logo %} centered{% endif %}" href="{{ pathto(master_doc) }}"> |
| 15 | + {% block brand_content %} |
| 16 | + {%- if logo_url %} |
| 17 | + <div class="sidebar-logo-container"> |
| 18 | + <img class="sidebar-logo" src="{{ logo_url }}" alt="Logo"/> |
| 19 | + </div> |
| 20 | + {%- endif %} |
| 21 | + {%- if theme_light_logo and theme_dark_logo %} |
| 22 | + <div class="sidebar-logo-container"> |
| 23 | + <img class="sidebar-logo only-light" src="{{ pathto('_static/' + theme_light_logo, 1) }}" alt="Light Logo"/> |
| 24 | + <img class="sidebar-logo only-dark" src="{{ pathto('_static/' + theme_dark_logo, 1) }}" alt="Dark Logo"/> |
| 25 | + </div> |
| 26 | + {%- endif %} |
| 27 | + {% if not theme_sidebar_hide_name %} |
| 28 | + <span class="sidebar-brand-text">{{ docstitle if docstitle else project }}</span> |
| 29 | + {%- endif %} |
| 30 | + {% endblock brand_content %} |
| 31 | + <select class="doc-version-switcher" onchange="switchDocs()"> |
| 32 | + <option value="stable">Stable</option> |
| 33 | + <option value="unstable">Unstable</option> |
| 34 | + </select> |
| 35 | +</a> |
| 36 | + |
| 37 | +<script> |
| 38 | + function switchDocs() { |
| 39 | + var selectBox = document.querySelector('.doc-version-switcher'); |
| 40 | + var selectedValue = selectBox.options[selectBox.selectedIndex].value; |
| 41 | + if (selectedValue === 'unstable') { |
| 42 | + window.location.href = 'http://docs-unstable.bonsaibim.org/'; |
| 43 | + } else { |
| 44 | + window.location.href = 'http://docs.bonsaibim.org/'; |
| 45 | + } |
| 46 | + } |
| 47 | +</script> |
0 commit comments