From 6b8ef77dcac74aa04fd646d43f11ebf839af6eac Mon Sep 17 00:00:00 2001 From: Keith Solomon Date: Wed, 16 Jul 2025 10:42:35 -0500 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8feature:=20Add=20prompt=20data=20to=20?= =?UTF-8?q?card=20layout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/PromptCard.astro | 33 +++++++++++++++++++++++++++----- src/components/PromptList.astro | 34 +++++++++++++++++++++++++++++---- 2 files changed, 58 insertions(+), 9 deletions(-) diff --git a/src/components/PromptCard.astro b/src/components/PromptCard.astro index b6ea91f..9d9c8a4 100644 --- a/src/components/PromptCard.astro +++ b/src/components/PromptCard.astro @@ -1,10 +1,33 @@ --- -// PromptCard.astro -const { title, description } = Astro.props; +const { + title, + type, + description, + tags = [], + createdAt, + updatedAt +} = Astro.props; --- -
-

{title}

+
+
+

{title}

+ + {type} + +
-

{description}

+

{description}

+ +
+ {tags.map(tag => ( + {tag} + ))} +
+ +
+ Created: {createdAt} • Updated: {updatedAt} +
diff --git a/src/components/PromptList.astro b/src/components/PromptList.astro index 7d3b062..3797452 100644 --- a/src/components/PromptList.astro +++ b/src/components/PromptList.astro @@ -1,10 +1,36 @@ --- -// PromptList.astro import PromptCard from './PromptCard.astro'; + +const prompts = [ + { + title: "Summarize Document", + type: "System", + description: "Summarizes a document or long input using GPT-4.", + tags: ["summary", "long-form", "NLP"], + createdAt: "2025-06-01", + updatedAt: "2025-07-10" + }, + { + title: "Translate Text", + type: "Task", + description: "Translate English text into French, Spanish, or Japanese.", + tags: ["translate", "language"], + createdAt: "2025-05-15", + updatedAt: "2025-06-22" + }, + { + title: "Generate Code", + type: "Task", + description: "Generate Python or JavaScript functions from descriptions.", + tags: ["code", "generation", "devtools"], + createdAt: "2025-06-05", + updatedAt: "2025-07-01" + } +]; ---
- - - + {prompts.map(prompt => ( + + ))}