Comparar commits

...

4 commits

Autor SHA1 Mensaje Fecha
3715f727d0 More space between nav brand and actual navigation 2023-03-19 00:17:09 +01:00
db1be64e57 Center text 2023-03-19 00:16:44 +01:00
Pau Figueras
b2852fe77f Add mainpage component 2023-03-16 22:53:42 +01:00
Pau Figueras
1583f2602f Create mainpage component 2023-03-16 22:53:28 +01:00
S'han modificat 3 arxius amb 23 adicions i 3 eliminacions

18
src/lib/mainpage.svelte Normal file
Veure arxiu

@ -0,0 +1,18 @@
<script lang="ts">
import { Heading, Li, List } from "flowbite-svelte";
export let meData: { sectionTitle: string, sectionItems: { content: string }[] }[] = [];
</script>
{#each meData as mdt}
<Heading>{mdt.sectionTitle}</Heading>
<List>
{#each mdt.sectionItems as sectItems}
<Li>{sectItems.content}</Li>
{:else}
<Li>No items</Li>
{/each}
</List>
{:else}
<h5 class="text-center">No data about me (yet!)</h5>
{/each}

Veure arxiu

@ -5,7 +5,7 @@
export let pageTitle: string = "Default Title"; export let pageTitle: string = "Default Title";
export let toggleDarkModeButton: boolean = true; export let toggleDarkModeButton: boolean = true;
</script> </script>
<Navbar let:hidden let:toggle color="form" navDivClass="mx-auto flex flex-wrap justify-around items-center" navClass="px-4 md:px-2 py-2.5 w-full bg-zinc-200 dark:bg-zinc-900"> <Navbar let:hidden let:toggle color="form" navDivClass="mx-auto flex flex-wrap justify-between items-center" navClass="px-4 md:px-2 py-2.5 w-full bg-zinc-200 dark:bg-zinc-900">
<NavBrand href="/"> <NavBrand href="/">
<span class="self-center whitespace-nowrap text-xl font-semibold dark:text-white"> <span class="self-center whitespace-nowrap text-xl font-semibold dark:text-white">
{ pageTitle.toUpperCase() } { pageTitle.toUpperCase() }

Veure arxiu

@ -1,6 +1,8 @@
<script> <script>
import Mainpage from "$lib/mainpage.svelte";
</script> </script>
<div class="p-8"> <div class="p-8">
<p>I Like trains</p> <Mainpage />
</div> </div>