关于 2021 年 3 月的此论坛帖子:
用于隐藏桌面视图中群组成员详细信息列表中的“已发布”和“已查看”列的 CSS,现在会隐藏需要请求加入的群组的“接受”和“拒绝”按钮。
这是需要修改或替换的 CSS。
/* 从群组成员详细信息列表中移除“已发布”和“已查看”列 */
.group-members {
th {
&:nth-child(5),
&:nth-child(6) {
display: none;
}
}
td {
&:nth-child(4),
&:nth-child(5) {
display: none;
}
}
}
这是显示使用 nth-child CSS 代码的权衡以及“接受”和“拒绝”按钮消失的视频:
https://www.loom.com/share/d066ea1a765a4ce4b3b13a952f98fb1b
提前感谢好心人提供更具针对性的 CSS,以便我可以在 https://[yourdiscourseforumurl].com/g/[YourGroupName] 上仅隐藏“已发布”和“已查看”列而不隐藏其他任何内容。
2 个赞
Don
2
你好,
这有点棘手,因为据我所见,没有特定的类可以定位。但我认为我找到了 CSS 解决方案,无需修改模板即可实现。
问题在于 td 没有特定的类可以轻松定位,但你可以定位它里面的内容。
此 CSS 将检查 td 中的内容,如果它是 span,它将隐藏(日期在 span 中)。但在请求页面上,按钮是 button,所以这个 CSS 不会隐藏按钮的 td。
/* 从 group-detail 成员列表中移除“Posted”和“Seen”列 */
table.group-members {
th {
&:nth-child(4),
&:nth-child(5) {
display: none;
}
}
td {
&:nth-child(4),
&:nth-child(5) {
> span {
display: none;
}
}
}
}
其他方法 
但是,你可以定位表头行的 bulk-select 和表体行的 group-owner 类。此 CSS 仅在 bulk-select 和 group-owner 类出现时激活。这些类在请求页面上不出现,所以不会激活。
/* 从 group-detail 成员列表中移除“Posted”和“Seen”列 */
table.group-members {
th.bulk-select {
+ th + th + th,
+ th + th + th + th {
display: none;
}
}
td.group-owner {
+ td + td,
+ td + td + td {
display: none;
}
}
}
希望这有帮助 
3 个赞
system
(system)
关闭
3
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.