From d78bf4af6f12ba6fa96c0edc6886f5a347bc1691 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 17 Sep 2026 14:58:46 +0800 Subject: [PATCH] =?UTF-8?q?fix(home):=20=E6=89=8B=E6=9C=BAheader=E6=94=B9?= =?UTF-8?q?=E4=B8=A4=E8=A1=8C=E5=B8=83=E5=B1=80(=E8=A1=8C1=20logo+?= =?UTF-8?q?=E7=99=BB=E5=BD=95/=E8=A1=8C2=20=E9=94=9A=E7=82=B9+=E4=B8=BB?= =?UTF-8?q?=E9=A2=98+=E8=AF=AD=E8=A8=80)=E2=80=94=E2=80=94=E6=A0=B9?= =?UTF-8?q?=E6=B2=BBlogo=E6=BA=A2=E5=87=BA=E5=8F=A0=E6=8C=89=E9=92=AE+?= =?UTF-8?q?=E6=81=A2=E5=A4=8D=E6=89=8B=E6=9C=BA=E9=94=9A=E7=82=B9=E5=AF=BC?= =?UTF-8?q?=E8=88=AA;logo-box=E5=8A=A0min-width:0=E4=BF=AEbricks=20Text=20?= =?UTF-8?q?flex=E4=B8=8D=E7=BC=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/gen_home_index.py | 13 +++++-------- wwwroot/home.css | 21 ++++++++++++++------- wwwroot/index.ui | 14 ++++++-------- 3 files changed, 25 insertions(+), 23 deletions(-) diff --git a/scripts/gen_home_index.py b/scripts/gen_home_index.py index c1130b4..729b5f3 100644 --- a/scripts/gen_home_index.py +++ b/scripts/gen_home_index.py @@ -69,23 +69,20 @@ header = { 'options': {'css': 'pl-header', 'width': '100%', 'padding': '0 clamp(20px,6vw,90px)', 'alignItems': 'center', 'gap': '14px', 'cheight': 3.2}, 'subwidgets': [ - {'widgettype': 'VBox', 'options': {'gap': '2px', 'alignItems': 'flex-start'}, + {'widgettype': 'VBox', 'options': {'css': 'pl-logo-box', 'gap': '2px', 'alignItems': 'flex-start'}, 'subwidgets': [T('产线平台', 'pl-logo'), TN('PIPELINE PLATFORM', 'pl-logo-sub')]}, {'widgettype': 'Filler'}, - T('能力', 'pl-nav', mobile_hidden=True, binds=[ + T('能力', 'pl-nav', binds=[ {'wid': 'self', 'event': 'click', 'actiontype': 'script', 'target': 'self', 'script': scroll_script('sec_caps')}]), - T('产线', 'pl-nav', mobile_hidden=True, binds=[ + T('产线', 'pl-nav', binds=[ {'wid': 'self', 'event': 'click', 'actiontype': 'script', 'target': 'self', 'script': scroll_script('sec_pipes')}]), - T('流程', 'pl-nav', mobile_hidden=True, binds=[ + T('流程', 'pl-nav', binds=[ {'wid': 'self', 'event': 'click', 'actiontype': 'script', 'target': 'self', 'script': scroll_script('sec_flow')}]), btn('🌙', 'pl-btn-ghost theme-icon-btn', script=THEME_SCRIPT, small_id='theme_toggle_btn'), - # 手机端隐藏语言切换(2026-09-17 手机适配):390px 宽下 header 预算只够 - # logo+主题+登录按钮(jp「ログイン / 新規登録」最宽),语言切换登录后仍可切。 - {'widgettype': 'urlwidget', - 'options': {'url': "{{entire_url('i18n/language.ui')}}", 'mobile_hidden': True}}, + {'widgettype': 'urlwidget', 'options': {'url': "{{entire_url('i18n/language.ui')}}"}}, btn('登录 / 注册', 'pl-btn pl-btn-sm', bind=login_bind()), ], } diff --git a/wwwroot/home.css b/wwwroot/home.css index aafc376..ed38ae8 100644 --- a/wwwroot/home.css +++ b/wwwroot/home.css @@ -130,14 +130,21 @@ html[data-theme="dark"] .pl-tag-live{color:#4ade80!important} .pl-card{min-height:0;padding:20px!important} .pl-orb{filter:blur(70px)} .pl-step{padding:18px!important} - /* header 手机排布(2026-09-17 实测 390px):子项禁缩防登录按钮被压成圆坨折三行; - logo 去副标题+缩字号+ellipsis 兜底极端字体;语言切换在生成器里 mobile_hidden。 */ - .pl-header{padding:0 14px!important;gap:8px!important} + /* header 手机两行(2026-09-17 实测 390px):行1=logo+登录,行2=三锚点+主题+语言。 + 单行预算不够(jp 登录文案最宽),且 bricks Text 是 flex 容器 min-width:auto 不缩 + → logo 文字曾溢出叠到主题按钮上。两行后预算充足,ellipsis 仅作极端字体兜底。 + .pl-logo-box 为生成器加的 logo VBox class;语言切换=header 第 7 个子(urlwidget)。 */ + .pl-header{flex-wrap:wrap!important;padding:8px 14px!important;gap:6px 10px!important} .pl-header > *{flex-shrink:0!important} - .pl-header > *:first-child{flex-shrink:1!important;min-width:0!important} - .pl-logo{font-size:14px!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis} - .pl-logo-sub{display:none!important} - .pl-btn-sm{white-space:nowrap!important;padding:7px 14px!important;font-size:12px!important} + .pl-header > .filler{display:none!important} + .pl-logo-box{order:1;flex:1 1 auto;min-width:0!important} + .pl-logo-box > *{min-width:0!important;max-width:100%!important} + .pl-btn-sm{order:2;white-space:nowrap!important;padding:7px 14px!important;font-size:12px!important} + .pl-nav{order:3} + .theme-icon-btn{order:4;margin-left:auto} + .pl-header > *:nth-child(7){order:5} + .pl-logo{font-size:15px!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis} + .pl-logo-sub{font-size:9px!important} /* footer 竖排:版权行 381px+左padding 曾顶出 404px 造成 .pl-scroll 横向滚动 */ .pl-footer{flex-direction:column!important;align-items:flex-start!important;gap:6px!important;padding:20px 16px!important} .pl-footer-t{width:100%!important;word-break:break-word!important} diff --git a/wwwroot/index.ui b/wwwroot/index.ui index 40f4e79..1abc83a 100644 --- a/wwwroot/index.ui +++ b/wwwroot/index.ui @@ -726,6 +726,7 @@ } + {% else %} { "id": "app", @@ -763,6 +764,7 @@ { "widgettype": "VBox", "options": { + "css": "pl-logo-box", "gap": "2px", "alignItems": "flex-start" }, @@ -797,8 +799,7 @@ "text": "能力", "i18n": true, "halign": "left", - "css": "pl-nav", - "mobile_hidden": true + "css": "pl-nav" }, "binds": [ { @@ -817,8 +818,7 @@ "text": "产线", "i18n": true, "halign": "left", - "css": "pl-nav", - "mobile_hidden": true + "css": "pl-nav" }, "binds": [ { @@ -837,8 +837,7 @@ "text": "流程", "i18n": true, "halign": "left", - "css": "pl-nav", - "mobile_hidden": true + "css": "pl-nav" }, "binds": [ { @@ -870,8 +869,7 @@ { "widgettype": "urlwidget", "options": { - "url": "{{entire_url('i18n/language.ui')}}", - "mobile_hidden": true + "url": "{{entire_url('i18n/language.ui')}}" } }, {