From a28ac0b16a7ea5a9ab98cb338b1d9ffb506033ca Mon Sep 17 00:00:00 2001 From: Keith Solomon Date: Sun, 27 Jul 2025 11:07:16 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20Update=20templates=20to?= =?UTF-8?q?=20use=20MainLayout=20and=20set=20page=20title=20via=20paramete?= =?UTF-8?q?r?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/MainLayout.astro | 4 +- src/pages/add.astro | 475 +++++++++++++++++------------------ src/pages/edit.astro | 236 +++++++++-------- src/pages/index.astro | 6 +- 4 files changed, 355 insertions(+), 366 deletions(-) diff --git a/src/layouts/MainLayout.astro b/src/layouts/MainLayout.astro index d73d9b1..ddbf2ce 100644 --- a/src/layouts/MainLayout.astro +++ b/src/layouts/MainLayout.astro @@ -2,14 +2,14 @@ // MainLayout.astro import "../styles/global.css"; -const { children } = Astro.props; +const page = Astro.props.page; --- - Prompt Catalog + Prompt Catalog - {page} diff --git a/src/pages/add.astro b/src/pages/add.astro index b12c18f..85919a9 100644 --- a/src/pages/add.astro +++ b/src/pages/add.astro @@ -1,279 +1,274 @@ --- -import "../styles/global.css"; +import MainLayout from '../layouts/MainLayout.astro'; import Sidebar from "../components/SidebarAdd.astro"; const supabaseUrl = import.meta.env.PUBLIC_SUPABASE_URL; const supabaseKey = import.meta.env.PUBLIC_SUPABASE_ANON_KEY; --- - - - Prompt Catalog - Add New Prompt - + + - - +
+

Prompt Catalog - Add New Prompt

+

Add or import new AI prompts to the catalog

+
-
-

Prompt Catalog - Add New Prompt

-

Add or import new AI prompts to the catalog

-
+
+ -
- - -
-
- - - -
-
- - - -
- -
-
- - -
- -
- - -
-
- -
- - -
- -
- - -
- - - -
- -
-
-

Import Prompts

-

Upload a JSON file to import prompts.

- - - - -
- -
-

Export Prompts

-

Select prompts to export, or leave all unchecked to export everything.

- - -
- - -
-
-
+
+
+ + + +
+
+ + + +
+ +
+
+ + +
+ +
+ + +
+
+ +
+ + +
+ +
+ + +
+ + + +
+ +
+
+

Import Prompts

+

Upload a JSON file to import prompts.

+ + + + +
+ +
+

Export Prompts

+

Select prompts to export, or leave all unchecked to export everything.

+ + +
+ + +
+
+
-
+ +
-
- © {new Date().getFullYear()} Prompt Catalog -
+
+ © {new Date().getFullYear()} Prompt Catalog +
- - - + + const url = URL.createObjectURL(blob); + const link = document.createElement('a'); + link.href = url; + link.download = selectedIds.length > 0 ? 'selected-prompts.json' : 'all-prompts.json'; + link.click(); + URL.revokeObjectURL(url); + }); + +
diff --git a/src/pages/edit.astro b/src/pages/edit.astro index ba20cf6..af23999 100644 --- a/src/pages/edit.astro +++ b/src/pages/edit.astro @@ -1,160 +1,154 @@ --- -import "../styles/global.css"; +import MainLayout from '../layouts/MainLayout.astro'; import Sidebar from "../components/SidebarEdit.astro"; const supabaseUrl = import.meta.env.PUBLIC_SUPABASE_URL; const supabaseKey = import.meta.env.PUBLIC_SUPABASE_ANON_KEY; --- - - - Prompt Catalog - Edit Prompt - - - -
+ + >
-
-

Prompt Catalog - Add New Prompt

-

Add a new AI prompt to the catalog

-
+
+

Prompt Catalog - Edit Prompt

+

Edit an existing AI prompt in the catalog

+
-
- +
+ -
-
-
Loading...
-
-
-
+
+
+
Loading...
+
+
+
- + - - - + } + + diff --git a/src/pages/index.astro b/src/pages/index.astro index 31e2af4..4f7813c 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -16,10 +16,10 @@ const allTags = Array.from( ).sort(); --- - +
-

Prompt Catalog

-

Explore and filter AI prompts

+

Prompt Catalog

+

Save and explore AI prompts