You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

312 lines
5.6 KiB

4 years ago
  1. /* Scroll fix, try to disable overflow scrolling on mobile to make this feel more native */
  2. html, body {
  3. width: 100%;
  4. height: 100%;
  5. overflow: hidden;
  6. position: fixed;
  7. padding-bottom: 0;
  8. overscroll-behavior-y: none;
  9. }
  10. /* Hide bootstrap tooltip arrows
  11. I did this so I wouldn't have to deal with toolbar button alignment but you can change that if you want */
  12. .tooltip .arrow {
  13. display: none;
  14. }
  15. /* Navbar */
  16. .navbar {
  17. position: absolute;
  18. top: 0;
  19. width: 100%;
  20. }
  21. .toolbar-button {
  22. padding-left: 2rem;
  23. padding-top: .375rem;
  24. line-height: 1.5;
  25. color: white;
  26. -webkit-user-select: none;
  27. -moz-user-select: none;
  28. -ms-user-select: none;
  29. user-select: none;
  30. }
  31. .toolbar-button:hover {
  32. color: #ddd;
  33. text-decoration: none;
  34. }
  35. /* Sidebar */
  36. #sidebar {
  37. padding-left: 20px;
  38. background-color: #ecedee;
  39. height: 100vh;
  40. padding-top: 20px;
  41. border-right: 1px solid darkgray;
  42. position: fixed;
  43. width: 250px;
  44. }
  45. #sidebar a:hover {
  46. text-decoration: none;
  47. }
  48. #sidebar ul > li {
  49. padding-bottom: 10px;
  50. }
  51. #sidebar ul > li > a {
  52. color: rgba(0,0,0,.5);
  53. }
  54. #sidebar ul > li.active > a {
  55. color: black;
  56. }
  57. #sidebar div > a {
  58. color: rgba(0,0,0,.5);
  59. }
  60. #sidebar div.active > a {
  61. color: black;
  62. }
  63. /* Content area */
  64. .wrapper {
  65. height: calc(100% - 56px);
  66. overflow: auto;
  67. position: fixed;
  68. top: 56px;
  69. width: 100%;
  70. -webkit-overflow-scrolling: touch;
  71. align-items: stretch;
  72. }
  73. #content {
  74. width: 100%;
  75. padding: 20px;
  76. }
  77. /* Dark theming */
  78. @media (prefers-color-scheme: dark) {
  79. /* Custom Bootstrap dark theming */
  80. body {
  81. background-color: #111 !important;
  82. color: #eee;
  83. }
  84. .jumbotron {
  85. background-color: #333 !important;
  86. }
  87. .modal-content {
  88. background-color: #111 !important;
  89. color: #eee;
  90. }
  91. .modal-header {
  92. border-bottom: 1px solid #555 !important;
  93. }
  94. .modal-header .close {
  95. color: #eee !important;
  96. text-shadow: 0 1px 0 #555 !important;
  97. }
  98. .modal-footer {
  99. border-top: 1px solid #555 !important;
  100. }
  101. .bg-light {
  102. background-color: #333 !important;
  103. }
  104. .bg-white {
  105. background-color: #000 !important;
  106. }
  107. .bg-black {
  108. background-color: #eee !important;
  109. }
  110. .form-control {
  111. display: block;
  112. width: 100%;
  113. height: calc(1.5em + 0.75rem + 2px);
  114. padding: 0.375rem 0.75rem;
  115. font-size: 1rem;
  116. font-weight: 400;
  117. line-height: 1.5;
  118. color: #dee2e6;
  119. background-color: #000;
  120. background-clip: padding-box;
  121. border: 1px solid #6c757d;
  122. border-radius: 0.25rem;
  123. transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  124. }
  125. @media (prefers-reduced-motion: reduce) {
  126. .form-control {
  127. transition: none;
  128. }
  129. }
  130. .form-control::-ms-expand {
  131. background-color: transparent;
  132. border: 0;
  133. }
  134. .form-control:-moz-focusring {
  135. color: transparent;
  136. text-shadow: 0 0 0 #dee2e6;
  137. }
  138. .form-control:focus {
  139. color: #dee2e6;
  140. background-color: #191d21;
  141. border-color: #b3d7ff;
  142. outline: 0;
  143. box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
  144. }
  145. .form-control::-webkit-input-placeholder {
  146. color: #6c757d;
  147. opacity: 1;
  148. }
  149. .form-control::-moz-placeholder {
  150. color: #6c757d;
  151. opacity: 1;
  152. }
  153. .form-control::-ms-input-placeholder {
  154. color: #6c757d;
  155. opacity: 1;
  156. }
  157. .form-control::placeholder {
  158. color: #6c757d;
  159. opacity: 1;
  160. }
  161. .form-control:disabled,
  162. .form-control[readonly] {
  163. background-color: #343a40;
  164. opacity: 1;
  165. }
  166. .card {
  167. background-color: #000;
  168. border: 1px solid #6c757d;
  169. }
  170. /* Sidebar */
  171. #sidebar {
  172. padding-left: 20px;
  173. background-color: #1a1d20;
  174. height: 100vh;
  175. padding-top: 20px;
  176. border-right: 1px solid black;
  177. }
  178. #sidebar ul > li {
  179. padding-bottom: 10px;
  180. }
  181. #sidebar ul > li > a {
  182. color: rgba(255,255,255,.5);
  183. }
  184. #sidebar ul > li.active > a {
  185. color: white;
  186. }
  187. #sidebar div > a {
  188. color: rgba(255,255,255,.5);
  189. }
  190. #sidebar div.active > a {
  191. color: white;
  192. }
  193. }
  194. /* PWA theming fixes
  195. Tested basically only on iOS, so Android, get fucked maybe */
  196. @media all and (display-mode: standalone) {
  197. .navbar {
  198. position: absolute;
  199. top: 0;
  200. width: 100%;
  201. padding-top: 44px !important;
  202. }
  203. .wrapper {
  204. height: calc(100vh - 92px);
  205. overflow: auto;
  206. position: fixed;
  207. top: 92px;
  208. width: 100%;
  209. align-items: stretch;
  210. padding-left: env(safe-area-inset-left);
  211. padding-right: env(safe-area-inset-right);
  212. padding-bottom: env(safe-area-inset-bottom);
  213. }
  214. /* Tweaks for size classes above portait phones */
  215. @media (min-width: 577px) {
  216. .navbar {
  217. position: absolute;
  218. top: 0;
  219. width: 100%;
  220. padding-top: 24px !important;
  221. }
  222. #navbarNavDropdown {
  223. padding-left: env(safe-area-inset-left);
  224. padding-right: env(safe-area-inset-right);
  225. }
  226. .wrapper {
  227. height: calc(100% - 72px);
  228. overflow: auto;
  229. position: fixed;
  230. top: 72px;
  231. width: 100%;
  232. align-items: stretch;
  233. padding-left: env(safe-area-inset-left);
  234. padding-right: env(safe-area-inset-right);
  235. padding-bottom: env(safe-area-insert-bottom);
  236. }
  237. }
  238. }
  239. /* Hide sidebar on phones and portrait tablets */
  240. @media (max-width: 991.98px) {
  241. #sidebar {
  242. display: none !important;
  243. }
  244. }
  245. /* Display sidebar and hide nav menu for landscape tablets and desktop */
  246. @media (min-width: 991.98px) {
  247. .navbar-nav {
  248. display: none !important;
  249. }
  250. #sidebar {
  251. min-width: 250px;
  252. max-width: 250px;
  253. display: block !important;
  254. }
  255. #content {
  256. left: 250px;
  257. width: calc(100% - 250px) !important;
  258. position: relative;
  259. }
  260. #sidebar.active {
  261. margin-left: -250px;
  262. }
  263. }