diff --git a/src/lib/components/NavBar.svelte b/src/lib/components/NavBar.svelte index 563faa8..df83ee0 100644 --- a/src/lib/components/NavBar.svelte +++ b/src/lib/components/NavBar.svelte @@ -33,7 +33,7 @@ {#if isReader} (settingsHidden = false)} /> {/if} diff --git a/src/lib/components/Reader/MangaPage.svelte b/src/lib/components/Reader/MangaPage.svelte index 20f64c1..4c849fc 100644 --- a/src/lib/components/Reader/MangaPage.svelte +++ b/src/lib/components/Reader/MangaPage.svelte @@ -1,17 +1,13 @@ -
- img +
{#each textBoxes as { left, top, width, height, lines, fontSize, writingMode }}
{#each lines as line}

{line}

diff --git a/src/lib/components/Settings.svelte b/src/lib/components/Settings.svelte index 9fc471b..4c17ac6 100644 --- a/src/lib/components/Settings.svelte +++ b/src/lib/components/Settings.svelte @@ -1,8 +1,8 @@
- +
+
diff --git a/src/lib/panzoom/Panzoom.svelte b/src/lib/panzoom/Panzoom.svelte index 9eeef91..6f70812 100644 --- a/src/lib/panzoom/Panzoom.svelte +++ b/src/lib/panzoom/Panzoom.svelte @@ -2,15 +2,6 @@ import { initPanzoom } from './util'; -
-
- -
+
+
- - diff --git a/src/lib/settings/index.ts b/src/lib/settings/index.ts index 4c1feae..03e370b 100644 --- a/src/lib/settings/index.ts +++ b/src/lib/settings/index.ts @@ -8,6 +8,8 @@ type Settings = { textEditable: boolean; textBoxBorders: boolean; displayOCR: boolean; + boldFont: boolean; + backgroundColor: string; }; const defaultSettings: Settings = { @@ -16,7 +18,9 @@ const defaultSettings: Settings = { singlePageView: false, displayOCR: true, textEditable: false, - textBoxBorders: false + textBoxBorders: false, + boldFont: false, + backgroundColor: '#0d0d0f' } const stored = browser ? window.localStorage.getItem('settings') : undefined @@ -34,6 +38,8 @@ export function updateSetting(key: string, value: any) { } export function resetSettings() { + console.log('br', defaultSettings); + settingsStore.set(defaultSettings); } diff --git a/src/lib/util/index.ts b/src/lib/util/index.ts new file mode 100644 index 0000000..8b11aef --- /dev/null +++ b/src/lib/util/index.ts @@ -0,0 +1,3 @@ +export * from './snackbar' +export * from './upload' +export * from './misc' \ No newline at end of file diff --git a/src/lib/util/misc.ts b/src/lib/util/misc.ts new file mode 100644 index 0000000..8b1a081 --- /dev/null +++ b/src/lib/util/misc.ts @@ -0,0 +1,3 @@ +export function clamp(num: number, min: number, max: number) { + return Math.min(Math.max(num, min), max); +} \ No newline at end of file diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 6c6f0a0..00a7bff 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -11,9 +11,3 @@
- - diff --git a/src/routes/[manga]/[volume]/+layout.svelte b/src/routes/[manga]/[volume]/+layout.svelte index 2803b4f..5d7b1bd 100644 --- a/src/routes/[manga]/[volume]/+layout.svelte +++ b/src/routes/[manga]/[volume]/+layout.svelte @@ -1,3 +1,17 @@ + +