Skip to content

Commit 7eccde5

Browse files
davidmoore1chrisvire
authored andcommitted
Apply text font setup to footnote
1 parent e79b182 commit 7eccde5

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

Diff for: src/lib/components/StackView.svelte

+14-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
import config from '$lib/data/config';
1010
import { isNotBlank, splitString } from '$lib/scripts/stringUtils';
1111
import { handleHeaderLinkPressed } from '$lib/scripts/scripture-reference-utils';
12+
export let bodyFontSize;
13+
export let bodyLineHeight;
14+
export let font;
1215
let stack;
1316
let listening = false;
1417
$: PrimaryColor = $themeColors['PrimaryColor'];
@@ -87,6 +90,10 @@
8790
}
8891
}
8992
$: toggleListener($footnotes);
93+
94+
$: fontSize = bodyFontSize + 'px';
95+
96+
$: lineHeight = bodyLineHeight + '%';
9097
</script>
9198

9299
<!--
@@ -102,7 +109,13 @@
102109
class="footnote rounded h-40 drop-shadow-lg overflow-y-auto"
103110
on:click|stopPropagation={insideClick}
104111
>
105-
<div id="container" class="footnote">{@html item}</div>
112+
<div
113+
id="container"
114+
class="footnote"
115+
style:font-family={font}
116+
style:font-size={fontSize}
117+
style:line-height={lineHeight}
118+
>{@html item}</div>
106119
</div>
107120
{/each}
108121
</div>

Diff for: src/routes/+page.svelte

+7-1
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,12 @@
147147
proskomma: $page.data?.proskomma
148148
};
149149
150+
$: stackSettings = {
151+
bodyFontSize: $bodyFontSize,
152+
bodyLineHeight: $bodyLineHeight,
153+
font: $currentFont,
154+
}
155+
150156
$: extraIconsExist = showSearch || showCollectionNavbar; //Note: was trying document.getElementById('extraButtons').childElementCount; but that caused it to hang forever.
151157
let scrollingDiv;
152158
@@ -422,7 +428,7 @@
422428
</div>
423429
</div>
424430
<div class="flex justify-center">
425-
<StackView />
431+
<StackView {...stackSettings}/>
426432
</div>
427433
{#if $selectedVerses.length > 0 && !$audioPlayer.playing}
428434
<div class="text-selection">

0 commit comments

Comments
 (0)