Skip to content

Commit

Permalink
Fix warning found when running in Fire Fox (#414)
Browse files Browse the repository at this point in the history
* Loading /collections/eng_C01.pkf using `window.fetch`. For best results,
  use the `fetch` that is passed to your `load` function
* Unexpected value 1.5rem parsing width attribute. (of SVG)
  • Loading branch information
chrisvire authored Nov 3, 2023
1 parent 1d67885 commit a4d728b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/lib/components/TextAppearanceSelector.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ The navbar component. We have sliders that update reactively to both font size a
<!-- Sliders for when text appearence text size is implemented place holder no functionality-->
{#if showFontSize}
<div class="grid gap-4 items-center range-row m-2">
<TextAppearanceIcon color={$monoIconColor} size="1.5rem" />
<TextAppearanceIcon color={$monoIconColor} />
<Slider
bind:value={$bodyFontSize}
{barColor}
Expand All @@ -121,7 +121,7 @@ The navbar component. We have sliders that update reactively to both font size a
{/if}
{#if showLineHeight}
<div class="grid gap-4 items-center range-row m-2">
<ImageIcon.FormatLineSpacing color={$monoIconColor} size="1.5rem" />
<ImageIcon.FormatLineSpacing color={$monoIconColor} />
<Slider
bind:value={$bodyLineHeight}
{barColor}
Expand All @@ -136,7 +136,7 @@ The navbar component. We have sliders that update reactively to both font size a
{/if}
{#if showFonts}
<div class="grid gap-4 items-center range-row m-2">
<ImageIcon.FontChoice color={$monoIconColor} size="1.5rem" />
<ImageIcon.FontChoice color={$monoIconColor} />
<button
class="dy-btn-sm col-span-2 rounded"
style:border="1px dotted"
Expand Down
6 changes: 3 additions & 3 deletions src/lib/data/scripture.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { pk } from '$lib/data/stores/pk';
import config from '$lib/data/config';
// import { refs } from '$lib/data/stores/scripture';

export async function initProskomma() {
export async function initProskomma({ fetch }) {
let proskomma = get(pk);
if (!proskomma) {
proskomma = new Proskomma();
Expand All @@ -15,14 +15,14 @@ export async function initProskomma() {
if (!docSet) {
docSet = config.bookCollections[0].languageCode + '_' + config.bookCollections[0].id;
}
await loadDocSet(proskomma, docSet);
await loadDocSet(proskomma, docSet, fetch);
pk.set(proskomma);
}

return proskomma;
}

export async function loadDocSet(proskomma, docSet) {
export async function loadDocSet(proskomma, docSet, fetch) {
performance.mark('pk-fetch-start');
// console.log('fetch %o pkf', docSet);
const res = await fetch(`${base}/collections/${docSet}.pkf`).then((r) => {
Expand Down
4 changes: 2 additions & 2 deletions src/routes/+page.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { initProskomma } from '$lib/data/scripture';

/** @type {import('./$types').PageLoad} */
export function load({ url }) {
export function load({ url, fetch }) {
const ref = url.searchParams.get('ref');
const audio = url.searchParams.get('audio');
const proskomma = initProskomma();
const proskomma = initProskomma({ fetch });

return { ref, audio, proskomma };
}

0 comments on commit a4d728b

Please sign in to comment.