Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Tools

<https://tools.rman.dev>
[tools.rman.dev](https://tools.rman.dev)
4 changes: 2 additions & 2 deletions astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import tailwindcss from "@tailwindcss/vite";
import { defineConfig } from "astro/config";

export default defineConfig({
output: "static",
build: { format: "preserve" },
integrations: [solid()],
vite: { plugins: [tailwindcss()] },
vite: { plugins: [tailwindcss()], build: { cssTarget: "safari15" } },
site: "https://tools.rman.dev",
});
64 changes: 33 additions & 31 deletions bun.lock

Large diffs are not rendered by default.

12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,34 @@
"imports": {
"#layout": "./src/layouts/Layout.astro",
"#styles": "./src/styles/global.css",
"#components/*": "./src/components/*.tsx",
"#components/*": "./src/components/*.astro",
"#ui/*": "./src/components/ui/*.tsx",
"#tools/*": "./src/tools/*.tsx"
},
"scripts": {
"build": "astro build",
"deploy": "wrangler deploy",
"dev": "astro dev",
"format": "biome check --write --linter-enabled=false",
"lint": "biome check"
"format": "biome check --write",
"lint": "biome check",
"preview": "astro preview"
},
"overrides": {
"@babel/core": "7.29.7",
"@babel/generator": "7.29.8",
"@babel/helper-module-imports": "7.29.7",
"@babel/parser": "7.29.8",
"@babel/types": "7.29.8",
"@emnapi/runtime": "1.11.3",
"@jridgewell/trace-mapping": "0.3.31",
"esbuild": "0.28.2",
"js-yaml": "npm:neoyaml@0.2.0",
"semver": "7.8.5",
"sharp": "0.35.4",
"unstorage": "2.0.0-alpha.9"
},
"dependencies": {
"astro": "7.2.8",
"astro": "7.2.9",
"solid-js": "1.9.15",
"tailwindcss": "4.3.3"
},
Expand Down
6 changes: 6 additions & 0 deletions public/_headers
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/*
Cache-Control: public, max-age=86400, stale-while-revalidate=86400

/_astro/*
! Cache-Control
Cache-Control: public, max-age=31536000, immutable
1 change: 1 addition & 0 deletions public/_redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/github https://github.com/rmandotdev/tools 301
18 changes: 18 additions & 0 deletions src/components/LinkCard.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
interface Props {
title: string;
href: string;
}

const { title, href } = Astro.props;
---

<a
class="block w-full rounded-xl border-2 border-neutral-400 dark:border-neutral-600 bg-white dark:bg-neutral-900 px-5 py-3 hover:border-neutral-600 dark:hover:border-neutral-400 transition-colors"
{href}
><div
class="font-medium text-lg sm:text-xl text-neutral-900 dark:text-neutral-100"
>
{title}
</div></a
>
9 changes: 9 additions & 0 deletions src/components/LinkCardGroup.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
interface Props {
children: unknown;
}
---

<div class="flex flex-col gap-4 w-full max-w-md mx-auto">
<slot />
</div>
13 changes: 5 additions & 8 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,31 @@ const canonical = Astro.site
? new URL(Astro.url.pathname, Astro.site)
: undefined;

const { title, description } = Astro.props satisfies Props;
const { title, description } = Astro.props;
---

<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>{title}</title>
<meta name="description" content={description} />

<!-- Open Graph -->
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
<meta property="og:url" content={canonical} />

<!-- Twitter -->
<meta name="twitter:title" content={title} />
<meta name="twitter:description" content={description} />

<link rel="canonical" href={canonical} />
</head>

<body>
<slot />
<main>
<slot />
</main>
</body>
</html>
15 changes: 14 additions & 1 deletion src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
---
import LinkCard from "#components/LinkCard";
import LinkCardGroup from "#components/LinkCardGroup";
import Layout from "#layout";

const title = "Tools";
const description = title;
---

<Layout {title} {description}> <h1>Tools</h1> </Layout>
<Layout {title} {description}>
<div
class="h-screen text-neutral-800 dark:text-neutral-300 bg-neutral-200 dark:bg-black p-20"
>
<LinkCardGroup>
<LinkCard title="Base 64 Text Encoder and Decoder" href="/base64" />
<LinkCard title="Clipbaord Image Previewer and Downloader" href="/img" />

<LinkCard title="Source code" href="/github" />
</LinkCardGroup>
</div>
</Layout>
4 changes: 2 additions & 2 deletions src/tools/base64.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createSignal } from "solid-js";

import Button from "#components/ui/Button";
import Textarea from "#components/ui/Textarea";
import Button from "#ui/Button";
import Textarea from "#ui/Textarea";

export default function () {
const [text, setText] = createSignal("");
Expand Down
5 changes: 3 additions & 2 deletions src/tools/img.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { createSignal, onCleanup, Show } from "solid-js";
import Button from "#components/ui/Button";
import Switcher from "#components/ui/Switcher";

import Button from "#ui/Button";
import Switcher from "#ui/Switcher";

export default function ImagePasteHandler() {
type Mode = "preview" | "download";
Expand Down