Skip to content

Commit

Permalink
quick notes mode
Browse files Browse the repository at this point in the history
  • Loading branch information
eyeseast committed May 22, 2024
1 parent 5e2b8a0 commit f7ebaf7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/lib/components/documents/Notes.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<script lang="ts">
import type { Note as NoteType } from "$lib/api/types";
import Note from "./Note.svelte";
export let notes: NoteType[];
</script>

<div class="pages">
{#each notes as note}
<Note {note} focused />
{/each}
</div>

<style>
.pages {
display: flex;
flex-flow: column;
align-items: center;
gap: 3rem;
}
</style>
5 changes: 5 additions & 0 deletions src/routes/documents/[id]-[slug]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import Search from "$lib/components/forms/Search.svelte";
import Text from "$lib/components/documents/Text.svelte";
import ThumbnailGrid from "$lib/components/documents/ThumbnailGrid.svelte";
import Notes from "$lib/components/documents/Notes.svelte";
// config and utils
import { IMAGE_WIDTHS_MAP } from "@/config/config.js";
Expand Down Expand Up @@ -226,6 +227,10 @@
<ThumbnailGrid {document} size={zoomToSize(zoom)} />
{/if}

{#if $mode === "notes"}
<Notes notes={document.notes} />
{/if}

<PageToolbar slot="footer">
<label class="mode" slot="left">
<span class="sr-only">Mode</span>
Expand Down

0 comments on commit f7ebaf7

Please sign in to comment.