mirror of
https://github.com/KingHWJ/WeReadBoard.git
synced 2026-11-03 18:24:58 +08:00
feat: add search and sort to thoughts detail page
- Search box: real-time filter across highlights, book reviews, and thoughts content (mark_text, content, abstract fields) - Sort dropdown: 3 modes - newest first, oldest first, by chapter order (chapter_uid + range position) - Chapter sort mode groups highlights by chapter with titles - Time sort mode flattens highlights with chapter labels - Empty state shows search keyword when no results match - Mobile responsive: toolbar stacks vertically on narrow screens
This commit is contained in:
1 parent
d276608538
commit
90b9614b5e
2 files changed
+189
-22
No files matched your search
+72
-2
@@ -1543,14 +1543,70 @@ body {
|
||||
color: var(--accent-dark);
|
||||
}
|
||||
|
||||
/* 想法页面分类筛选 */
|
||||
/* 想法页面工具栏 */
|
||||
.thoughts-toolbar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
margin: 24px 0 20px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.thoughts-filters {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin: 24px 0 20px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.thoughts-controls {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.thoughts-search-input {
|
||||
padding: 7px 14px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 20px;
|
||||
background: var(--bg-card);
|
||||
color: var(--text-primary);
|
||||
font-size: 14px;
|
||||
width: 240px;
|
||||
transition: border-color 0.2s, box-shadow 0.2s;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.thoughts-search-input:focus {
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 0 0 3px var(--accent-bg);
|
||||
}
|
||||
|
||||
.thoughts-search-input::placeholder {
|
||||
color: var(--text-light);
|
||||
}
|
||||
|
||||
.thoughts-sort-select {
|
||||
padding: 7px 14px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 20px;
|
||||
background: var(--bg-card);
|
||||
color: var(--text-primary);
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
transition: border-color 0.2s;
|
||||
}
|
||||
|
||||
.thoughts-sort-select:hover {
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
.thoughts-sort-select:focus {
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 0 0 3px var(--accent-bg);
|
||||
}
|
||||
|
||||
.thought-filter-btn {
|
||||
padding: 6px 18px;
|
||||
border: 1px solid var(--border);
|
||||
@@ -1830,6 +1886,20 @@ body {
|
||||
.global-search-wrapper {
|
||||
max-width: 100%;
|
||||
}
|
||||
.thoughts-toolbar {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
.thoughts-controls {
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
.thoughts-search-input {
|
||||
width: 100%;
|
||||
}
|
||||
.thoughts-sort-select {
|
||||
width: 100%;
|
||||
}
|
||||
.shelf-search {
|
||||
width: 140px;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user