diff --git a/public/png-svg.jpg b/public/png-svg.jpg new file mode 100644 index 0000000..ba99614 Binary files /dev/null and b/public/png-svg.jpg differ diff --git a/public/rounding-tool.jpg b/public/rounding-tool.jpg new file mode 100644 index 0000000..2ebc3b6 Binary files /dev/null and b/public/rounding-tool.jpg differ diff --git a/public/square-tool.jpg b/public/square-tool.jpg new file mode 100644 index 0000000..cbc850d Binary files /dev/null and b/public/square-tool.jpg differ diff --git a/src/app/(tools)/svg-to-png/svg-tool.tsx b/src/app/(tools)/svg-to-png/svg-tool.tsx index 137d778..7260f17 100644 --- a/src/app/(tools)/svg-to-png/svg-tool.tsx +++ b/src/app/(tools)/svg-to-png/svg-tool.tsx @@ -148,7 +148,9 @@ function SVGToolCore(props: { fileUploaderProps: FileUploaderResult }) { ); // Get the actual numeric scale value - const effectiveScale = scale === "custom" ? customScale : scale; + const effectiveScale = scale === "custom" + ? (customScale === 0 ? 1 : customScale) // Revert to 1 if custom scale is 0 + : scale; if (!imageMetadata) return ( diff --git a/src/app/page.tsx b/src/app/page.tsx index 5d093b4..a78b8ff 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,10 +1,35 @@ import Link from "next/link"; +import Image from "next/image"; + +const tools = [ + { + href: "/svg-to-png", + title: "SVG to PNG Converter", + description: "Convert and scale SVG files to high-quality PNG images", + image: "/png-svg.jpg", + placeholderColor: "bg-blue-500", + }, + { + href: "/square-image", + title: "Square Image Generator", + description: "Transform any image into a perfect square without distortion", + image: "/square-tool.jpg", + placeholderColor: "bg-purple-500", + }, + { + href: "/rounded-border", + title: "Corner Rounder", + description: "Add smooth rounded corners to your images with ease", + image: "/rounding-tool.jpg", + placeholderColor: "bg-green-500", + }, +]; export default function Home() { return (
-
+
Hi. I'm{" "} . I built these tools because I was annoyed they did not exist.
-
- - SVG to PNG converter - - - Square image generator - - - Corner Rounder - + +
+ {tools.map((tool) => ( + +
+ {tool.image ? ( + {tool.title} + ) : ( +
+ )} +
+

+ {tool.title} +

+

+ {tool.description} +

+ + ))} +
+