diff --git a/.gitignore b/.gitignore index a5c3f945d..4a7b54ec6 100644 --- a/.gitignore +++ b/.gitignore @@ -302,7 +302,7 @@ $RECYCLE.BIN/ /functions /.graphqlconfig /schema.graphql -/graphql.schema.json +/graphql.schema.* /.svelte-kit /.pnpm-store .direnv \ No newline at end of file diff --git a/bun.lockb b/bun.lockb index 574ae5ddb..3d676e7e9 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 577ecee88..ca02d2482 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ "semver": "^7.6.3", "socket.io-client": "^4.7.5", "tslib": "^2.6.3", + "thumbhash": "^0.1.1", "wonka": "^6.3.4", "zod": "^3.23.8" }, diff --git a/src/gql/home/mods.graphql b/src/gql/home/mods.graphql index 9ef635bd6..58e2193c0 100644 --- a/src/gql/home/mods.graphql +++ b/src/gql/home/mods.graphql @@ -8,6 +8,7 @@ query GetMods($offset: Int!, $limit: Int!, $search: String, $order: Order, $orde mod_reference name logo + logo_thumbhash views downloads short_description diff --git a/src/lib/components/general/FicsitCard.svelte b/src/lib/components/general/FicsitCard.svelte index a5e6b2210..d6037924e 100644 --- a/src/lib/components/general/FicsitCard.svelte +++ b/src/lib/components/general/FicsitCard.svelte @@ -1,16 +1,33 @@
- goto(link)} tabindex="0"> + goto(link)} + tabindex="0" + class="relative block max-h-full min-h-full min-w-full max-w-full"> {#if fake} diff --git a/src/lib/components/mods/ModCard.svelte b/src/lib/components/mods/ModCard.svelte index 5d924e4f3..88a83e97a 100644 --- a/src/lib/components/mods/ModCard.svelte +++ b/src/lib/components/mods/ModCard.svelte @@ -10,7 +10,16 @@ export let mod: Pick< Mod, - 'id' | 'mod_reference' | 'name' | 'logo' | 'views' | 'downloads' | 'short_description' | 'compatibility' | 'tags' + | 'id' + | 'mod_reference' + | 'name' + | 'logo' + | 'views' + | 'downloads' + | 'short_description' + | 'compatibility' + | 'tags' + | 'logo_thumbhash' > & { latestVersions: { alpha?: Maybe>; @@ -27,6 +36,7 @@ name={mod.name} link={base + '/mod/' + mod.mod_reference} logo={mod.logo} + thumbhash={mod.logo_thumbhash} description={mod.short_description}>
visibility{prettyNumber(mod.views)}