Skip to content

Commit

Permalink
Index pages
Browse files Browse the repository at this point in the history
  • Loading branch information
jaybutera committed Aug 2, 2023
1 parent 5e9e53f commit 5d2252c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
23 changes: 23 additions & 0 deletions ui/src/routes/index/[index]/+page.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<script>
import Nav from "../../components/Nav.svelte";
import { img_server, handle_file_upload } from "$lib/img.ts";
import { goto } from "$app/navigation";
import Uploading from '../../components/Uploading.svelte';
export let data;
const index = data.index_name;
const topics = data.topics;
</script>

<style>
</style>

<Nav>
</Nav>

<ul>
{#each topics as topic}
<li>
<a href="/{index}/{topic}">{topic}</a>
</li>
{/each}
</ul>
9 changes: 9 additions & 0 deletions ui/src/routes/index/[index]/+page.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { get_image_names, get_index } from '$lib/img.ts';

export function load({ params }) {
const imgs = get_image_names(params.index);
return {
index_name: params.index,
topics: get_index(params.index).topics,
}
}

0 comments on commit 5d2252c

Please sign in to comment.