gitea源码

navbar.css 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. #navbar {
  2. display: flex;
  3. align-items: center;
  4. justify-content: space-between;
  5. background: var(--color-nav-bg);
  6. border-bottom: 1px solid var(--color-secondary);
  7. padding: 0 10px;
  8. }
  9. #navbar .navbar-left,
  10. #navbar .navbar-right {
  11. display: flex;
  12. align-items: center;
  13. gap: 5px;
  14. min-height: 49px; /* +1px border-bottom */
  15. }
  16. .navbar-left > .item,
  17. .navbar-right > .item,
  18. .navbar-mobile-right > .item {
  19. flex: 0 0 auto;
  20. display: flex;
  21. align-items: center;
  22. color: var(--color-nav-text);
  23. position: relative;
  24. text-decoration: none;
  25. min-height: 36px;
  26. min-width: 36px;
  27. padding: 3px 13px;
  28. border-radius: 4px;
  29. }
  30. #navbar .item.active {
  31. background: var(--color-active);
  32. }
  33. #navbar a.item:hover,
  34. #navbar button.item:hover {
  35. background: var(--color-nav-hover-bg);
  36. }
  37. #navbar .item.ui.dropdown {
  38. padding-right: 5px;
  39. }
  40. @media (max-width: 767.98px) {
  41. #navbar {
  42. align-items: stretch;
  43. }
  44. /* hide all items */
  45. #navbar .navbar-left > .item,
  46. #navbar .navbar-right > .item {
  47. display: none;
  48. }
  49. #navbar #navbar-logo {
  50. display: flex;
  51. }
  52. /* show the first navbar item (logo and its mobile right items) */
  53. #navbar .navbar-left {
  54. flex: 1;
  55. display: flex;
  56. justify-content: space-between;
  57. }
  58. #navbar .navbar-mobile-right {
  59. display: flex;
  60. margin: 0 0 0 auto;
  61. width: auto;
  62. }
  63. #navbar .navbar-mobile-right > .item {
  64. display: flex;
  65. width: auto;
  66. }
  67. /* show items if the navbar is open */
  68. #navbar.navbar-menu-open {
  69. padding-bottom: 8px;
  70. }
  71. #navbar.navbar-menu-open,
  72. #navbar.navbar-menu-open .navbar-right {
  73. flex-direction: column;
  74. }
  75. #navbar.navbar-menu-open .navbar-left {
  76. flex-wrap: wrap;
  77. }
  78. #navbar.navbar-menu-open .navbar-left > .item,
  79. #navbar.navbar-menu-open .navbar-right > .item {
  80. display: flex;
  81. width: 100%;
  82. }
  83. #navbar.navbar-menu-open .navbar-left #navbar-logo {
  84. justify-content: flex-start;
  85. width: auto;
  86. }
  87. #navbar.navbar-menu-open .navbar-left .navbar-mobile-right {
  88. justify-content: flex-end;
  89. width: 50%;
  90. min-height: 49px;
  91. }
  92. #navbar #mobile-stopwatch-icon,
  93. #navbar #mobile-notifications-icon {
  94. margin-right: 6px;
  95. }
  96. }
  97. #navbar a.item:hover .notification_count,
  98. #navbar a.item:hover .header-stopwatch-dot {
  99. border-color: var(--color-nav-hover-bg);
  100. }
  101. #navbar a.item .notification_count,
  102. #navbar a.item .header-stopwatch-dot {
  103. color: var(--color-nav-bg);
  104. padding: 0 3.75px;
  105. font-size: 12px;
  106. line-height: 12px;
  107. font-weight: var(--font-weight-bold);
  108. background: var(--color-primary);
  109. border: 2px solid var(--color-nav-bg);
  110. position: absolute;
  111. left: calc(100% - 9px);
  112. bottom: calc(100% - 9px);
  113. min-width: 17px;
  114. height: 17px;
  115. border-radius: 11px; /* (height + 2 * borderThickness) / 2 */
  116. display: flex;
  117. align-items: center;
  118. justify-content: center;
  119. z-index: 1; /* prevent menu button background from overlaying icon */
  120. user-select: none;
  121. white-space: nowrap;
  122. }
  123. .secondary-nav {
  124. background: var(--color-secondary-nav-bg) !important; /* important because of .ui.secondary.menu */
  125. }
  126. .issue-navbar {
  127. display: flex;
  128. justify-content: space-between;
  129. }