Skip to content

Commit

Permalink
starting on structure
Browse files Browse the repository at this point in the history
  • Loading branch information
eyeseast committed Feb 27, 2024
1 parent a5d85b1 commit 1f800c4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 23 deletions.
2 changes: 2 additions & 0 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<script>
import "@/style/kit.css";
export let data;
$: me = data.me;
Expand Down
16 changes: 14 additions & 2 deletions src/routes/app/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
<script>
<script lang="ts">
import "@/style/kit.css";
</script>

<slot />
<svelte:head>
<title>DocumentCloud</title>
</svelte:head>

<div class="ui">
<section class="navigation"></section>

<main class="content">
<slot />
</main>

<section class="action"></section>
</div>
23 changes: 2 additions & 21 deletions src/routes/app/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,11 @@
$: searchResults = data.searchResults;
// local utils
function path(url: URL | string) {
url = new URL(url);
return url.pathname;
}
</script>

<svelte:head>
<title>DocumentCloud</title>
</svelte:head>

<div class="container">
<h1>Document search results:</h1>

{#await searchResults}
<p>Loading ...</p>
{:then results}
{#each results?.results as document}
<div class="document">
<h2>{document.title}</h2>
<p><a href={path(document.canonical_url)}>Open</a></p>
</div>
{:else}
<p>No results.</p>
{/each}
{/await}
</div>

0 comments on commit 1f800c4

Please sign in to comment.