1
0

add nav tree

This commit is contained in:
Nicola Clark 2024-10-11 00:23:32 -05:00
parent bba3cf4fc7
commit 3d89c63f8f
Signed by: nicola
GPG Key ID: 3E1710E7FF08956C
4 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,13 @@
<li><slot /></li>
<style lang="less">
li {
margin: 0;
padding: @padding-md;
text-align: center;
}
li:not(:last-of-type) {
border-bottom: 1px solid @color-dark;
}
</style>

View File

@ -0,0 +1,14 @@
<nav>
<ul>
<slot />
</ul>
</nav>
<style lang="less">
ul {
border-bottom: 2px solid @color-dark;
list-style-type: none;
margin: 0;
padding: 0;
}
</style>

View File

@ -1,5 +1,7 @@
<script lang="ts">
import Headline from '$lib/components/headline.svelte';
import NavItem from '$lib/components/nav-item.svelte';
import NavTree from '$lib/components/nav-tree.svelte';
</script>
<svelte:head>
@ -7,4 +9,9 @@
</svelte:head>
<header>
<Headline>resumarkdown</Headline>
<NavTree>
<NavItem>content</NavItem>
<NavItem>style</NavItem>
<NavItem>preview</NavItem>
</NavTree>
</header>

View File

@ -6,3 +6,8 @@ test('page has headline', async ({ page }) => {
await expect(headline).toBeVisible();
await expect(headline).toHaveText('resumarkdown');
});
test('page has nav tree', async ({ page }) => {
await page.goto('/');
await expect(page.locator('nav')).toBeVisible();
});