paperless-ngx/src-ui/src/app/components/app-frame/app-frame.component.scss

315 lines
5 KiB
SCSS
Raw Normal View History

2020-12-31 00:35:54 -08:00
/*
2020-10-27 01:10:18 +01:00
* Sidebar
*/
2020-12-31 00:35:54 -08:00
.sidebar {
2020-10-27 01:10:18 +01:00
position: fixed;
top: 0;
bottom: 0;
left: 0;
z-index: 995; /* Behind the navbar */
2020-12-31 00:35:54 -08:00
padding: 50px 0 0; /* Height of navbar */
2020-10-27 01:10:18 +01:00
box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
overflow-y: auto;
2024-09-22 22:51:59 -07:00
--pngx-sidebar-width: 100%;
max-width: var(--pngx-sidebar-width);
2025-01-01 22:26:53 -08:00
transition: all .2s ease;
.sidebar-heading .spinner-border {
width: 0.8em;
height: 0.8em;
}
2022-09-12 14:51:34 -07:00
.view-name {
max-width: calc(100% - 50px)
}
.nav-group:not(:has(.app-link)) .sidebar-heading {
display: none !important;
}
// These come from the col-* classes for non-slim sidebar, needed for animation
2022-09-12 14:51:34 -07:00
@media (min-width: 768px) {
--pngx-sidebar-width: 25%;
2022-09-12 14:51:34 -07:00
}
@media (min-width: 992px) {
--pngx-sidebar-width: 16.66666667%;
2022-09-12 14:51:34 -07:00
}
@media (min-width: 2400px) {
--pngx-sidebar-width: 8.33333333%;
}
2020-10-27 01:10:18 +01:00
}
@media (max-width: 767.98px) {
.sidebar {
2020-12-31 00:35:54 -08:00
top: 3.5rem;
2020-10-27 01:10:18 +01:00
}
}
main {
transition: all .2s ease;
padding-top: 110px;
}
@media (min-width: 768px) {
main {
padding-top: 56px;
}
}
2022-09-12 14:51:34 -07:00
.sidebar-slim-toggler {
display: none; // hide on mobile
}
.sidebar li.nav-item span,
.sidebar .sidebar-heading span {
transition: all .1s ease;
}
2022-09-12 14:51:34 -07:00
@media(min-width: 768px) {
.sidebar.slim {
max-width: 50px;
li.nav-item span.badge {
display: inline-block;
margin-right: 2px;
}
}
.sidebar.slim:not(.animating) {
li.nav-item span,
.sidebar-heading span {
2022-09-12 14:51:34 -07:00
display: none;
}
}
.sidebar.animating {
li.nav-item span,
.sidebar-heading span {
display: unset;
position: absolute;
opacity: 0;
overflow: hidden;
}
}
.sidebar:not(.slim):not(.animating) {
li.nav-item span,
.sidebar-heading span {
position: unset;
opacity: 1;
overflow: auto;
}
}
.sidebar.slim,
.sidebar.animating {
.text-truncate {
text-overflow: unset !important;
word-wrap: break-word !important;
}
}
.sidebar.slim {
li.nav-item span.badge {
display: inline-block;
margin-right: 2px;
}
}
2022-09-12 14:51:34 -07:00
.sidebar-slim-toggler {
display: block;
position: fixed;
left: calc(var(--pngx-sidebar-width) - 12px);
2022-09-12 14:51:34 -07:00
top: 60px;
z-index: 996;
--bs-btn-padding-x: 0.35rem;
--bs-btn-padding-y: 0.125rem;
transition: all .2s ease;
}
.sidebar.slim .sidebar-slim-toggler {
--pngx-sidebar-width: 50px !important;
2022-09-12 14:51:34 -07:00
}
}
::ng-deep .popover-slim .popover-body {
--bs-popover-body-padding-x: .5rem;
--bs-popover-body-padding-y: .5rem;
}
2020-10-27 01:10:18 +01:00
.sidebar-sticky {
position: relative;
2021-01-01 12:43:19 -08:00
top: 0;
2020-11-22 16:33:26 +01:00
height: 100%;
2020-12-31 00:35:54 -08:00
padding-top: 0.5rem;
2020-10-27 01:10:18 +01:00
overflow-x: hidden;
2021-01-01 12:42:58 -08:00
overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
2021-01-31 19:16:38 -08:00
min-height: min-content;
2020-10-27 01:10:18 +01:00
}
@supports ((position: -webkit-sticky) or (position: sticky)) {
.sidebar-sticky {
position: -webkit-sticky;
position: sticky;
}
}
.sidebar .nav-link {
font-weight: 500;
2023-06-25 07:25:07 -07:00
white-space: nowrap;
2020-10-27 01:10:18 +01:00
&:hover, &.active, &:focus {
2022-04-07 23:15:27 -07:00
color: var(--bs-primary);
}
2020-10-27 01:10:18 +01:00
&:focus-visible {
outline: none;
background-color: var(--bs-body-bg);
}
2022-04-07 23:15:27 -07:00
&.active {
font-weight: bold;
}
2020-10-27 01:10:18 +01:00
2024-01-17 16:27:38 -08:00
i-bs {
position: relative;
top: -1px;
2022-04-07 23:15:27 -07:00
}
2020-10-27 01:10:18 +01:00
}
.sidebar-heading {
2020-12-31 00:35:54 -08:00
font-size: 0.75rem;
2020-10-27 01:10:18 +01:00
text-transform: uppercase;
}
2021-01-31 19:09:31 -08:00
.nav {
flex-wrap: nowrap;
}
.nav-item {
position: relative;
list-style-type: none;
&:hover .close {
display: flex;
}
2021-01-31 19:24:37 -08:00
.close {
display: none;
position: absolute !important;
cursor: pointer;
opacity: 1;
top: 0;
padding: .25rem .3rem 0;
right: .4rem;
width: 1.8rem;
height: 100%;
2021-02-26 14:08:13 -08:00
2024-01-17 16:27:38 -08:00
i-bs {
2021-02-26 14:11:25 -08:00
opacity: 0.5;
2021-02-26 14:08:13 -08:00
}
2024-01-17 16:27:38 -08:00
&:hover i-bs {
2021-02-26 14:11:25 -08:00
opacity: 1;
2021-02-26 14:08:13 -08:00
}
}
.nav-link-additional {
margin-top: 0.1rem;
margin-left: 0.25rem;
padding-top: 0.5rem;
text-decoration: none;
&:hover {
text-decoration: underline;
}
2024-01-17 16:27:38 -08:00
i-bs {
margin-bottom: 2px;
}
2021-01-31 19:24:37 -08:00
}
2021-01-31 19:20:00 -08:00
}
2020-10-27 01:10:18 +01:00
/*
* Navbar
*/
2020-12-31 00:35:54 -08:00
.navbar-brand {
2020-10-27 01:10:18 +01:00
font-size: 1rem;
2024-01-13 11:57:25 -08:00
.flex-column {
padding: 0.15rem 0;
}
.byline {
font-size: 0.5rem;
letter-spacing: 0.1rem;
}
2020-10-27 01:10:18 +01:00
}
@media screen and (min-width: 366px) and (max-width: 768px) {
.navbar-toggler {
// compensate for 2 buttons on the right
margin-right: 45px;
}
}
@media screen and (min-width: 768px) {
.navbar-brand.slim {
max-width: 50px;
}
}
@media screen and (max-width: 345px) {
.custom-title {
2025-03-21 00:52:28 -07:00
max-width: 110px;
overflow: hidden;
}
}
:host ::ng-deep .dropdown.show .dropdown-toggle,
:host ::ng-deep .dropdown-toggle:hover {
opacity: 0.7;
2020-12-31 00:35:54 -08:00
}
.dropdown-toggle::after {
margin-left: 0.4em;
vertical-align: 0.155em;
}
.navbar .dropdown-menu {
font-size: 0.875rem; // body size
2024-01-17 16:27:38 -08:00
a i-bs {
opacity: 0.6;
}
}
2022-04-01 01:53:59 -07:00
.version-check {
animation: pulse 2s ease-in-out 0s 1;
}
@keyframes pulse {
0% {
opacity: 0;
}
25% {
opacity: 100%;
}
75% {
opacity: 0;
}
100% {
opacity: 100%;
}
}
.nav-item > .position-absolute {
cursor: move;
}
2024-01-17 16:27:38 -08:00
::ng-deep .navItemDrag .position-absolute i-bs {
display: none;
}