diff --git a/src/lib/components/ui/SectionTitle.svelte b/src/lib/components/ui/SectionTitle.svelte
index be4d5de8..d890cd16 100644
--- a/src/lib/components/ui/SectionTitle.svelte
+++ b/src/lib/components/ui/SectionTitle.svelte
@@ -1,5 +1,6 @@
diff --git a/src/lib/settings.ts b/src/lib/settings.ts
index 1fc4ef64..a8ed82ed 100644
--- a/src/lib/settings.ts
+++ b/src/lib/settings.ts
@@ -5,6 +5,8 @@ import { env } from '$env/dynamic/public'
console.log('Using the following default settings from the environment:')
console.log(env)
+export type View = 'card' | 'cozy' | 'list' | 'compact'
+
export const SSR_ENABLED = env.PUBLIC_SSR_ENABLED?.toLowerCase() == 'true'
// Returns a proper boolean or null. Used to set boolean values from env var strings while allowing nullish coalescing to set default values.
@@ -29,7 +31,7 @@ interface Settings {
// deprecated
showCompactPosts: boolean
- view: 'card' | 'list' | 'compact'
+ view: View
defaultSort: {
sort: SortType
@@ -97,7 +99,7 @@ export const defaultSettings: Settings = {
modlogCardView: toBool(env.PUBLIC_MODLOG_CARD_VIEW) ?? undefined,
debugInfo: false,
expandImages: true,
- view: 'list',
+ view: 'cozy',
font: 'system',
leftAlign: false,
hidePhoton: toBool(env.PUBLIC_REMOVE_CREDIT) ?? false,
diff --git a/src/routes/settings/+page.svelte b/src/routes/settings/+page.svelte
index 300c6351..9834caa5 100644
--- a/src/routes/settings/+page.svelte
+++ b/src/routes/settings/+page.svelte
@@ -42,230 +42,254 @@
-
- UI
-
- Post style
-
-
- {#if $userSettings.view == 'list'}
- Show posts in a list, with post bodies and compact images.
- {:else if $userSettings.view == 'compact'}
- Show posts in a list, without post bodies and with tighter spacing.
- {:else if $userSettings.view == 'card'}
- Show posts in cards, with large images.
- {/if}
-
-
-
- Random placeholders
-
- Show a random placeholder for forms for comments, posts, etc.
-
-
- {$userSettings.randomPlaceholders ? 'Enabled' : 'Disabled'}
-
-
-
-
- Default sort
- The default sort to use for feeds.
-
-
-
-
-
-
-
-
-
-
-
-
-
- Use display name
-
- Show a user's display name instead of their account username.
-
-
-
- {$userSettings.displayNames ? 'Enabled' : 'Disabled'}
-
-
-
- Posts
-
- Fade read posts
- Fade the title of posts you've already read.
-
- {$userSettings.markReadPosts ? 'Enabled' : 'Disabled'}
-
-
-
- NSFW blur
-
- Blur images and remove post bodies of NSFW content.
-
-
- {$userSettings.nsfwBlur ? 'Enabled' : 'Disabled'}
-
-
-
- Expand Images
-
- Clicking on an image brings you to an expanded view rather than sending
- you to the post page.
-
-
- {$userSettings.expandImages ? 'Enabled' : 'Disabled'}
-
-
-
- Hide Posts
-
-
Hide certain types of posts.
-
- Looking to hide read posts? That was moved to your
- profile settings.
-
-
-
-
-
- Deleted
-
-
- Removed
-
-
-
-
- Thumbnail Alignment
-
- Where thumbnails should be on the post in list/compact view.
-
-
-
- {#if LINKED_INSTANCE_URL}
+
+
+
+ UI
-
- Remove original project's credit because you don't like the creator as a
- person
-
+ Post style
+
+
+ {#if $userSettings.view == 'list'}
+ Show posts in a list, with post bodies and compact images.
+ {:else if $userSettings.view == 'cozy'}
+ Card view, but without a background.
+ {:else if $userSettings.view == 'compact'}
+ Show posts in a list, without post bodies and with tighter spacing.
+ {:else if $userSettings.view == 'card'}
+ Show posts in cards, with large images.
+ {/if}
+
+
+
+ Random placeholders
- Disable the "Powered by Photon" in the top left corner, thus decreasing
- visibility of the original project and limiting discovery. The creator
- of Photon intentionally made it unobtrusive, but if you want to remove
- it because a 120x16 div bothers you so much, you have that option.
+ Show a random placeholder for forms for comments, posts, etc.
-
- {$userSettings.hidePhoton ? 'Enabled' : 'Disabled'}
+
+ {$userSettings.randomPlaceholders ? 'Enabled' : 'Disabled'}
- {/if}
- Instances
-
- Show instances
- Show items' instances.
-
- Xylight
- @example.com
-
-
- Users
-
- Comments
+
+ Default sort
+ The default sort to use for feeds.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Use display name
+
+ Show a user's display name instead of their account username.
+
+
+
+ {$userSettings.displayNames ? 'Enabled' : 'Disabled'}
-
- Communities
+
+
+ Posts
+
+ Fade read posts
+
+ Fade the title of posts you've already read.
+
+
+ {$userSettings.markReadPosts ? 'Enabled' : 'Disabled'}
-
-
+
+
+ NSFW blur
+
+ Blur images and remove post bodies of NSFW content.
+
+
+ {$userSettings.nsfwBlur ? 'Enabled' : 'Disabled'}
+
+
+
+ Expand Images
+
+ Clicking on an image brings you to an expanded view rather than sending
+ you to the post page.
+
+
+ {$userSettings.expandImages ? 'Enabled' : 'Disabled'}
+
+
+
+ Hide Posts
+
+
Hide certain types of posts.
+
+ Looking to hide read posts? That was moved to your
+ profile settings.
+
+
+
+
+
+ Deleted
+
+
+ Removed
+
+
+
+
+ Thumbnail Alignment
+
+ Where thumbnails should be on the post in list/compact view.
+
+
+
+ {#if LINKED_INSTANCE_URL}
+
+
+ Remove original project's credit because you don't like the creator as
+ a person
+
+
+ Disable the "Powered by Photon" in the top left corner, thus
+ decreasing visibility of the original project and limiting discovery.
+ The creator of Photon intentionally made it unobtrusive, but if you
+ want to remove it because a 120x16 div bothers you so much, you have
+ that option.
+
+
+ {$userSettings.hidePhoton ? 'Enabled' : 'Disabled'}
+
+
+ {/if}
- Moderation
-
- Removal reply preset
-
-
The preset to use for "Reply reason" in a submission removal.
-
-
Syntax:
-
- {'{{reason}}'}
- : The provided reason
-
-
- {'{{post}}'}
- : The title of the post
-
-
- {'{{community}}'}
- : The community the submission was removed in.
-
-
- {'{{username}}'}
- : The username of the creator of the submission.
-
+
- Other
-
- Font
- What font Photon should use.
-
-
-
- Debug Info
-
- Show an option to show debug information. (in posts and such)
-
+ Moderation
+
+ Removal reply preset
+
+
The preset to use for "Reply reason" in a submission removal.
+
+
Syntax:
+
+ {'{{reason}}'}
+ : The provided reason
+
+
+ {'{{post}}'}
+ : The title of the post
+
+
+ {'{{community}}'}
+ : The community the submission was removed in.
+
+
+ {'{{username}}'}
+ : The username of the creator of the submission.
+
+
+
+
+ removalTemplate(input, {
+ postTitle: '',
+ communityLink: '[!community@example.com]()',
+ reason: '',
+ username: '@Bob',
+ })}
+ />
+
-
- {$userSettings.debugInfo ? 'Enabled' : 'Disabled'}
-
-
+ Other
+
+ Font
+ What font Photon should use.
+
+
+
+ Debug Info
+
+ Show an option to show debug information. (in posts and such)
+
+
+
+ {$userSettings.debugInfo ? 'Enabled' : 'Disabled'}
+
+
+