Skip to content

armgit / peach

Public Imported from GitHub
0

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

fix: split grouped follow sources into columns

longmeidao366960a73728
diff --git a/tests/test_follow_web.py b/tests/test_follow_web.py
index 73dc01bad..3ddee859b 100644
--- a/tests/test_follow_web.py
+++ b/tests/test_follow_web.py
@@ -741,6 +741,11 @@ class FollowWebSourceTests(unittest.TestCase):
self.assertPageContains('class="frows fsources"')
grid = self.page[self.page.index(".fsources{"):]
self.assertIn("repeat(auto-fit,minmax(430px,1fr))", grid[:grid.index("}")])
+ author_grid = self.page[self.page.index(".fsources>.fauthor{"):]
+ self.assertIn("repeat(auto-fit,minmax(400px,1fr))",
+ author_grid[:author_grid.index("}")],
+ "同一作者的多个来源也要真正分栏,不能只给作者组外层分栏")
+ self.assertPageContains(".fauthorhead{display:flex;grid-column:1/-1")
self.assertPageContains('class="fsourcelink" href="${esc(source.url)}"')
self.assertPageContains('title="打开原来源"')
self.assertPageContains('rel="noreferrer noopener"')
diff --git a/web/app.css b/web/app.css
index 1778b0ae5..310473e3d 100644
--- a/web/app.css
+++ b/web/app.css
@@ -1353,8 +1353,10 @@ body.drawer-open .edge{opacity:0;pointer-events:none} /* 展开时窄栏让位
这段必须排在 `.frow` 之后:测试用 `index('.frow{')` 取那条规则的正文,
放前面的话选择器里的同名片段会被先匹配到,取回来的是这里的规则。 */
.fauthor{border-top:1px solid var(--line-soft)}
+.fsources>.fauthor{display:grid;grid-template-columns:repeat(auto-fit,minmax(400px,1fr));
+ column-gap:22px}
.fauthor:first-child{border-top:0}
-.fauthorhead{display:flex;align-items:center;gap:9px;padding:10px 0 6px}
+.fauthorhead{display:flex;grid-column:1/-1;align-items:center;gap:9px;padding:10px 0 6px}
.fauthorhead b{font-size:var(--fs-md);min-width:0;overflow:hidden;
text-overflow:ellipsis;white-space:nowrap}
.fauthorhead .fmeta{margin-left:auto;flex:none}
@@ -1418,6 +1420,7 @@ details.fcred{display:block}
.faddform .fbtn{flex:1 1 100%}
.frow{gap:8px}
.fsources{grid-template-columns:1fr}
+ .fsources>.fauthor{grid-template-columns:1fr}
.frow .fmeta:nth-of-type(2){display:none}
}