Finished ross content, added skill matrix, li, and ul, and improved many existing components, created and refactored to unified layouts and grid, visual improvements with proper column to row collapsing
This commit is contained in:
38
src/components/Ol.astro
Normal file
38
src/components/Ol.astro
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
import Li from "@components/Li.astro";
|
||||
import type { ComponentPropsBase } from "@interfaces/components.ts";
|
||||
|
||||
import type { lineItem } from "@interfaces/ul-li.ts";
|
||||
|
||||
interface Props extends ComponentPropsBase {
|
||||
lineItems?: lineItem[];
|
||||
depth?: number;
|
||||
}
|
||||
|
||||
const { class: className, lineItems, depth = 0 } = Astro.props;
|
||||
---
|
||||
|
||||
<ol
|
||||
class:list={["list-inside list-disc", className, depth > 0 ? "ps-3" : false]}
|
||||
>
|
||||
{
|
||||
lineItems ? (
|
||||
lineItems.map((line) => (
|
||||
<Li>
|
||||
{line.item}
|
||||
{line.subItems ? (
|
||||
<Astro.self
|
||||
class={className}
|
||||
lineItems={line.subItems}
|
||||
depth={depth + 1}
|
||||
/>
|
||||
) : undefined}
|
||||
</Li>
|
||||
))
|
||||
) : (
|
||||
<Li>
|
||||
<slot />
|
||||
</Li>
|
||||
)
|
||||
}
|
||||
</ol>
|
||||
Reference in New Issue
Block a user