feat(frontend): wire comment sort/author filter like Zibll
Apply comments_template_query_args for newest/hottest/author-only, keep filter bar visible under empty author filters, and restyle order tabs/buttons with Zibll-compatible classes.
This commit is contained in:
1 parent
b155936868
commit
b01a89bee2
3 files changed
+165
-8
No files matched your search
@@ -225,6 +225,62 @@
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* Zibll-compatible class names used by aksrt-comments.php */
|
||||
.comment-order-box {
|
||||
display: flex;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
gap: 4px;
|
||||
}
|
||||
.comment-order-box li a,
|
||||
.comment-order-box .comment-orderby {
|
||||
display: inline-block;
|
||||
padding: 4px 12px;
|
||||
border-radius: 4px;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: var(--color-ink-4);
|
||||
text-decoration: none;
|
||||
transition: background 0.15s ease, color 0.15s ease;
|
||||
}
|
||||
.comment-order-box li a:hover,
|
||||
.comment-order-box .comment-orderby:hover {
|
||||
background: var(--surface-3);
|
||||
color: var(--color-ink);
|
||||
}
|
||||
.comment-order-box li.active a,
|
||||
.comment-order-box li.active .comment-orderby {
|
||||
background: var(--color-primary-soft, rgba(240, 68, 148, 0.12));
|
||||
color: var(--color-primary);
|
||||
font-weight: 600;
|
||||
}
|
||||
.btn-only-author,
|
||||
.comment-author-filter {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 4px 12px;
|
||||
border-radius: 999px;
|
||||
border: 1px solid var(--color-line);
|
||||
background: var(--surface-1);
|
||||
color: var(--color-ink-3);
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
|
||||
}
|
||||
.btn-only-author:hover,
|
||||
.comment-author-filter:hover {
|
||||
border-color: var(--color-primary);
|
||||
color: var(--color-primary);
|
||||
}
|
||||
.btn-only-author.active,
|
||||
.comment-author-filter.active {
|
||||
border-color: var(--color-primary);
|
||||
background: var(--color-primary-soft, rgba(240, 68, 148, 0.12));
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
* 评论列表
|
||||
* ============================================================ */
|
||||
|
||||
Reference in new issue
Block a user