subtree. Global stylesheets cannot pierce it.
*/
static override styles = [
pageReset,
css`
:host { display: block; }
.doc-group { margin-bottom: 2.5rem; }
.doc-group h2 {
margin: 0 0 1rem;
font-size: var(--sl-text-xl, 1.25rem);
font-weight: 600;
color: var(--sl-color-text);
border-bottom: 1px solid var(--sl-color-border, #e8e8e8);
padding-bottom: 0.35em;
}
.doc-group ul {
list-style: none;
margin: 0;
padding: 0;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
gap: 1rem;
}
.doc-group li {
border: 1px solid var(--sl-color-border, #e8e8e8);
border-radius: 0.5rem;
padding: 0.85rem 1rem;
}
.doc-group a {
display: block;
font-weight: 600;
color: var(--sl-color-text-accent, var(--sl-color-accent, #ea580c));
text-decoration: none;
}
.doc-group a:hover { text-decoration: underline; }
.item-desc {
display: block;
margin-top: 0.35rem;
font-size: var(--sl-text-sm, 0.875rem);
line-height: 1.6;
color: var(--sl-color-gray-5, #6b7280);
}
`,
];
override render() {
const data = this.serverData as DocsIndexData | null;
if (!data) return html`
Loading…
`;
return html`
${data.groups.map(group => html`
${group.label}
${group.items.map(item => html`
-
${item.label}
${item.description ? html`${item.description}` : ''}
`)}
`)}
`;
}
}
export default DocsIndexPage;