diff --git a/package.json b/package.json index f17abe58..b0a2971a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "photon-lemmy", - "version": "1.18.2", + "version": "1.19.0", "private": true, "scripts": { "dev": "vite dev", diff --git a/src/lib/components/lemmy/post/Post.svelte b/src/lib/components/lemmy/post/Post.svelte index 80b8bcde..b52e48ff 100644 --- a/src/lib/components/lemmy/post/Post.svelte +++ b/src/lib/components/lemmy/post/Post.svelte @@ -31,6 +31,7 @@ : view == 'list' ? 'py-5' : 'py-5'}" + id={post.post.id} > @@ -83,9 +84,7 @@ @@ -126,8 +125,7 @@ src={bestImageURL(post.post, false, 1024)} loading="lazy" class="max-h-[inherit] max-w-full h-auto z-30 - opacity-0 transition-opacity duration-300 object-contain mx-auto" - class:opacity-100={loaded} + transition-opacity duration-300 object-contain mx-auto" width={512} height={300} class:blur-3xl={post.post.nsfw && $userSettings.nsfwBlur} @@ -168,7 +166,7 @@ dark:from-zinc-400 dark:via-zinc-400 bg-clip-text {view == 'list' ? `max-h-24` : 'max-h-48'}" > - + {/if} diff --git a/src/lib/components/lemmy/post/PostFeed.svelte b/src/lib/components/lemmy/post/PostFeed.svelte index fcb7dd15..1e868f46 100644 --- a/src/lib/components/lemmy/post/PostFeed.svelte +++ b/src/lib/components/lemmy/post/PostFeed.svelte @@ -11,11 +11,10 @@ export let community: boolean = false -
{#if posts.length == 0}
@@ -31,9 +30,9 @@
{:else} - {#each posts as post, index (post.post.id)} + {#each posts as post, index} {#if !($userSettings.hidePosts.deleted && post.post.deleted) && !($userSettings.hidePosts.removed && post.post.removed)} -
-
+ {/if} {/each} {/if} -
+ diff --git a/src/lib/components/lemmy/post/PostVote.svelte b/src/lib/components/lemmy/post/PostVote.svelte index f6e3c640..20493e85 100644 --- a/src/lib/components/lemmy/post/PostVote.svelte +++ b/src/lib/components/lemmy/post/PostVote.svelte @@ -39,63 +39,60 @@ - -
--> +
+ - - {#key score} - oldScore ? 4 : -4, duration: 200 }} - out:fly={{ y: score > oldScore ? -4 : 4, duration: 200 }} - style="grid-column: 1; grid-row: 1;" - > - - - {/key} - - + + + + {#key score} + oldScore ? 4 : -4, duration: 200 }} + out:fly={{ y: score > oldScore ? -4 : 4, duration: 200 }} + style="grid-column: 1; grid-row: 1;" + > + + + {/key} + + +
+ + diff --git a/src/lib/components/markdown/Markdown.svelte b/src/lib/components/markdown/Markdown.svelte index 39996dee..ade9cbbc 100644 --- a/src/lib/components/markdown/Markdown.svelte +++ b/src/lib/components/markdown/Markdown.svelte @@ -1,10 +1,12 @@
{ + if (browser) { + return env.PUBLIC_INSTANCE_URL || 'lemmy.ml' + } else { + return env.PUBLIC_INTERNAL_INSTANCE || env.PUBLIC_INSTANCE_URL || 'lemmy.ml' + } +} + +export const DEFAULT_INSTANCE_URL = getDefaultInstance() export let instance = writable(DEFAULT_INSTANCE_URL) diff --git a/src/lib/settings.ts b/src/lib/settings.ts index 4a05aefa..a59cde6b 100644 --- a/src/lib/settings.ts +++ b/src/lib/settings.ts @@ -113,7 +113,7 @@ export const defaultSettings: Settings = { debugInfo: false, expandImages: true, view: 'cozy', - font: 'system', + font: 'inter', leftAlign: false, hidePhoton: toBool(env.PUBLIC_REMOVE_CREDIT) ?? false, newWidth: true, diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 4dc9abcb..3a8bb99f 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -23,19 +23,17 @@ minimum: 0.4, trickleSpeed: 200, showSpinner: false, + easing: 'ease-out', + speed: 300, }) $: { - if ($navigating) { - if (typeof document != 'undefined') { + if (browser) { + if ($navigating) { nProgress.start() - document?.documentElement?.classList?.toggle('wait', true) } - } - if (!$navigating) { - if (typeof document != 'undefined') { - nProgress.done(true) - document?.documentElement?.classList?.toggle('wait', false) + if (!$navigating) { + nProgress.done() } } } diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index af7669db..ae5adc1e 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -37,71 +37,63 @@
-
-
-
-

- Frontpage - - - -

-
-
+
+

- -
- -
- -
+ Frontpage + + + +

+
+
+ +
+ +
+
-
- -
-
- searchParam($page.url, 'page', p.detail.toString())} - on:cursor={(c) => { - searchParam($page.url, 'cursor', c.detail) - }} - > - - - - {$site?.site_view.counts.users_active_day} - - Active users +
+ +
+ searchParam($page.url, 'page', p.detail.toString())} + on:cursor={(c) => { + searchParam($page.url, 'cursor', c.detail) + }} + > + + + + {$site?.site_view.counts.users_active_day} - -
+ Active users + +