diff --git a/styles/components/navbar.ts b/styles/components/navbar.ts index e2571da..a220d70 100644 --- a/styles/components/navbar.ts +++ b/styles/components/navbar.ts @@ -10,6 +10,25 @@ export const navbarRight = ` .navbar-right { min-height: 48px; } + .navbar-right { + gap: 8px; + > .navbar-theme-toggle { + align-items: center; + justify-content: center; + border: 1px solid var(--color-light-border); + border-radius: var(--border-radius); + color: var(--color-text); + height: 32px; + min-height: 32px; + min-width: 32px; + padding: 0; + width: 32px; + &:hover, + &.active { + background-color: var(--color-nav-hoverBg); + } + } + } .navbar-left { gap: 8px; > .item { @@ -35,7 +54,7 @@ export const navbarRight = ` .navbar-right:has(.user-menu) { gap: 8px; /* 右侧按钮, 但不包括头像 */ - > .item:not(:last-child) { + > .item:not(.navbar-user-menu):not(.navbar-theme-toggle) { align-items: center; justify-content: center; gap: 4px; @@ -75,7 +94,7 @@ export const navbarRight = ` } .item.ui.dropdown { /* 头像菜单 */ - &:last-child { + &.navbar-user-menu { padding: 0; .text { /* 不显示头像右侧的小箭头下拉菜单标识 */ diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl index 038de37..d18c0f2 100644 --- a/templates/base/head_navbar.tmpl +++ b/templates/base/head_navbar.tmpl @@ -29,7 +29,8 @@