Skip to content

armgit / peach

Public Imported from GitHub
0

Peach: Local-first video metadata scraper and media manager.

fix(web): 关注卡骨架补上末尾状态行占掉的那格间距

longmeidao719cd2147f01
diff --git a/tests/test_web_ui.py b/tests/test_web_ui.py
index e24206ec6..0c34ccde2 100644
--- a/tests/test_web_ui.py
+++ b/tests/test_web_ui.py
@@ -1699,6 +1699,8 @@ class WebUiSourceTests(unittest.TestCase):
self.assertPageContains(
"{cards:true,className:'follow-content-skeleton postercard-skeleton'})}</div>`;")
self.assertPageContains(".follow-content-skeleton .skeletoncard em{height:21px}")
+ self.assertPageContains(".follow-content-skeleton .skeletoncard{padding-bottom:8px}")
+ self.assertPageContains('<span class="fstate" aria-live="polite"></span></article>`;')
self.assertPageContains('.followitem .meta .s{min-height:21px}')
# 真实页面就是这两个类名与这张网格,骨架照抄才可能不位移。
self.assertPageContains('<div class="tier followauthors" aria-label="按作者筛选">')
diff --git a/web/css/09-skeleton.css b/web/css/09-skeleton.css
index 896c93290..a884f93bf 100644
--- a/web/css/09-skeleton.css
+++ b/web/css/09-skeleton.css
@@ -32,8 +32,11 @@
.postercard-skeleton .skeletoncard u{display:block;width:64%;font-size:var(--fs-xs);
height:calc(1.45em + var(--tag-pad-y) * 2 + 2px);
border-radius:var(--tag-radius);background:var(--hover)}
-/* 关注卡的归属行有 min-height,比首页那条高 3.6px:一页十来行叠起来就是一屏的错位。 */
+/* 关注卡和首页卡差两处,一页十来行叠起来就是一屏的错位:归属行有 min-height,
+ 高 3.6px;末尾还有一条报状态的 aria-live 行,本身没高度,却照样占掉一格 8px 的
+ 卡内间距。 */
.follow-content-skeleton .skeletoncard em{height:21px}
+.follow-content-skeleton .skeletoncard{padding-bottom:8px}
/* 数据管理是一列 fieldset,不是海报网格:骨架照 fieldset 的轮廓排,
否则整页刷新先看到三列 16:9 占位,加载完又整个换成一列长条。
底部那条是操作条的位置,不参与微光——它是框体,不是待填的内容。 */