|
|
|
@ -2,6 +2,7 @@
|
|
|
|
import type { PageData } from './$types'
|
|
|
|
import type { PageData } from './$types'
|
|
|
|
import * as Card from '$lib/components/ui/card'
|
|
|
|
import * as Card from '$lib/components/ui/card'
|
|
|
|
import { Button } from '$lib/components/ui/button'
|
|
|
|
import { Button } from '$lib/components/ui/button'
|
|
|
|
|
|
|
|
import { BarChart } from 'lucide-svelte'
|
|
|
|
|
|
|
|
|
|
|
|
export let data: PageData
|
|
|
|
export let data: PageData
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
@ -20,11 +21,20 @@
|
|
|
|
<Card.Description>Projects</Card.Description>
|
|
|
|
<Card.Description>Projects</Card.Description>
|
|
|
|
</Card.Header>
|
|
|
|
</Card.Header>
|
|
|
|
<Card.Content>
|
|
|
|
<Card.Content>
|
|
|
|
<div class="flex w-3/4 flex-col items-stretch gap-2">
|
|
|
|
<div class="flex w-full flex-col items-stretch gap-2">
|
|
|
|
{#each data.projects as project}
|
|
|
|
{#each data.projects as project}
|
|
|
|
<Button href={'/projects/' + project.uuid}>
|
|
|
|
<div class="flex w-full items-center justify-between gap-2">
|
|
|
|
{project.name}
|
|
|
|
<Button href={'/projects/' + project.uuid} class="w-3/4">
|
|
|
|
</Button>
|
|
|
|
{project.name}
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
<div class="flex gap-2">
|
|
|
|
|
|
|
|
<BarChart />
|
|
|
|
|
|
|
|
{project.shortener.reduce(
|
|
|
|
|
|
|
|
(curr, shortener) => shortener.visitor.length + curr,
|
|
|
|
|
|
|
|
0,
|
|
|
|
|
|
|
|
)} visits
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
{/each}
|
|
|
|
{/each}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</Card.Content>
|
|
|
|
</Card.Content>
|
|
|
|
|