✨feature: Layout functional
This commit is contained in:
@@ -1,12 +1,10 @@
|
|||||||
---
|
---
|
||||||
// PromptCard.astro
|
// PromptCard.astro
|
||||||
import "../styles/global.css";
|
|
||||||
|
|
||||||
const { title, description } = Astro.props;
|
const { title, description } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="border rounded p-4 bg-white shadow-sm">
|
<div class="border rounded p-4 shadow-sm">
|
||||||
<h3 class="text-lg font-semibold">{title}</h3>
|
<h3 class="text-lg font-semibold">{title}</h3>
|
||||||
|
|
||||||
<p class="text-sm text-gray-600 mt-1">{description}</p>
|
<p class="text-sm text-gray-300 mt-1">{description}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
---
|
---
|
||||||
// PromptList.astro
|
// PromptList.astro
|
||||||
import "../styles/global.css";
|
|
||||||
import PromptCard from './PromptCard.astro';
|
import PromptCard from './PromptCard.astro';
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
---
|
---
|
||||||
// SearchBar.astro
|
// SearchBar.astro
|
||||||
import "../styles/global.css";
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="border-b p-4 bg-white">
|
<div class="border-b p-4">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Search prompts..."
|
placeholder="Search prompts..."
|
||||||
|
|||||||
@@ -1,20 +1,19 @@
|
|||||||
---
|
---
|
||||||
// Sidebar.astro
|
// Sidebar.astro
|
||||||
import "../styles/global.css";
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<aside class="w-64 bg-white border-r h-full p-4">
|
<aside class="w-64 border-r h-full p-4 text-gray-100">
|
||||||
<h2 class="text-lg font-semibold mb-4">Prompt Types</h2>
|
<h2 class="text-lg font-semibold mb-4">Prompt Types</h2>
|
||||||
|
|
||||||
<ul class="space-y-2">
|
<ul class="space-y-2">
|
||||||
<li>
|
<li>
|
||||||
<button class="w-full text-left px-3 py-2 rounded hover:bg-gray-100">
|
<button class="w-full text-left text-gray-900 px-3 py-2 rounded bg-gray-300 hover:bg-gray-100">
|
||||||
System
|
System
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<button class="w-full text-left px-3 py-2 rounded hover:bg-gray-100">
|
<button class="w-full text-left text-gray-900 px-3 py-2 rounded bg-gray-300 hover:bg-gray-100">
|
||||||
Task
|
Task
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -10,16 +10,9 @@ const { children } = Astro.props;
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Prompt Catalog</title>
|
<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>
|
</head>
|
||||||
|
|
||||||
<body class="font-sans antialiased bg-gray-50">
|
<body class="font-sans antialiased bg-gray-500 text-gray-100">
|
||||||
{children}
|
<slot />
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
---
|
---
|
||||||
import "../styles/global.css";
|
|
||||||
import MainLayout from '../layouts/MainLayout.astro';
|
import MainLayout from '../layouts/MainLayout.astro';
|
||||||
import Sidebar from '../components/Sidebar.astro';
|
import Sidebar from '../components/Sidebar.astro';
|
||||||
import SearchBar from '../components/SearchBar.astro';
|
import SearchBar from '../components/SearchBar.astro';
|
||||||
@@ -7,7 +6,7 @@ import PromptList from '../components/PromptList.astro';
|
|||||||
---
|
---
|
||||||
|
|
||||||
<MainLayout>
|
<MainLayout>
|
||||||
<div class="flex h-screen bg-gray-50 text-gray-900">
|
<div class="flex h-screen bg-gray-800 text-gray-100">
|
||||||
<Sidebar />
|
<Sidebar />
|
||||||
|
|
||||||
<div class="flex-1 flex flex-col overflow-hidden">
|
<div class="flex-1 flex flex-col overflow-hidden">
|
||||||
|
|||||||
Reference in New Issue
Block a user