From d9da0d9fd019e9f9252bc86595133eef04338891 Mon Sep 17 00:00:00 2001 From: Xyphyn Date: Sun, 30 Jul 2023 13:11:46 -0700 Subject: [PATCH] misc: improve bundle size --- package.json | 1 - src/lib/components/lemmy/post/Post.svelte | 16 +++++----------- src/lib/components/ui/Navbar.svelte | 6 +----- yarn.lock | 5 ----- 4 files changed, 6 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index d6585a63..bd847cc4 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,6 @@ "dependencies": { "@dicebear/core": "^6.0.4", "@dicebear/initials": "^6.0.4", - "@tailwindcss/container-queries": "^0.1.1", "lemmy-js-client": "^0.18.0-rc.2", "markdown-it": "^13.0.1" }, diff --git a/src/lib/components/lemmy/post/Post.svelte b/src/lib/components/lemmy/post/Post.svelte index 0f710d2d..b39ed726 100644 --- a/src/lib/components/lemmy/post/Post.svelte +++ b/src/lib/components/lemmy/post/Post.svelte @@ -7,10 +7,7 @@ import { userSettings } from '$lib/settings.js' import PostLink from '$lib/components/lemmy/post/PostLink.svelte' import PostMeta from '$lib/components/lemmy/post/PostMeta.svelte' - import Modal from '$lib/components/ui/modal/Modal.svelte' - import PostForm from '$lib/components/lemmy/post/PostForm.svelte' import { ToastType, toast } from '$lib/components/ui/toasts/toasts.js' - import Markdown from '$lib/components/markdown/Markdown.svelte' export let post: PostView @@ -105,17 +102,14 @@ /> {/if} {#if post.post.body && !post.post.nsfw} -
- 350 - ? `${post.post.body.slice(0, 350)}...` - : post.post.body} - /> -
+ {post.post.body.length > 350 + ? `${post.post.body.slice(0, 350)}...` + : post.post.body} +

{/if} {/if} {#if actions} diff --git a/src/lib/components/ui/Navbar.svelte b/src/lib/components/ui/Navbar.svelte index 7dcbc5a5..d2e6b615 100644 --- a/src/lib/components/ui/Navbar.svelte +++ b/src/lib/components/ui/Navbar.svelte @@ -1,5 +1,4 @@ diff --git a/yarn.lock b/yarn.lock index 7394a8c8..22371474 100644 --- a/yarn.lock +++ b/yarn.lock @@ -313,11 +313,6 @@ svelte-hmr "^0.15.2" vitefu "^0.2.4" -"@tailwindcss/container-queries@^0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@tailwindcss/container-queries/-/container-queries-0.1.1.tgz#9a759ce2cb8736a4c6a0cb93aeb740573a731974" - integrity sha512-p18dswChx6WnTSaJCSGx6lTmrGzNNvm2FtXmiO6AuA1V4U5REyoqwmT6kgAsIMdjo07QdAfYXHJ4hnMtfHzWgA== - "@tootallnate/once@2": version "2.0.0" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf"