_sidebar.scss 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. .grw-sidebar {
  2. $sidebar-nav-button-height: 55px;
  3. %fukidashi-for-active {
  4. position: relative;
  5. // speech balloon
  6. &:after {
  7. position: absolute;
  8. right: -0.1em;
  9. display: block;
  10. width: 0;
  11. content: '';
  12. border: 9px solid transparent;
  13. border-right-color: white;
  14. border-left-width: 0;
  15. transform: translateY(-#{$sidebar-nav-button-height / 2});
  16. }
  17. }
  18. // sticky
  19. position: sticky;
  20. top: $grw-navbar-border-width;
  21. .grw-navigation-resize-button {
  22. position: fixed;
  23. $width: 27.691px;
  24. $height: 23.999px;
  25. // locate to the center of screen
  26. top: calc(50vh - $height/2);
  27. padding: 0px;
  28. background-color: transparent;
  29. border: 0;
  30. opacity: 0;
  31. transition: opacity 300ms cubic-bezier(0.2, 0, 0, 1) 0s;
  32. transform: translateX(-50%);
  33. .hexagon-container {
  34. // set transform
  35. svg * {
  36. transition: fill 100ms linear;
  37. }
  38. svg {
  39. width: $width + 2px; // add 1px for drop-shadow
  40. height: $height + 2px; // add 1px for drop-shadow
  41. .background {
  42. filter: drop-shadow(0px 1px 0px rgba(#999, 60%));
  43. }
  44. }
  45. }
  46. .hitarea {
  47. @extend .rounded-pill;
  48. $size-hitarea: 80px;
  49. position: absolute;
  50. top: ($width - $size-hitarea) / 2;
  51. left: ($height - $size-hitarea) / 2;
  52. width: $size-hitarea;
  53. height: $size-hitarea;
  54. }
  55. // reverse and center icon at the time of collapsed
  56. &.collapsed {
  57. opacity: 1;
  58. .hexagon-container svg {
  59. transform: rotate(180deg);
  60. }
  61. }
  62. }
  63. &:hover {
  64. .grw-navigation-resize-button {
  65. opacity: 1;
  66. }
  67. }
  68. // override @atlaskit/navigation-next styles
  69. $navbar-total-height: $grw-navbar-height + $grw-navbar-border-width;
  70. .data-layout-container {
  71. display: flex;
  72. flex-direction: row;
  73. height: calc(100vh - 0px);
  74. margin-top: 0px;
  75. // css-teprsg
  76. > div:nth-of-type(2) {
  77. padding-left: unset !important;
  78. margin-left: unset !important;
  79. }
  80. }
  81. .navigation {
  82. .grw-navigation-wrap {
  83. display: flex;
  84. flex-direction: row;
  85. height: 100%;
  86. overflow: hidden;
  87. .grw-contextual-navigation {
  88. position: relative;
  89. width: 240px;
  90. height: 100%;
  91. &:not(.dragging) {
  92. transition: width 300ms cubic-bezier(0.2, 0, 0, 1) 0s;
  93. }
  94. will-change: width;
  95. .grw-contextual-navigation-child {
  96. position: absolute;
  97. top: 0px;
  98. left: 0px;
  99. box-sizing: border-box;
  100. width: 100%;
  101. min-width: 240px;
  102. height: 100%;
  103. overflow-x: hidden;
  104. transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
  105. transition-duration: 0.22s;
  106. transition-property: boxShadow, transform;
  107. animation-duration: 0.22s;
  108. animation-timing-function: cubic-bezier(0.2, 0, 0, 1);
  109. animation-fill-mode: forwards;
  110. .grw-contextual-navigation-sub {
  111. box-sizing: border-box;
  112. display: flex;
  113. flex-direction: column;
  114. width: 100%;
  115. height: 100%;
  116. overflow: hidden auto;
  117. &.collapsed {
  118. display: none;
  119. }
  120. }
  121. }
  122. }
  123. }
  124. .grw-navigation-draggable {
  125. position: absolute;
  126. top: 0px;
  127. bottom: 0px;
  128. left: 100%;
  129. z-index: 100; // greater than the value of slimScrollBar
  130. width: 0;
  131. transform: unset; // unset for 'position: fixed' of .ak-navigation-resize-button
  132. .grw-navigation-draggable-first-child {
  133. position: absolute;
  134. top: 0px;
  135. bottom: 0px;
  136. left: -3px;
  137. width: 3px;
  138. pointer-events: none;
  139. background: linear-gradient(to left, rgba(0, 0, 0, 0.1) 0px, rgba(0, 0, 0, 0.1) 1px, rgba(0, 0, 0, 0.1) 1px, rgba(0, 0, 0, 0) 100%);
  140. opacity: 0.5;
  141. transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
  142. transition-duration: 0.22s;
  143. transition-property: left, opacity, width;
  144. }
  145. .grw-navigation-draggable-hitarea {
  146. position: relative;
  147. left: -4px;
  148. width: 24px;
  149. height: 100%;
  150. cursor: ew-resize;
  151. .grw-navigation-draggable-hitarea-child {
  152. position: absolute;
  153. left: 3px;
  154. width: 2px;
  155. height: 100%;
  156. background-color: rgb(76, 154, 255);
  157. opacity: 0;
  158. transition: opacity 200ms ease 0s;
  159. }
  160. &:hover .grw-navigation-draggable-hitarea-child {
  161. opacity: 1;
  162. }
  163. }
  164. }
  165. }
  166. .grw-sidebar-nav {
  167. height: 100vh;
  168. .btn {
  169. width: $grw-sidebar-nav-width;
  170. line-height: 1em;
  171. border-radius: 0;
  172. // icon opacity
  173. &:not(.active) {
  174. i {
  175. opacity: 0.4;
  176. }
  177. &:hover,
  178. &:focus {
  179. i {
  180. opacity: 0.7;
  181. }
  182. }
  183. }
  184. }
  185. .grw-sidebar-nav-primary-container {
  186. .btn {
  187. padding: 1em;
  188. i {
  189. font-size: 2.3em;
  190. }
  191. &.active {
  192. @extend %fukidashi-for-active;
  193. }
  194. }
  195. }
  196. .grw-sidebar-nav-secondary-container {
  197. position: fixed;
  198. bottom: 1.5rem;
  199. .btn {
  200. padding: 0.9em;
  201. i {
  202. font-size: 1.5em;
  203. }
  204. }
  205. }
  206. }
  207. .grw-drawer-toggler {
  208. display: none; // invisible in default
  209. }
  210. .grw-sidebar-content-header {
  211. .grw-btn-reload {
  212. font-size: 18px;
  213. }
  214. }
  215. .grw-sidebar-content-footer {
  216. position: absolute;
  217. bottom: 0;
  218. width: 100%;
  219. border-top: solid 1px $border-color;
  220. }
  221. }
  222. // Dock Mode
  223. @mixin dock() {
  224. z-index: $zindex-sticky;
  225. // override @atlaskit/navigation-next styles
  226. $navbar-total-height: $grw-navbar-height + $grw-navbar-border-width;
  227. .data-layout-container {
  228. max-height: calc(100vh - #{$grw-navbar-border-width});
  229. }
  230. .navigation {
  231. position: unset;
  232. top: $navbar-total-height;
  233. }
  234. }
  235. // Drawer Mode
  236. @mixin drawer() {
  237. z-index: $zindex-fixed + 2;
  238. .data-layout-container {
  239. position: fixed;
  240. top: 0;
  241. width: 0;
  242. }
  243. div.navigation.transition-enabled {
  244. max-width: 80vw;
  245. // apply transition
  246. transition-property: transform;
  247. @include apply-navigation-transition();
  248. }
  249. &:not(.open) {
  250. div.navigation {
  251. transform: translateX(-100%);
  252. }
  253. }
  254. &.open {
  255. div.navigation {
  256. transform: translateX(0);
  257. }
  258. .grw-drawer-toggler {
  259. display: block;
  260. }
  261. }
  262. .grw-navigation-resize-button {
  263. display: none;
  264. }
  265. .grw-drawer-toggler {
  266. position: fixed;
  267. right: -15px;
  268. @include media-breakpoint-down(sm) {
  269. bottom: 15px;
  270. width: 42px;
  271. height: 42px;
  272. font-size: 18px;
  273. }
  274. @include media-breakpoint-up(md) {
  275. top: 72px;
  276. width: 50px;
  277. height: 50px;
  278. font-size: 24px;
  279. }
  280. transform: translateX(100%);
  281. }
  282. }
  283. .grw-sidebar {
  284. @include media-breakpoint-down(sm) {
  285. @include drawer();
  286. }
  287. @include media-breakpoint-up(md) {
  288. &.grw-sidebar-drawer {
  289. @include drawer();
  290. }
  291. &:not(.grw-sidebar-drawer) {
  292. @include dock();
  293. }
  294. }
  295. }
  296. .grw-sidebar-backdrop.modal-backdrop {
  297. z-index: $zindex-fixed + 1;
  298. }