mirror of
https://github.com/kremalicious/blog.git
synced 2024-06-28 16:48:00 +02:00
30 lines
607 B
Plaintext
30 lines
607 B
Plaintext
|
---
|
||
|
type Props = {
|
||
|
tableOfContents: string
|
||
|
}
|
||
|
|
||
|
const { tableOfContents } = Astro.props
|
||
|
---
|
||
|
|
||
|
<style>
|
||
|
.toc {
|
||
|
background: var(--box-background-color);
|
||
|
padding: var(--spacer);
|
||
|
border-radius: var(--border-radius);
|
||
|
border: var(--border-width) solid var(--border-color);
|
||
|
margin-bottom: calc(var(--spacer) * var(--line-height));
|
||
|
}
|
||
|
|
||
|
.toc :global(ul),
|
||
|
.toc :global(p) {
|
||
|
margin: 0;
|
||
|
}
|
||
|
|
||
|
.toc :global(li) {
|
||
|
margin-top: calc(var(--spacer) / 6);
|
||
|
margin-bottom: calc(var(--spacer) / 6);
|
||
|
}
|
||
|
</style>
|
||
|
|
||
|
<nav aria-label="Table of Contents" class="toc" set:html={tableOfContents} />
|