AppTitle.module.scss 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. @use '@growi/core/scss/bootstrap/init' as bs;
  2. @use '@growi/core/scss/growi-official-colors';
  3. @use '~/styles/variables' as var;
  4. @use '../button-styles';
  5. // GROWI Logo
  6. .grw-app-title :global {
  7. .grw-logo {
  8. $width: var.$grw-sidebar-nav-width;
  9. $height: var.$grw-sidebar-nav-width; // declare $height with the same value as the sidebar nav width
  10. $logomark-width: 27.7px;
  11. $logomark-height: 24px;
  12. width: $width;
  13. svg {
  14. width: $width;
  15. height: $height;
  16. padding: (($height - $logomark-height) / 2) (($width - $logomark-width) / 2);
  17. }
  18. }
  19. .grw-site-name {
  20. cursor: default;
  21. }
  22. .confidential-tooltip {
  23. max-width: 180px;
  24. }
  25. }
  26. // == Location
  27. .on-subnavigation {
  28. top: 0;
  29. @include bs.media-breakpoint-up(md) {
  30. left: var.$grw-sidebar-nav-width;
  31. }
  32. }
  33. // == App title truncation
  34. .on-subnavigation {
  35. // set width for truncation
  36. $grw-page-controls-width: 280px;
  37. $grw-page-editor-mode-manager-width: 90px;
  38. $grw-contextual-subnavigation-padding-right: 12px;
  39. $gap: 8px;
  40. width: calc(100vw - #{$grw-page-controls-width + $grw-page-editor-mode-manager-width + $grw-contextual-subnavigation-padding-right + $gap * 2});
  41. @include bs.media-breakpoint-up(md) {
  42. $grw-page-editor-mode-manager-width: 140px;
  43. $gap: 24px;
  44. $grw-contextual-subnavigation-padding-right: 24px;
  45. width: calc(100vw - #{var.$grw-sidebar-nav-width + $grw-page-controls-width + $grw-page-editor-mode-manager-width + $grw-contextual-subnavigation-padding-right + $gap * 2});
  46. }
  47. }
  48. .on-sidebar-head {
  49. $toggle-collapse-button-width: 50px;
  50. // set width for truncation
  51. width: calc(100% - $toggle-collapse-button-width);
  52. }
  53. // == Interaction
  54. @keyframes bounce-to-right {
  55. 10% { transform:translateX(3px); }
  56. 20% { transform:translateX(0%); }
  57. 25% { transform:translateX(2px); }
  58. 27% { transform:translateX(0%); }
  59. }
  60. .on-subnavigation {
  61. animation: bounce-to-right 1s ease;
  62. }
  63. @keyframes bounce-to-left {
  64. 0% { transform:translateX(48px); }
  65. 100% { transform:translateX(0%); }
  66. }
  67. .on-sidebar-head {
  68. animation: bounce-to-left 0.2s ease;
  69. }
  70. // == Colors
  71. .grw-app-title :global {
  72. .grw-site-name {
  73. --bs-link-color-rgb: var(--grw-app-title-color-rgb, var(--bs-tertiary-color-rgb));
  74. --bs-link-opacity: 0.5;
  75. span {
  76. color: rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 1));
  77. text-decoration: none;
  78. }
  79. }
  80. }