Skip to content

armgit / VERT

Public Imported from GitHub
0

The next-generation file converter. Open source, fully local* and free forever.

Start of an uploader component for tailwind

Realmyb7db1fddd405
diff --git a/bun.lockb b/bun.lockb
old mode 100644
new mode 100755
index 6677402..6b78127
Binary files a/bun.lockb and b/bun.lockb differ
diff --git a/src/app.css b/src/app.css
index a31e444..6751996 100644
--- a/src/app.css
+++ b/src/app.css
@@ -1,3 +1,8 @@
-@import 'tailwindcss/base';
-@import 'tailwindcss/components';
-@import 'tailwindcss/utilities';
+@import "tailwindcss/base";
+@import "tailwindcss/components";
+@import "tailwindcss/utilities";
+
+html,
+body {
+ height: 100%;
+}
diff --git a/src/lib/components/visual/Uploader.svelte b/src/lib/components/visual/Uploader.svelte
index 3d56ad2..559322d 100644
--- a/src/lib/components/visual/Uploader.svelte
+++ b/src/lib/components/visual/Uploader.svelte
@@ -1,4 +1,19 @@
<script lang="ts">
+ import { Upload } from "lucide-svelte";
+
+ interface Props {
+ files: FileList | undefined;
+ }
+
+ let { files = $bindable() }: Props = $props();
</script>
-<input type="file" />
+<div class="flex items-center justify-center h-full">
+ <div
+ class="flex items-center justify-center border-2 border-solid border-black w-full max-w-screen-lg h-80"
+ >
+ <Upload />
+ </div>
+</div>
+
+<input type="file" class="hidden" bind:files />
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index c8bb4bc..8c5fa8c 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -1,4 +1,5 @@
<script lang="ts">
+ import Uploader from "$lib/components/visual/Uploader.svelte";
import { converters } from "$lib/converters/index.svelte";
let files = $state<FileList>();
@@ -8,4 +9,4 @@
});
</script>
-<input type="file" bind:files />
+<Uploader bind:files />
diff --git a/tailwind.config.ts b/tailwind.config.ts
index aa4bc77..2ba1795 100644
--- a/tailwind.config.ts
+++ b/tailwind.config.ts
@@ -1,11 +1,11 @@
-import type { Config } from 'tailwindcss';
+import type { Config } from "tailwindcss";
export default {
- content: ['./src/**/*.{html,js,svelte,ts}'],
+ content: ["./src/**/*.{html,js,svelte,ts}"],
theme: {
- extend: {}
+ extend: {},
},
- plugins: []
+ plugins: [],
} satisfies Config;