Peach: Local-first video metadata scraper and media manager.
fix: align the narrow search bar to the top bar's own spacing
Peach local maintenance0e68b33c0a63
diff --git a/tests/test_web_ui.py b/tests/test_web_ui.pyindex 8a118e04b..7a8c53b7c 100644--- a/tests/test_web_ui.py+++ b/tests/test_web_ui.py@@ -141,7 +141,9 @@ class WebUiSourceTests(unittest.TestCase):self.assertPageContains(".top:has(.search.open) #filterBtn,")self.assertPageContains(".top:has(.search.open) .searchback{display:inline-flex")# 搜索框不铺满:左边留出返回按钮的位置。- self.assertPageContains(".search{position:absolute;left:52px;right:8px;top:8px")+ # 左右 8、两者间距 4、同高 36、纵向各 8——全部取自 `.top` 自己的 padding/gap。+ self.assertPageContains(".search{position:absolute;left:48px;right:8px;top:8px;height:36px")+ self.assertPageContains(".searchback{display:inline-flex;position:absolute;left:8px;top:8px")def test_avatar_tiles_do_not_inherit_the_text_link_underline(self):"""取消规则必须真的压过 `.entitylink:hover`,不能只是写在文件里。diff --git a/web/app.css b/web/app.cssindex bc65d15df..a9ab75116 100644--- a/web/app.css+++ b/web/app.css@@ -840,8 +840,12 @@ body.drawer-open .edge{opacity:0;pointer-events:none} /* 展开时窄栏让位.ib svg{width:19px;height:19px}/* 展开的搜索栏不铺满整条:左边留出返回按钮,和 YouTube 手机版一致——否则进了搜索就没有退出的入口,只能靠失焦或 Esc。 */- .search{position:absolute;left:52px;right:8px;top:8px;max-width:none;margin:0;- display:none;z-index:5;background:var(--surface)}+ /* 间距统一到顶栏自己的口径:左右留白 8(`.top` 的 padding),返回键与搜索框之间+ 4(`.top` 的 gap),两者同高 36(`.ib` 的窄屏尺寸),纵向各留 (52-36)/2=8。+ 不用 transform 居中——`.searchmenu` 在窄屏是 position:fixed,祖先一有 transform+ 就会改成相对它定位,下拉栏会整个跑偏。 */+ .search{position:absolute;left:48px;right:8px;top:8px;height:36px;padding:0 14px;+ max-width:none;margin:0;display:none;z-index:5;background:var(--surface)}.search.open{display:flex}/* 展开搜索时整条顶栏让位:筛选、品牌和右侧动作全部收起,只留返回箭头和输入框。不收起的话筛选按钮和返回箭头会叠在同一个位置上。 */@@ -852,7 +856,7 @@ body.drawer-open .edge{opacity:0;pointer-events:none} /* 展开时窄栏让位.top:has(.search.open) #selectMode,.top:has(.search.open) #refresh,.top:has(.search.open) #settingsBtn{display:none!important}- .top:has(.search.open) .searchback{display:inline-flex;position:absolute;left:6px;top:8px;z-index:6}+ .top:has(.search.open) .searchback{display:inline-flex;position:absolute;left:8px;top:8px;z-index:6}.searchmenu{position:fixed;left:8px;right:8px;top:56px;max-height:70vh;overflow:auto}#searchBtn{display:inline-flex!important}/* 移动端不需要密度切换和筛选抽屉按钮挤在一起 */