From f34ebcae43c125912008d8f79218856c792ccc58 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Tue, 16 Jun 2026 11:07:04 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=BB=E9=A1=B5=E5=8F=B3=E4=B8=8A?= =?UTF-8?q?=E8=A7=92=E6=B7=BB=E5=8A=A0=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - index.ui: 拆分导航栏为HBox(logo+链接+CTA | 用户信息) - portal_userinfo.ui: 未登录显示登录/注册按钮,已登录显示用户头像+用户名 - user_menu.ui: 登录后下拉菜单(个人信息、退出登录) - cms_styles.css: 添加用户信息区域样式 --- wwwroot/cms_styles.css | 44 +++++++++++++++++++ wwwroot/index.ui | 24 +++++++++- wwwroot/portal_userinfo.ui | 89 ++++++++++++++++++++++++++++++++++++++ wwwroot/user_menu.ui | 18 ++++++++ 4 files changed, 173 insertions(+), 2 deletions(-) create mode 100644 wwwroot/portal_userinfo.ui create mode 100644 wwwroot/user_menu.ui diff --git a/wwwroot/cms_styles.css b/wwwroot/cms_styles.css index 0a1b9f4..de2f2fc 100644 --- a/wwwroot/cms_styles.css +++ b/wwwroot/cms_styles.css @@ -638,3 +638,47 @@ a { color: inherit; text-decoration: none; } opacity: 1; transform: translateY(0); } + +/* Portal User Info Widgets */ +.portal-user-info { + display: flex; + align-items: center; + gap: 8px; +} + +.portal-username { + font-size: 14px; + color: var(--text-secondary); + max-width: 100px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.portal-login-btn, +.portal-register-btn { + font-size: 13px !important; + padding: 6px 16px !important; + border-radius: 6px !important; + border: none !important; + cursor: pointer !important; + transition: var(--transition); +} + +.portal-login-btn { + background: rgba(255,255,255,0.1) !important; + color: var(--text-primary) !important; +} + +.portal-login-btn:hover { + background: rgba(255,255,255,0.2) !important; +} + +.portal-register-btn { + background: var(--brand-gradient) !important; + color: white !important; +} + +.portal-register-btn:hover { + opacity: 0.9; +} diff --git a/wwwroot/index.ui b/wwwroot/index.ui index 6c3ead2..4cd2c52 100644 --- a/wwwroot/index.ui +++ b/wwwroot/index.ui @@ -6,12 +6,32 @@ "widgettype": "VBox", "options": {"width": "100%", "css": "site-root"}, "subwidgets": [ + { + "widgettype": "HBox", + "options": {"width": "100%", "css": "nav-bar"}, + "subwidgets": [ + { + "widgettype": "Html", + "id": "nav_html", + "options": { + "html": "
开元云科技<\/div>