AppTitle.module.scss 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. }
  20. // == Location
  21. .on-subnavigation {
  22. top: 0;
  23. @include bs.media-breakpoint-up(md) {
  24. left: var.$grw-sidebar-nav-width;
  25. }
  26. }
  27. // == App title truncation
  28. .on-subnavigation {
  29. // set width for truncation
  30. $grw-page-controls-width: 280px;
  31. $grw-page-editor-mode-manager-width: 90px;
  32. $grw-contextual-subnavigation-padding-right: 12px;
  33. $gap: 8px;
  34. width: calc(100vw - #{$grw-page-controls-width + $grw-page-editor-mode-manager-width + $grw-contextual-subnavigation-padding-right + $gap * 2});
  35. @include bs.media-breakpoint-up(md) {
  36. $grw-page-editor-mode-manager-width: 140px;
  37. $gap: 24px;
  38. $grw-contextual-subnavigation-padding-right: 24px;
  39. 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});
  40. }
  41. }
  42. .on-sidebar-head {
  43. $toggle-collapse-button-width: 50px;
  44. // set width for truncation
  45. width: calc(100% - $toggle-collapse-button-width);
  46. }
  47. // == Interaction
  48. @keyframes bounce-to-right {
  49. 10% { transform:translateX(3px); }
  50. 20% { transform:translateX(0%); }
  51. 25% { transform:translateX(2px); }
  52. 27% { transform:translateX(0%); }
  53. }
  54. .on-subnavigation {
  55. animation: bounce-to-right 1s ease;
  56. }
  57. @keyframes bounce-to-left {
  58. 0% { transform:translateX(48px); }
  59. 100% { transform:translateX(0%); }
  60. }
  61. .on-sidebar-head {
  62. animation: bounce-to-left 0.2s ease;
  63. }
  64. // == Colors
  65. .grw-app-title :global {
  66. .grw-site-name {
  67. --bs-link-color-rgb: var(--grw-app-title-color-rgb, var(--bs-tertiary-color-rgb));
  68. --bs-link-opacity: 0.5;
  69. }
  70. }