From 3d8f598eb86987286b49eecbc4fb4d67abf16d93 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sat, 1 Mar 2025 02:33:06 -0600 Subject: [PATCH] Add dynamic templates index page with responsive design --- app/src/index.ts | 5 ++ templates/index.html | 125 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 130 insertions(+) create mode 100644 templates/index.html diff --git a/app/src/index.ts b/app/src/index.ts index 1d9946c3..cc5c773f 100644 --- a/app/src/index.ts +++ b/app/src/index.ts @@ -3,6 +3,10 @@ import { Hono } from 'hono' import { serveStatic } from '@hono/node-server/serve-static' import fs from 'node:fs' import path from 'node:path' +import { fileURLToPath } from 'url' + +const __filename = fileURLToPath(import.meta.url) +const __dirname = path.dirname(__filename) const app = new Hono() @@ -56,6 +60,7 @@ async function generateIndex() { .template-links { display: flex; gap: 0.5rem; + flex-wrap: wrap; } .template-links a { text-decoration: none; diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 00000000..f99c4e76 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,125 @@ + + + + + + Templates Directory + + + +

Available Templates

+
+
Loading templates...
+
+ + + + \ No newline at end of file