_sidebar.scss 7.0 KB

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