diff --git a/src/app.scss b/src/app.scss
index b24fc0b..ac50dc9 100644
--- a/src/app.scss
+++ b/src/app.scss
@@ -6,7 +6,8 @@
@import url("$lib/assets/style/host-grotesk.css");
:root {
- --font-body: "Host Grotesk", system-ui, -apple-system, BlinkMacSystemFont,
+ --font-body:
+ "Host Grotesk", system-ui, -apple-system, BlinkMacSystemFont,
"Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans",
"Helvetica Neue", sans-serif;
--font-display: "Radio Canada Big", var(--font-body);
@@ -39,6 +40,8 @@
--accent-purple-alt: hsl(264, 100%, 50%);
--accent-blue: hsl(220, 100%, 78%);
--accent-blue-alt: hsl(220, 100%, 50%);
+ --accent-green: hsl(140, 70%, 74%);
+ --accent-green-alt: hsl(140, 70%, 30%);
--accent: var(--accent-pink);
--accent-alt: var(--accent-pink-alt);
@@ -98,6 +101,16 @@
var(--accent-blue),
hsl(220, 100%, 91%) 100%
);
+ --bg-gradient-green: linear-gradient(
+ to bottom,
+ var(--accent-green),
+ hsla(140, 70%, 30%, 0) 25%
+ );
+ --bg-gradient-green-alt: linear-gradient(
+ to top,
+ var(--accent-green),
+ hsl(140, 70%, 91%) 100%
+ );
--bg-gradient-image: linear-gradient(
to bottom,
hsla(0, 0%, 95%, 0.5),
@@ -291,7 +304,7 @@ body {
input[type="text"]:focus {
@apply outline outline-accent outline-2;
}
-
+
hr {
@apply border-separator;
}
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index b8273a3..d300dc0 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -2,7 +2,8 @@
import Uploader from "$lib/components/functional/Uploader.svelte";
import { converters } from "$lib/converters";
import { vertdLoaded } from "$lib/store/index.svelte";
- import { AudioLines, Check, Film, Image } from "lucide-svelte";
+ import clsx from "clsx";
+ import { AudioLines, BookText, Check, Film, Image } from "lucide-svelte";
const { data } = $props();
@@ -30,7 +31,7 @@
Documents: {
ready: converters.find((c) => c.name === "pandoc")?.ready || false,
formats: getSupportedFormats("pandoc"),
- icon: Image,
+ icon: BookText,
},
Video: {
ready:
@@ -77,7 +78,14 @@
{@const Icon = s.icon}
-
+
{key}
diff --git a/src/routes/convert/+page.svelte b/src/routes/convert/+page.svelte
index d7f9dcb..4f830b9 100644
--- a/src/routes/convert/+page.svelte
+++ b/src/routes/convert/+page.svelte
@@ -17,6 +17,7 @@
import { VertFile } from "$lib/types";
import {
AudioLines,
+ BookText,
DownloadIcon,
FileMusicIcon,
FileQuestionIcon,
@@ -55,6 +56,10 @@
(file) => file.findConverter()?.name === "vertd",
);
+ const allDocuments = files.files.every(
+ (file) => file.findConverter()?.name === "pandoc",
+ );
+
if (files.files.length === 1 && files.files[0].blobUrl && !allVideos) {
showGradient.set(false);
} else {
@@ -67,7 +72,15 @@
) {
gradientColor.set("");
} else {
- gradientColor.set(allAudio ? "purple" : allVideos ? "red" : "blue");
+ gradientColor.set(
+ allAudio
+ ? "purple"
+ : allVideos
+ ? "red"
+ : allDocuments
+ ? "green"
+ : "blue",
+ );
}
});
@@ -88,6 +101,9 @@
{@const isImage = converters
.find((c) => c.name === "libvips")
?.supportedFormats.includes(file.from)}
+ {@const isDocument = converters
+ .find((c) => c.name === "pandoc")
+ ?.supportedFormats.includes(file.from)}
{#if !converters.length}
@@ -96,6 +112,8 @@
{:else if isVideo}
+ {:else if isDocument}
+
{:else}
{/if}
@@ -149,7 +167,7 @@
{/if}
- {:else if isVideo && !isAudio && !isImage && !$vertdLoaded}
+ {:else if isVideo && !isAudio && !isImage && !isDocument && !$vertdLoaded}
@@ -178,12 +196,16 @@
? '--bg-gradient-purple-alt'
: isVideo
? '--bg-gradient-red-alt'
- : '--bg-gradient-blue-alt'})"
+ : isDocument
+ ? '--bg-gradient-green-alt'
+ : '--bg-gradient-blue-alt'})"
>
{#if isAudio}
{:else if isVideo}
+ {:else if isDocument}
+
{:else}
{/if}
@@ -217,7 +239,9 @@
? 'bg-accent-purple'
: isVideo
? 'bg-accent-red'
- : 'bg-accent-blue'}"
+ : isDocument
+ ? 'bg-accent-green'
+ : 'bg-accent-blue'}"
disabled={!files.ready}
onclick={file.convert}
>
diff --git a/tailwind.config.ts b/tailwind.config.ts
index 9d29844..7bd736a 100644
--- a/tailwind.config.ts
+++ b/tailwind.config.ts
@@ -36,6 +36,8 @@ export default {
"accent-purple": "var(--accent-purple)",
"accent-blue": "var(--accent-blue)",
"accent-blue-alt": "var(--accent-blue-alt)",
+ "accent-green": "var(--accent-green)",
+ "accent-green-alt": "var(--accent-green-alt)",
},
boxShadow: {
panel: "var(--shadow-panel)",