Add svelte as a view engine to swaf #33

Merged
ashpie merged 97 commits from svelte into develop 2021-11-09 19:31:22 +01:00
2 changed files with 32 additions and 4 deletions
Showing only changes of commit ae1d743f15 - Show all commits

View File

@ -1,13 +1,41 @@
<script lang="ts"> <script lang="ts">
import Icon from "../utils/Icon.svelte";
export let currentPageTitle: string; export let currentPageTitle: string;
export let pages: { link: string, title: string }[] = []; export let pages: { link: string, title: string }[] = [];
</script> </script>
<style lang="scss">
ol {
display: flex;
flex-direction: row;
margin: 8px 0;
padding: 0 8px;
list-style: none;
overflow: hidden;
border-radius: 5px;
li {
display: flex;
flex-direction: row;
white-space: nowrap;
align-items: center;
a, span {
display: block;
padding: 8px;
}
}
}
</style>
<nav aria-label="breadcrumb"> <nav aria-label="breadcrumb">
<ol class="breadcrumb"> <ol class="breadcrumb panel">
{#each pages as page} {#each pages as page}
<li><a href={page.link}>{page.title}</a></li> <li><a href={page.link}>{page.title}</a> <Icon name="chevron-right"/></li>
{/each} {/each}
<li class="active" aria-current="page">{currentPageTitle}</li> <li class="active" aria-current="page"><span>{currentPageTitle}</span></li>
</ol> </ol>
</nav> </nav>

View File

@ -20,7 +20,7 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
width: fit-content; width: fit-content;
margin: 0 auto; margin: 8px auto;
padding: 0; padding: 0;
list-style: none; list-style: none;