feat(polaris): import bookmarks and refine category scrolling

- 导入 29 条精选公开书签,排除重复与敏感入口
- 将滚动限制在分类页内层卡片区域,并适配窄屏
- 更新数据与页面测试
This commit is contained in:
2026-10-08 19:49:30 +08:00
parent 6641d181ab
commit e37cf9936e
7 changed files with 547 additions and 50 deletions
+159 -3
View File
@@ -569,12 +569,16 @@ a {
}
.category-page {
min-height: 100svh;
height: 100svh;
padding: 20px 20px 20px 0;
}
.category-page__panel {
min-height: calc(100svh - 40px);
display: flex;
height: 100%;
min-height: 0;
overflow: hidden;
flex-direction: column;
padding: 48px clamp(32px, 4vw, 64px) 56px;
background: var(--surface-sidebar);
box-shadow: var(--shadow-panel);
@@ -603,11 +607,35 @@ a {
}
.category-tools {
display: flex;
min-height: 0;
flex: 1;
flex-direction: column;
margin-top: 36px;
}
.category-tools__viewport {
min-width: 0;
min-height: 0;
overflow-y: auto;
overscroll-behavior-y: contain;
flex: 1;
padding: 16px;
border: 1px solid rgba(255, 255, 255, 0.36);
border-radius: 20px;
background: rgba(82, 113, 151, 0.09);
box-shadow:
inset 0 2px 10px rgba(29, 56, 93, 0.07),
inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.category-tools__viewport:focus-visible {
outline-offset: -4px;
}
.category-section-header {
display: flex;
flex: none;
align-items: center;
gap: 12px;
margin-bottom: 20px;
@@ -705,6 +733,7 @@ a {
.tool-grid {
display: grid;
align-content: start;
margin: 0;
padding: 0;
list-style: none;
@@ -726,6 +755,12 @@ a {
text-align: center;
}
.category-tools__viewport > .category-empty-state {
height: 100%;
min-height: 0;
padding-block: 20px;
}
.category-empty-state > svg {
width: 36px;
height: 36px;
@@ -791,7 +826,8 @@ a {
}
.local-search-results,
.sidebar__nav {
.sidebar__nav,
.category-tools__viewport {
scrollbar-color: rgba(100, 116, 139, 0.32) transparent;
scrollbar-width: thin;
}
@@ -816,6 +852,126 @@ a {
}
}
@media (max-width: 999px) {
.tool-grid {
grid-template-columns: minmax(0, 1fr);
}
}
@media (max-width: 767px) {
/* Keep category navigation usable without squeezing the boxed content. */
.app-shell:has(.category-page) .sidebar {
inset: 12px 12px auto;
width: auto;
height: 124px;
}
.app-shell:has(.category-page) .sidebar__header,
.app-shell:has(.category-page)[data-sidebar-collapsed="true"]
.sidebar__header {
min-height: 56px;
flex-direction: row;
padding: 0 12px;
}
.app-shell:has(.category-page) .sidebar__header > button {
display: none;
}
.app-shell:has(.category-page) .sidebar__brand {
justify-content: flex-start;
}
.app-shell:has(.category-page) .sidebar__nav,
.app-shell:has(.category-page)[data-sidebar-collapsed="true"] .sidebar__nav {
flex-direction: row;
overflow-x: auto;
overflow-y: hidden;
padding: 8px 12px 12px;
}
.app-shell:has(.category-page) .sidebar__categories {
flex: none;
flex-direction: row;
}
.app-shell:has(.category-page) .sidebar__nav-item,
.app-shell:has(.category-page)[data-sidebar-collapsed="true"]
.sidebar__nav-item {
width: auto;
height: 40px;
min-height: 40px;
flex: none;
justify-content: flex-start;
padding-inline: 12px;
}
.app-shell:has(.category-page) .sidebar__site-name.sr-only,
.app-shell:has(.category-page) .sidebar__label.sr-only {
position: static;
width: auto;
height: auto;
margin: 0;
overflow: hidden;
clip: auto;
white-space: nowrap;
}
.app-shell:has(.category-page) .app-shell__content {
margin-left: 0;
}
.category-page {
padding: 148px 12px 12px;
}
.category-page__panel {
padding: 28px 20px 36px;
}
.category-tools__viewport {
padding: 12px;
}
.category-header__title {
font-size: 32px;
}
}
/* When the header would leave only a sliver of cards, let the page scroll instead. */
@media (max-height: 540px), (max-width: 767px) and (max-height: 700px) {
.category-page {
height: auto;
min-height: 100svh;
}
.category-page__panel {
height: auto;
min-height: calc(100svh - 40px);
overflow: visible;
}
.category-tools {
flex: none;
}
.category-tools__viewport {
overflow: visible;
flex: none;
}
.category-tools__viewport > .category-empty-state {
height: auto;
min-height: 200px;
}
}
@media (max-width: 767px) and (max-height: 700px) {
.category-page__panel {
min-height: calc(100svh - 160px);
}
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,