fix: font not applying in portals

This commit is contained in:
Xylight committed 2024-07-27 19:42:23 -07:00
1 parent 7c74762c2a
commit 22c8f9d6f0
1 file changed
+19 -7
+19 -7
View File
@@ -65,6 +65,24 @@
themeVars.subscribe((vars) => {
document.body.setAttribute('style', vars)
})
userSettings.subscribe((settings) => {
document.body.classList.remove(
'font-display',
'font-inter',
'font-sans',
'font-system',
'font-nunito'
)
document.body.classList.add(
settings.font == 'inter'
? 'font-inter'
: $userSettings.font == 'system'
? 'font-system'
: $userSettings.font == 'satoshi/nunito'
? 'font-nunito'
: 'font-sans'
)
})
}
})
$: title = routes[($page.route.id as keyof typeof routes) ?? '']
@@ -100,13 +118,7 @@
</Button>
<Shell
dir={$locale == 'he' && $userSettings.useRtl ? 'rtl' : 'ltr'}
class="min-h-screen {$userSettings.font == 'inter'
? 'font-inter'
: $userSettings.font == 'system'
? 'font-system'
: $userSettings.font == 'satoshi/nunito'
? 'font-nunito'
: 'font-sans'}"
class="min-h-screen "
route={$page.route}
>
<Moderation />