2
0
mirror of https://github.com/inventree/inventree-docs.git synced 2025-04-27 21:26:43 +00:00

More banner fixes (#332)

* More banner fixes

- Restore original banner (search box etc)
- Make version banner dismissable
- Better CSS styling

* Disable debug
This commit is contained in:
Oliver 2022-07-26 21:36:58 +10:00 committed by GitHub
parent c23165307b
commit 0caeec0451
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 7 deletions

View File

@ -1,4 +1,4 @@
{% extends "base.html" %} {% extends "main.html" %}
{% block tabs %} {% block tabs %}
{{ super() }} {{ super() }}

View File

@ -0,0 +1,6 @@
{% extends "base.html" %}
{% block header %}
{% include "partials/version_banner.html" %}
{% include "partials/header.html" %}
{% endblock %}

View File

@ -1,3 +0,0 @@
{% include "banner.html" %}
{{ super }}

View File

@ -1,5 +1,5 @@
{% if config.version_banner %} {% if config.version_banner %}
<div class='md-banner md-banner--warning'> <div class='alert alert-warning alert-dismissable alert-version' role='alert'>
<div class='md-grid md-typeset'> <div class='md-grid md-typeset'>
<small> <small>
{% if config.readthedocs.version == 'latest' %} {% if config.readthedocs.version == 'latest' %}
@ -9,6 +9,7 @@
{% endif %} {% endif %}
For <em>stable</em> release documentation, use the version selector located in the bottom right corner of this page. For <em>stable</em> release documentation, use the version selector located in the bottom right corner of this page.
</small> </small>
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div> </div>
</div> </div>
{% endif %} {% endif %}

View File

@ -128,4 +128,10 @@ div:nth-of-type(1) p {
background-color: #337ab7; background-color: #337ab7;
border-color: #2e6da4; border-color: #2e6da4;
color: #fff; color: #fff;
}
.alert-version {
padding: 5px;
margin: 5px;
margin-bottom: 0px;
} }

View File

@ -34,12 +34,12 @@ theme:
- toc.autohide - toc.autohide
edit_uri: "" # Disable "Edit" button edit_uri: "" # Disable "Edit" button
extra_css: extra_css:
- stylesheets/extra.css
- stylesheets/brands.css - stylesheets/brands.css
- stylesheets/regular.css - stylesheets/regular.css
- stylesheets/solid.css - stylesheets/solid.css
- stylesheets/bootstrap.css - stylesheets/bootstrap.css
- stylesheets/splide.min.css - stylesheets/splide.min.css
- stylesheets/extra.css
extra_javascript: extra_javascript:
- javascripts/extra.js - javascripts/extra.js
- javascripts/fontawesome.js - javascripts/fontawesome.js