feat: add new font options

This commit is contained in:
Xylight committed 2024-04-21 14:41:58 -07:00
1 parent 01372c790c
commit f161e75bcf
12 files changed
+43 -24

No files matched your search

@@ -150,7 +150,9 @@
{#if title && id}
<a
href="/post/{getInstance()}/{id}"
class="font-medium text-base w-full"
class="text-lg leading-6 w-full {$userSettings.font == 'satoshi/nunito'
? 'font-display font-semibold'
: 'font-medium'}"
class:text-slate-600={$userSettings.markReadPosts && read}
class:dark:text-zinc-400={$userSettings.markReadPosts && read}
style="grid-area: title;"
+18 -17
View File
@@ -25,6 +25,7 @@
import { DEFAULT_INSTANCE_URL, LINKED_INSTANCE_URL } from '$lib/instance.js'
import Expandable from '$lib/components/ui/Expandable.svelte'
import EndPlaceholder from '../EndPlaceholder.svelte'
import Application from '../../../../routes/admin/applications/Application.svelte'
</script>
<nav
@@ -32,7 +33,7 @@
gap-1 h-screen {$$props.class}"
style={$$props.style}
>
{#if $profile}
{#if $profile?.jwt}
<SidebarButton icon={UserCircle} href="/profile/user">
Profile
</SidebarButton>
@@ -48,6 +49,22 @@
{/if}
</SidebarButton>
<SidebarButton icon={Bookmark} href="/saved">Saved</SidebarButton>
{:else}
<SidebarButton href="/login" title="Log In" icon={ArrowLeftOnRectangle}>
<span slot="label">Log In</span>
</SidebarButton>
<SidebarButton href="/signup" title="Sign Up" icon={Identification}>
<span slot="label">Sign Up</span>
</SidebarButton>
{#if LINKED_INSTANCE_URL === undefined}
<SidebarButton
href="/accounts"
title="Change Instance"
icon={ServerStack}
>
<span slot="label">Change Instance</span>
</SidebarButton>
{/if}
{/if}
{#if $profileData.profiles.length >= 1}
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
@@ -92,21 +109,5 @@
</span>
<CommunityList items={$profile.user.follows.map((i) => i.community)} />
</Expandable>
{:else}
<SidebarButton href="/login" title="Log In" icon={ArrowLeftOnRectangle}>
<span slot="label">Log In</span>
</SidebarButton>
<SidebarButton href="/signup" title="Sign Up" icon={Identification}>
<span slot="label">Sign Up</span>
</SidebarButton>
{#if LINKED_INSTANCE_URL === undefined}
<SidebarButton
href="/accounts"
title="Change Instance"
icon={ServerStack}
>
<span slot="label">Change Instance</span>
</SidebarButton>
{/if}
{/if}
</nav>
+1 -1
View File
@@ -66,7 +66,7 @@ interface Settings {
debugInfo: boolean
expandImages: boolean
font: 'inter' | 'system' | 'browser'
font: 'inter' | 'satoshi/nunito' | 'system' | 'browser'
leftAlign: boolean
hidePhoton: boolean
+3 -1
View File
@@ -101,7 +101,9 @@
? 'font-inter'
: $userSettings.font == 'system'
? 'font-system'
: 'font-sans'}"
: $userSettings.font == 'satoshi/nunito'
? 'font-nunito'
: 'font-sans'}"
route={$page.route}
>
<Moderation />
@@ -208,7 +208,7 @@
<Icon src={ArrowLeft} mini size="16" slot="prefix" />
</Button>
</div>
<h1 class="font-bold text-lg">
<h1 class="font-bold text-lg font-display leading-5">
<Markdown source={post.post_view.post.name} inline />
</h1>
<PostMedia
+2 -2
View File
@@ -199,8 +199,8 @@
<span slot="title">Font</span>
<span slot="description">What font Photon should use.</span>
<MultiSelect
options={['inter', 'system', 'browser']}
optionNames={['Inter', 'System UI', 'Browser Font']}
options={['inter', 'satoshi/nunito', 'system', 'browser']}
optionNames={['Inter', 'Satoshi/Nunito', 'System UI', 'Browser Font']}
bind:selected={$userSettings.font}
/>
</Setting>
+12
View File
@@ -24,6 +24,18 @@
font-display: swap;
}
@font-face {
font-family: 'Satoshi';
src: url('/font/Satoshi.woff2') format('woff2');
font-display: swap;
}
@font-face {
font-family: 'Nunito';
src: url('/font/Nunito.woff2') format('woff2');
font-display: swap;
}
body {
@apply bg-slate-50 text-slate-900 dark:bg-zinc-950 dark:text-zinc-100 accent-slate-950 dark:accent-zinc-50;
}