✨feature: Scaffold project
This commit is contained in:
12
src/components/PromptCard.astro
Normal file
12
src/components/PromptCard.astro
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
// PromptCard.astro
|
||||
import "../styles/global.css";
|
||||
|
||||
const { title, description } = Astro.props;
|
||||
---
|
||||
|
||||
<div class="border rounded p-4 bg-white shadow-sm">
|
||||
<h3 class="text-lg font-semibold">{title}</h3>
|
||||
|
||||
<p class="text-sm text-gray-600 mt-1">{description}</p>
|
||||
</div>
|
||||
0
src/components/PromptDetail.astro
Normal file
0
src/components/PromptDetail.astro
Normal file
11
src/components/PromptList.astro
Normal file
11
src/components/PromptList.astro
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
// PromptList.astro
|
||||
import "../styles/global.css";
|
||||
import PromptCard from './PromptCard.astro';
|
||||
---
|
||||
|
||||
<div class="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3">
|
||||
<PromptCard title="Summarize Document" description="Summarizes long text using GPT-4." />
|
||||
<PromptCard title="Translate Text" description="Translates input to French." />
|
||||
<PromptCard title="Generate Code" description="Generates code based on user input." />
|
||||
</div>
|
||||
12
src/components/SearchBar.astro
Normal file
12
src/components/SearchBar.astro
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
// SearchBar.astro
|
||||
import "../styles/global.css";
|
||||
---
|
||||
|
||||
<div class="border-b p-4 bg-white">
|
||||
<input
|
||||
type="text"
|
||||
placeholder="Search prompts..."
|
||||
class="w-full p-2 border rounded focus:outline-none focus:ring"
|
||||
/>
|
||||
</div>
|
||||
22
src/components/Sidebar.astro
Normal file
22
src/components/Sidebar.astro
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
// Sidebar.astro
|
||||
import "../styles/global.css";
|
||||
---
|
||||
|
||||
<aside class="w-64 bg-white border-r h-full p-4">
|
||||
<h2 class="text-lg font-semibold mb-4">Prompt Types</h2>
|
||||
|
||||
<ul class="space-y-2">
|
||||
<li>
|
||||
<button class="w-full text-left px-3 py-2 rounded hover:bg-gray-100">
|
||||
System
|
||||
</button>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<button class="w-full text-left px-3 py-2 rounded hover:bg-gray-100">
|
||||
Task
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
25
src/layouts/MainLayout.astro
Normal file
25
src/layouts/MainLayout.astro
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
// MainLayout.astro
|
||||
import "../styles/global.css";
|
||||
|
||||
const { children } = Astro.props;
|
||||
---
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Prompt Catalog</title>
|
||||
<!-- <link href="/css/tailwind.css" rel="stylesheet" /> -->
|
||||
|
||||
<script type="module">
|
||||
import Alpine from 'alpinejs'
|
||||
window.Alpine = Alpine
|
||||
Alpine.start()
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class="font-sans antialiased bg-gray-50">
|
||||
{children}
|
||||
</body>
|
||||
</html>
|
||||
5
src/lib/supabase.js
Normal file
5
src/lib/supabase.js
Normal file
@@ -0,0 +1,5 @@
|
||||
import { createClient } from '@supabase/supabase-js'
|
||||
|
||||
const supabaseUrl = import.meta.env.PUBLIC_SUPABASE_URL
|
||||
const supabaseKey = import.meta.env.PUBLIC_SUPABASE_ANON_KEY
|
||||
export const supabase = createClient(supabaseUrl, supabaseKey)
|
||||
21
src/pages/index.astro
Normal file
21
src/pages/index.astro
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
import "../styles/global.css";
|
||||
import MainLayout from '../layouts/MainLayout.astro';
|
||||
import Sidebar from '../components/Sidebar.astro';
|
||||
import SearchBar from '../components/SearchBar.astro';
|
||||
import PromptList from '../components/PromptList.astro';
|
||||
---
|
||||
|
||||
<MainLayout>
|
||||
<div class="flex h-screen bg-gray-50 text-gray-900">
|
||||
<Sidebar />
|
||||
|
||||
<div class="flex-1 flex flex-col overflow-hidden">
|
||||
<SearchBar />
|
||||
|
||||
<main class="flex-1 overflow-y-auto p-4">
|
||||
<PromptList />
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</MainLayout>
|
||||
2
src/styles/global.css
Normal file
2
src/styles/global.css
Normal file
@@ -0,0 +1,2 @@
|
||||
@import "tailwindcss";
|
||||
|
||||
Reference in New Issue
Block a user