_navigation.scss 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. // Navbar and light theme styling
  2. .navbar-vertical.navbar-expand-lg {
  3. // Scroll the whole sidebar as Tabler 1.4 did. sidenav.ts saves and restores its offset.
  4. @include media-breakpoint-up(lg) {
  5. overflow-y: auto;
  6. > [class^='container'] {
  7. height: auto;
  8. min-height: 100%;
  9. }
  10. .navbar-collapse {
  11. min-height: auto;
  12. overflow-y: visible;
  13. }
  14. .navbar-brand {
  15. justify-content: center;
  16. }
  17. // Tabler 1.6 drops the bar that marks the active menu group
  18. .navbar-collapse .nav-item.active:after {
  19. content: '';
  20. border-bottom-width: 0;
  21. border-left-width: 3px;
  22. inset-inline-end: auto;
  23. top: 0;
  24. bottom: 0;
  25. }
  26. }
  27. // Gap for the reveal in sidenav.ts, which scrolls with `block: 'nearest'`
  28. .nav-item.dropdown,
  29. .dropdown-item {
  30. scroll-margin-block: 0.5rem;
  31. }
  32. // Render the <button> menu headings identically to the surrounding nav links
  33. .navbar-collapse .nav-item.dropdown > button.nav-link {
  34. width: 100%;
  35. background-color: transparent;
  36. border: 0;
  37. text-align: left;
  38. }
  39. // Adjust hover color & style for menu items
  40. .navbar-collapse {
  41. .nav-link-icon,
  42. .nav-link-title {
  43. color: $rich-black;
  44. }
  45. .text-secondary {
  46. color: $dark-teal !important;
  47. }
  48. .dropdown-menu {
  49. // Adjust hover color & style for menu items
  50. .dropdown-item {
  51. border-radius: 0;
  52. > a {
  53. color: $rich-black;
  54. }
  55. .dropdown-item-buttons {
  56. visibility: hidden;
  57. }
  58. // Style menu item hover/active state
  59. &:hover,
  60. &.active,
  61. &:focus-within {
  62. background-color: var(--tblr-navbar-active-bg);
  63. > a {
  64. text-decoration: none;
  65. }
  66. .dropdown-item-buttons {
  67. visibility: visible;
  68. }
  69. }
  70. // Tabler 1.6 sets the current item in medium weight
  71. &.active,
  72. &:active {
  73. font-weight: inherit;
  74. }
  75. }
  76. }
  77. }
  78. // Ensures theme toggle appears above background image
  79. .navbar-nav {
  80. z-index: 1;
  81. }
  82. // Tabler 1.6 sets the active menu group in medium weight
  83. .navbar-nav .nav-item.active > .nav-link {
  84. font-weight: inherit;
  85. }
  86. // Logo text for non-community editions
  87. .navbar-brand {
  88. // Reduce logo padding on mobile view
  89. @include media-breakpoint-down(lg) {
  90. padding: 0.2rem 0;
  91. }
  92. a:hover {
  93. text-decoration: none;
  94. }
  95. }
  96. // Navigation geometric graphic for non-community editions
  97. img.motif {
  98. bottom: 0;
  99. display: none;
  100. left: 0;
  101. mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 100%);
  102. opacity: 0.5;
  103. position: fixed;
  104. user-drag: none;
  105. user-select: none;
  106. -moz-user-select: none;
  107. -webkit-user-drag: none;
  108. -webkit-user-select: none;
  109. -ms-user-select: none;
  110. width: 18rem;
  111. @include media-breakpoint-up(lg) {
  112. display: block;
  113. }
  114. }
  115. }
  116. // Light theme styling
  117. html[data-bs-theme='light'] .navbar-vertical.navbar-expand-lg {
  118. // Background Gradient
  119. background: linear-gradient(180deg, rgba(0, 133, 125, 0) 0%, rgba(0, 133, 125, 0.1) 100%), #fff;
  120. }
  121. // Dark theme styling
  122. html[data-bs-theme='dark'] .navbar-vertical.navbar-expand-lg {
  123. // Background Gradient
  124. background:
  125. linear-gradient(180deg, rgba(0, 242, 212, 0) 0%, rgba(0, 242, 212, 0.1) 100%), #001423;
  126. // Border color for active dropdown list
  127. .nav-item.dropdown.active:after {
  128. border-color: $bright-teal !important;
  129. }
  130. .nav-link-title,
  131. .nav-link-icon {
  132. color: white !important;
  133. }
  134. // Adjust hover color & style for menu items
  135. .dropdown-item {
  136. > a {
  137. color: white !important;
  138. }
  139. &.active,
  140. &:hover {
  141. background-color: $navbar-dark-active-bg !important;
  142. }
  143. }
  144. .text-secondary {
  145. color: $bright-teal !important;
  146. }
  147. img.motif {
  148. opacity: 0.25;
  149. }
  150. }