mirror of
https://github.com/vinta/awesome-python.git
synced 2026-05-09 22:53:49 +08:00
feat(website): generate static category pages
This commit is contained in:
@@ -202,6 +202,8 @@ function getSortValue(row, col) {
|
||||
}
|
||||
|
||||
function sortRows() {
|
||||
if (!tbody) return;
|
||||
|
||||
const arr = Array.prototype.slice.call(rows);
|
||||
const col = activeSort.col;
|
||||
const order = activeSort.order;
|
||||
|
||||
@@ -376,18 +376,92 @@ kbd {
|
||||
}
|
||||
|
||||
.hero-action:focus-visible,
|
||||
.hero-brand-mini:focus-visible,
|
||||
.hero-topbar-link:focus-visible,
|
||||
.search:focus-visible,
|
||||
.filter-clear:focus-visible,
|
||||
.tag:focus-visible,
|
||||
.back-to-top:focus-visible,
|
||||
.no-results-clear:focus-visible,
|
||||
.category-table a:focus-visible,
|
||||
.footer a:focus-visible,
|
||||
.sort-btn:focus-visible {
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: 3px;
|
||||
}
|
||||
|
||||
.category-hero {
|
||||
position: relative;
|
||||
overflow: clip;
|
||||
background: linear-gradient(140deg, var(--hero-bg-start) 0%, var(--hero-bg-mid) 58%, var(--hero-bg-end) 100%);
|
||||
color: var(--hero-text);
|
||||
}
|
||||
|
||||
.category-hero-shell {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
width: min(100%, calc(var(--shell-max) + (var(--shell-pad) * 2)));
|
||||
margin: 0 auto;
|
||||
padding: 1.25rem var(--shell-pad) clamp(3.75rem, 8vw, 6.75rem);
|
||||
display: grid;
|
||||
gap: clamp(3rem, 8vw, 5.5rem);
|
||||
}
|
||||
|
||||
.category-hero h1 {
|
||||
font-family: var(--font-display);
|
||||
font-size: clamp(3.6rem, 9vw, 7rem);
|
||||
line-height: 0.9;
|
||||
font-weight: 600;
|
||||
text-wrap: balance;
|
||||
}
|
||||
|
||||
.category-subtitle {
|
||||
max-width: 68ch;
|
||||
margin-top: 1.1rem;
|
||||
color: var(--hero-muted);
|
||||
font-size: clamp(1rem, 1.8vw, 1.18rem);
|
||||
text-wrap: pretty;
|
||||
}
|
||||
|
||||
.category-results {
|
||||
padding-top: clamp(2.5rem, 5vw, 3.75rem);
|
||||
}
|
||||
|
||||
.category-table .col-name {
|
||||
width: min(42rem, 48vw);
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.category-table .col-name > a {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.category-row-desc {
|
||||
display: block;
|
||||
max-width: 68ch;
|
||||
margin-top: 0.32rem;
|
||||
color: var(--ink-soft);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 500;
|
||||
line-height: 1.55;
|
||||
text-wrap: pretty;
|
||||
}
|
||||
|
||||
.category-row-desc a {
|
||||
color: var(--accent-deep);
|
||||
text-decoration: underline;
|
||||
text-decoration-color: var(--accent-underline);
|
||||
text-underline-offset: 0.18em;
|
||||
}
|
||||
|
||||
.category-row-desc a:hover {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.category-table .expand-content {
|
||||
padding-block: 0.25rem 0.15rem;
|
||||
}
|
||||
|
||||
.sponsor-band {
|
||||
padding-block: clamp(2.5rem, 5.5vw, 4rem);
|
||||
background:
|
||||
|
||||
Reference in New Issue
Block a user