2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-30 04:26:44 +00:00

Improve CSS for main page

- Breadcrumb now appears above sidenav tree
- Better margin / etc
This commit is contained in:
Oliver Walters 2019-05-09 22:23:43 +10:00
parent 34225193fa
commit d04f38c724
3 changed files with 33 additions and 9 deletions

View File

@ -121,13 +121,26 @@
.navigation { .navigation {
} }
.breadcrump {
margin-bottom: 5px;
}
.inventree-body {
width: 100%;
padding: 5px;
margin: 10px;
}
.inventree-pre-content {
width: 100%;
clear: both;
}
.inventree-content { .inventree-content {
padding-left: 5px; padding-left: 5px;
padding-right: 5px; padding-right: 5px;
padding-top: 15px; padding-top: 5px;
margin-right: 50px; width: auto;
margin-left: 50px;
width: 100%;
transition: 0.1s; transition: 0.1s;
} }
@ -173,7 +186,7 @@
position: fixed; /* Stay in place */ position: fixed; /* Stay in place */
background-color: #fff; /* Black*/ background-color: #fff; /* Black*/
overflow-x: hidden; /* Disable horizontal scroll */ overflow-x: hidden; /* Disable horizontal scroll */
//transition: 0.1s; /* 0.5 second transition effect to slide in the sidenav */ transition: 0.1s; /* 0.5 second transition effect to slide in the sidenav */
} }
.wrapper { .wrapper {

View File

@ -68,6 +68,7 @@ function loadTree(url, tree, options={}) {
} }
function openSideNav() { function openSideNav() {
document.getElementById("sidenav").style.display = "block";
document.getElementById("sidenav").style.width = "250px"; document.getElementById("sidenav").style.width = "250px";
document.getElementById("inventree-content").style.marginLeft = "270px"; document.getElementById("inventree-content").style.marginLeft = "270px";
@ -77,8 +78,9 @@ function openSideNav() {
} }
function closeSideNav() { function closeSideNav() {
document.getElementById("sidenav").style.display = "none";
document.getElementById("sidenav").style.width = "0"; document.getElementById("sidenav").style.width = "0";
document.getElementById("inventree-content").style.marginLeft = "50px"; document.getElementById("inventree-content").style.marginLeft = "0px";
sessionStorage.setItem('inventree-sidenav-state', 'closed'); sessionStorage.setItem('inventree-sidenav-state', 'closed');
} }

View File

@ -52,19 +52,26 @@ InvenTree
<div class='main body wrapper'> <div class='main body wrapper'>
<div class='inventree-body'>
<div class='containter-fluid inventree-pre-content'>
{% block pre_content %}
{% endblock %}
</div>
<div class='sidenav' id='sidenav'> <div class='sidenav' id='sidenav'>
{% block sidenav %} {% block sidenav %}
{% endblock %} {% endblock %}
</div> </div>
<div class="container container-fluid inventree-content" id='inventree-content'> <div class="container container-fluid inventree-content" id='inventree-content'>
{% block pre_content %}
{% endblock %}
{% block content %} {% block content %}
<!-- Each view fills in here.. --> <!-- Each view fills in here.. -->
{% endblock %} {% endblock %}
{% block post_content %} {% block post_content %}
{% endblock %} {% endblock %}
</div> </div>
{% include 'modals.html' %} {% include 'modals.html' %}
@ -72,6 +79,8 @@ InvenTree
{% include 'notification.html' %} {% include 'notification.html' %}
</div> </div>
</div>
<!-- Scripts --> <!-- Scripts -->
<script type="text/javascript" src="{% static 'script/jquery_3.3.1_jquery.min.js' %}"></script> <script type="text/javascript" src="{% static 'script/jquery_3.3.1_jquery.min.js' %}"></script>
<script type='text/javascript' src="{% static 'script/jquery.form.min.js' %}"></script> <script type='text/javascript' src="{% static 'script/jquery.form.min.js' %}"></script>