diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..d85771f --- /dev/null +++ b/.env.example @@ -0,0 +1,2 @@ +PUB_HOSTNAME=vert.sh # only gets used for plausible (for now) +PUB_PLAUSIBLE_URL=https://plausible.example.com # can be empty \ No newline at end of file diff --git a/README.md b/README.md index b5b2950..6897a55 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,5 @@ -# sv +# VERT -Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli). +VERT is a file conversion utility that uses WebAssembly to convert files on your device instead of a cloud. Check out the live instance at [vert.sh](https://vert.sh). -## Creating a project - -If you're seeing this, you've probably already done this step. Congrats! - -```bash -# create a new project in the current directory -npx sv create - -# create a new project in my-app -npx sv create my-app -``` - -## Developing - -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: - -```bash -npm run dev - -# or start the server and open the app in a new browser tab -npm run dev -- --open -``` - -## Building - -To create a production version of your app: - -```bash -npm run build -``` - -You can preview the production build with `npm run preview`. - -> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment. +VERT is built in Svelte and TypeScript. diff --git a/src/lib/converters/index.ts b/src/lib/converters/index.ts index 1eef40e..d09bf00 100644 --- a/src/lib/converters/index.ts +++ b/src/lib/converters/index.ts @@ -1,4 +1,3 @@ -import { MagickConverter } from "./magick.svelte"; import { VipsConverter } from "./vips.svelte"; -export const converters = [new VipsConverter(), new MagickConverter()]; +export const converters = [new VipsConverter()]; diff --git a/src/lib/store/index.svelte.ts b/src/lib/store/index.svelte.ts index 7878b4f..134e96e 100644 --- a/src/lib/store/index.svelte.ts +++ b/src/lib/store/index.svelte.ts @@ -12,6 +12,7 @@ class Files { }[] >([]); public conversionTypes = $state([]); + public conversionTypesReverse = $derived(this.conversionTypes.reverse()); public beenToConverterPage = $state(false); public shouldShowAlert = $derived( !this.beenToConverterPage && this.files.length > 0, diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index f5488ad..32ffd0b 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -7,6 +7,7 @@ import Logo from "$lib/components/visual/svg/Logo.svelte"; import { fly } from "svelte/transition"; import featuredImage from "$lib/assets/VERT_Feature.webp"; + import { PUB_HOSTNAME, PUB_PLAUSIBLE_URL } from "$env/static/public"; let { children, data } = $props(); let navWidth = $state(1); @@ -40,6 +41,11 @@ + {#if PUB_PLAUSIBLE_URL}{/if}

As of right now, VERT only supports image conversion of most popular - formats. Don't worry though, as we'll add support for more formats in - the future! + formats. Don't worry though, as we'll add more options and support for + more formats in the future!

{ file.result = null; }} @@ -323,7 +325,9 @@ { file.result = null; }} diff --git a/svelte.config.js b/svelte.config.js index 62d7d91..2a86860 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -12,6 +12,10 @@ const config = { // If your environment is not supported, or you settled on a specific environment, switch out the adapter. // See https://svelte.dev/docs/kit/adapters for more information about adapters. adapter: adapter(), + env: { + publicPrefix: "PUB_", + privatePrefix: "PRI_", + }, }, };