Skip to content

Commit

Permalink
Apply text font setup to footnote
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmoore1 committed Mar 21, 2024
1 parent e79b182 commit e7c60cc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
15 changes: 14 additions & 1 deletion src/lib/components/StackView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
import config from '$lib/data/config';
import { isNotBlank, splitString } from '$lib/scripts/stringUtils';
import { handleHeaderLinkPressed } from '$lib/scripts/scripture-reference-utils';
export let bodyFontSize;
export let bodyLineHeight;
export let font;
let stack;
let listening = false;
$: PrimaryColor = $themeColors['PrimaryColor'];
Expand Down Expand Up @@ -87,6 +90,10 @@
}
}
$: toggleListener($footnotes);
$: fontSize = bodyFontSize + 'px';
$: lineHeight = bodyLineHeight + '%';
</script>

<!--
Expand All @@ -102,7 +109,13 @@
class="footnote rounded h-40 drop-shadow-lg overflow-y-auto"
on:click|stopPropagation={insideClick}
>
<div id="container" class="footnote">{@html item}</div>
<div
id="container"
class="footnote"
style:font-family={font}
style:font-size={fontSize}
style:line-height={lineHeight}
>{@html item}</div>
</div>
{/each}
</div>
8 changes: 7 additions & 1 deletion src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@
proskomma: $page.data?.proskomma
};
$: stackSettings = {
bodyFontSize: $bodyFontSize,
bodyLineHeight: $bodyLineHeight,
font: $currentFont,
}
$: extraIconsExist = showSearch || showCollectionNavbar; //Note: was trying document.getElementById('extraButtons').childElementCount; but that caused it to hang forever.
let scrollingDiv;
Expand Down Expand Up @@ -422,7 +428,7 @@
</div>
</div>
<div class="flex justify-center">
<StackView />
<StackView {...stackSettings}/>
</div>
{#if $selectedVerses.length > 0 && !$audioPlayer.playing}
<div class="text-selection">
Expand Down

0 comments on commit e7c60cc

Please sign in to comment.