Keep tree items constrained to a single line

This commit is contained in:
Oliver Walters 2021-02-23 19:38:28 +11:00
parent 15275d24b4
commit 0016628b41
3 changed files with 31 additions and 11 deletions

View File

@ -206,8 +206,19 @@
font-size: 10px; font-size: 10px;
} }
.sidenav-left .badge {
position: absolute;
right: 3px;
margin-right: 5px;
}
.treeview .list-group-item { .treeview .list-group-item {
padding: 6px 12px; padding: 10px 5px;
}
.treeview .list-group-item .indent {
margin-left: 3px;
margin-right: 3px;
} }
.list-group-item-condensed { .list-group-item-condensed {
@ -678,23 +689,32 @@ input[type="submit"] {
display: flex; display: flex;
} }
/* The side navigation menu */ .sidenav {
.menubar-left {
height: 100%; /* 100% Full-height */ height: 100%; /* 100% Full-height */
width: 0px; /* 0 width - change this with JavaScript */ width: 0px; /* 0 width - change this with JavaScript */
position: relative; /* Stay in place */ position: relative; /* Stay in place */
background-color: #fff; /* Black*/
overflow-x: hidden; /* Disable horizontal scroll */ overflow-x: hidden; /* Disable horizontal scroll */
overflow: hidden; overflow: hidden;
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 */
left: 0px;
top: 0px;
z-index: 100; z-index: 100;
display: inline-block; display: inline-block;
background-color: #fff; /* Black*/
} }
.menubar-right { .sidenav li {
display: none; white-space: nowrap;
overflow-x: hidden;
}
/* The side navigation menu */
.sidenav-left {
left: 0px;
top: 0px;
}
.sidenav-right {
right: 0px;
top: 0px;
} }
.wrapper { .wrapper {

View File

@ -76,7 +76,7 @@ function openSideNav(navId) {
} }
$(navId).animate({ $(navId).animate({
width: '250px', width: '150px',
display: 'block' display: 'block'
}, 50); }, 50);

View File

@ -74,7 +74,7 @@ InvenTree
<div class='inventree-navs'> <div class='inventree-navs'>
<div class='menubar-left' id='sidenav'> <div class='sidenav sidenav-left' id='sidenav'>
{% block sidenav %} {% block sidenav %}
<!-- Sidenav code here --> <!-- Sidenav code here -->
{% endblock %} {% endblock %}
@ -85,7 +85,7 @@ InvenTree
<!-- Each view fills in here.. --> <!-- Each view fills in here.. -->
{% endblock %} {% endblock %}
<div class='menubar-right' id='sidenav-right'> <div class='sidenav sidenav-right' id='sidenav-right'>
{% block menubar %} {% block menubar %}
<!-- Menubar code here --> <!-- Menubar code here -->
{% endblock %} {% endblock %}