sq-nav-header.scss 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. // 统一页顶栏(对齐地磅「仪表盘」白底顶栏)
  2. // 结构:safe-top + nav 行;左侧返回←/标题;右侧预留胶囊;工作台可加用户区
  3. .sq-nav-header {
  4. position: sticky;
  5. top: 0;
  6. z-index: 50;
  7. background: #fff;
  8. border-bottom: 1px solid #eee;
  9. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  10. height: var(--sq-header-height, calc(44px + 44px));
  11. padding-top: var(--sq-safe-top, 44px);
  12. box-sizing: border-box;
  13. }
  14. /* 工作台等:加高,容纳标题+副文案+右侧用户 */
  15. .sq-nav-header--tall {
  16. height: auto;
  17. min-height: calc(var(--sq-header-height, 88px) + 72px);
  18. padding-bottom: 28px;
  19. }
  20. .sq-nav-header__nav {
  21. height: var(--sq-nav-height, 44px);
  22. display: grid;
  23. grid-template-columns: minmax(0, 1fr) var(--sq-capsule-right-safe, 96px);
  24. align-items: center;
  25. padding: 0 12px 0 8px;
  26. box-sizing: border-box;
  27. }
  28. .sq-nav-header--tall .sq-nav-header__nav {
  29. height: auto;
  30. min-height: var(--sq-nav-height, 44px);
  31. align-items: center;
  32. }
  33. .sq-nav-header__main {
  34. display: flex;
  35. align-items: center;
  36. justify-content: space-between;
  37. gap: 12px;
  38. min-width: 0;
  39. width: 100%;
  40. }
  41. .sq-nav-header__left {
  42. display: flex;
  43. align-items: center;
  44. justify-content: flex-start;
  45. gap: 8px;
  46. min-width: 0;
  47. }
  48. .sq-nav-header__left--stack {
  49. flex-direction: column;
  50. align-items: flex-start;
  51. gap: 6px;
  52. }
  53. .sq-nav-header__back {
  54. font-size: 20px;
  55. color: #333;
  56. padding: 4px 8px;
  57. flex-shrink: 0;
  58. line-height: 1;
  59. }
  60. .sq-nav-header__title {
  61. font-size: 17px;
  62. font-weight: 700;
  63. color: #111827;
  64. text-align: left;
  65. overflow: hidden;
  66. text-overflow: ellipsis;
  67. white-space: nowrap;
  68. max-width: 100%;
  69. }
  70. .sq-nav-header__meta {
  71. font-size: 12px;
  72. color: #6b7280;
  73. line-height: 1.4;
  74. text-align: left;
  75. }
  76. .sq-nav-header__user {
  77. display: flex;
  78. flex-direction: column;
  79. align-items: flex-end;
  80. justify-content: center;
  81. gap: 8px;
  82. flex-shrink: 0;
  83. max-width: 42%;
  84. text-align: right;
  85. margin-left: auto;
  86. }
  87. .sq-nav-header__user-name {
  88. font-size: 13px;
  89. font-weight: 600;
  90. color: #111827;
  91. max-width: 100%;
  92. overflow: hidden;
  93. text-overflow: ellipsis;
  94. white-space: nowrap;
  95. }
  96. .sq-nav-header__logout {
  97. font-size: 12px;
  98. line-height: 1.3;
  99. padding: 4px 10px;
  100. border-radius: 999px;
  101. border: 1px solid #d1d5db;
  102. color: #374151;
  103. background: #fff;
  104. }
  105. .sq-nav-header__logout:active {
  106. background: #f3f4f6;
  107. }
  108. .sq-nav-header__logout--disabled {
  109. opacity: 0.55;
  110. pointer-events: none;
  111. }