Skip to content

Commit

Permalink
Add a wrapper div
Browse files Browse the repository at this point in the history
  • Loading branch information
eyeseast committed Apr 30, 2024
1 parent d450e6a commit ba89e3f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/lib/components/documents/TextPage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
align-self: stretch;
gap: var(--font-m, 1rem);
padding: 0 1rem;
margin: 0.75rem 0;
margin: 0.75rem 0 0;
max-width: 100%;
}
Expand All @@ -32,6 +32,7 @@
margin: 0;
padding: 1.5rem;
text-wrap: pretty;
word-break: break-word;
color: var(--gray-5, #233944);
font-family: "Source Code Pro", monospace;
Expand Down
15 changes: 12 additions & 3 deletions src/routes/documents/[id]-[slug]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,11 @@

{#if mode === "text"}
{#await text then { pages }}
{#each pages as { page, contents }}
<TextPage {page} {contents} --zoom={zoom} />
{/each}
<div class="textPages">
{#each pages as { page, contents }}
<TextPage {page} {contents} --zoom={zoom} />
{/each}
</div>
{/await}
{/if}

Expand Down Expand Up @@ -147,6 +149,13 @@
</ContentLayout>

<style>
.textPages {
max-width: 48rem;
padding: 0 1rem;
margin: 0 auto;
width: 100%;
}
label.mode,
label.zoom {
display: flex;
Expand Down

0 comments on commit ba89e3f

Please sign in to comment.