promptcraft-ui / index.html
cob05's picture
Add 2 files
aca1c27 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PromptCraft - AI Prompt Library</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.gradient-bg {
background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
}
.prompt-card:hover {
transform: translateY(-5px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.tag-cloud {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.tag-item {
transition: all 0.3s ease;
}
.tag-item:hover {
transform: scale(1.05);
}
.sidebar {
transition: all 0.3s ease;
height: 100vh;
position: fixed;
overflow-y: auto;
}
@media (max-width: 768px) {
.sidebar {
transform: translateX(-100%);
z-index: 50;
top: 0;
left: 0;
}
.sidebar.active {
transform: translateX(0);
}
}
.markdown-preview {
border-left: 3px solid #a777e3;
padding-left: 1rem;
}
.main-content {
min-height: 100vh;
margin-left: 16rem; /* 64 * 0.25rem = 16rem */
}
</style>
</head>
<body class="bg-gray-50 font-sans">
<!-- Mobile Menu Button -->
<div class="md:hidden fixed top-4 left-4 z-50">
<button id="menuToggle" class="p-2 rounded-md bg-white shadow-md text-purple-600">
<i class="fas fa-bars"></i>
</button>
</div>
<!-- Sidebar -->
<div id="sidebar" class="sidebar w-64 bg-white shadow-md p-4">
<div class="flex items-center mb-8">
<div class="w-10 h-10 rounded-full gradient-bg flex items-center justify-center text-white font-bold mr-3">PC</div>
<h1 class="text-xl font-bold text-gray-800">PromptCraft</h1>
</div>
<div class="mb-6">
<button class="w-full flex items-center justify-between px-4 py-2 bg-purple-600 text-white rounded-lg hover:bg-purple-700 transition">
<span>New Prompt</span>
<i class="fas fa-plus"></i>
</button>
</div>
<div class="mb-6">
<h3 class="text-sm font-semibold text-gray-500 uppercase tracking-wider mb-2">Collections</h3>
<ul>
<li class="mb-1">
<a href="#" class="flex items-center px-3 py-2 text-purple-600 bg-purple-50 rounded-lg">
<i class="fas fa-inbox mr-2"></i>
<span>All Prompts</span>
<span class="ml-auto bg-purple-600 text-white text-xs px-2 py-1 rounded-full">128</span>
</a>
</li>
<li class="mb-1">
<a href="#" class="flex items-center px-3 py-2 text-gray-700 hover:bg-gray-100 rounded-lg">
<i class="fas fa-star mr-2"></i>
<span>Favorites</span>
<span class="ml-auto bg-gray-200 text-gray-700 text-xs px-2 py-1 rounded-full">24</span>
</a>
</li>
<li class="mb-1">
<a href="#" class="flex items-center px-3 py-2 text-gray-700 hover:bg-gray-100 rounded-lg">
<i class="fas fa-lightbulb mr-2"></i>
<span>Creative Writing</span>
</a>
</li>
<li class="mb-1">
<a href="#" class="flex items-center px-3 py-2 text-gray-700 hover:bg-gray-100 rounded-lg">
<i class="fas fa-code mr-2"></i>
<span>Programming</span>
</a>
</li>
<li class="mb-1">
<a href="#" class="flex items-center px-3 py-2 text-gray-700 hover:bg-gray-100 rounded-lg">
<i class="fas fa-chart-line mr-2"></i>
<span>Business</span>
</a>
</li>
</ul>
</div>
<div class="mb-6">
<h3 class="text-sm font-semibold text-gray-500 uppercase tracking-wider mb-2">Tags</h3>
<div class="tag-cloud">
<span class="tag-item px-2 py-1 bg-blue-100 text-blue-800 text-xs rounded-full">#writing</span>
<span class="tag-item px-2 py-1 bg-green-100 text-green-800 text-xs rounded-full">#marketing</span>
<span class="tag-item px-2 py-1 bg-yellow-100 text-yellow-800 text-xs rounded-full">#code</span>
<span class="tag-item px-2 py-1 bg-red-100 text-red-800 text-xs rounded-full">#storytelling</span>
<span class="tag-item px-2 py-1 bg-indigo-100 text-indigo-800 text-xs rounded-full">#productivity</span>
</div>
</div>
<div class="mb-6">
<h3 class="text-sm font-semibold text-gray-500 uppercase tracking-wider mb-2">AI Assistants</h3>
<ul>
<li class="mb-1">
<a href="#" class="flex items-center px-3 py-2 text-gray-700 hover:bg-gray-100 rounded-lg">
<i class="fas fa-robot mr-2 text-purple-500"></i>
<span>Prompt Optimizer</span>
</a>
</li>
<li class="mb-1">
<a href="#" class="flex items-center px-3 py-2 text-gray-700 hover:bg-gray-100 rounded-lg">
<i class="fas fa-tags mr-2 text-blue-500"></i>
<span>Auto-Tagger</span>
</a>
</li>
<li class="mb-1">
<a href="#" class="flex items-center px-3 py-2 text-gray-700 hover:bg-gray-100 rounded-lg">
<i class="fas fa-list-ol mr-2 text-green-500"></i>
<span>Prompt Categorizer</span>
</a>
</li>
</ul>
</div>
<div class="mt-auto pt-4 border-t border-gray-200">
<div class="flex items-center">
<div class="w-8 h-8 rounded-full bg-gray-300 mr-2"></div>
<div>
<p class="text-sm font-medium text-gray-700">John Doe</p>
<p class="text-xs text-gray-500">Free Plan</p>
</div>
</div>
</div>
</div>
<!-- Main Content -->
<div class="main-content p-6">
<!-- Header -->
<header class="mb-6">
<div class="flex justify-between items-center">
<h2 class="text-2xl font-bold text-gray-800">Prompt Library</h2>
<div class="relative w-64">
<input type="text" placeholder="Search prompts..." class="w-full pl-10 pr-4 py-2 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent">
<i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
</div>
</div>
<div class="flex items-center mt-4 space-x-2">
<span class="text-sm text-gray-500">Sort by:</span>
<select class="text-sm border border-gray-300 rounded px-2 py-1 focus:outline-none focus:ring-1 focus:ring-purple-500">
<option>Most Recent</option>
<option>Most Popular</option>
<option>A-Z</option>
<option>Z-A</option>
</select>
<button class="text-sm flex items-center text-purple-600 hover:text-purple-800">
<i class="fas fa-sliders-h mr-1"></i>
<span>Filters</span>
</button>
</div>
</header>
<!-- Prompt Cards Grid -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<!-- Prompt Card 1 -->
<div class="prompt-card bg-white rounded-xl shadow-md overflow-hidden transition duration-300">
<div class="p-5">
<div class="flex justify-between items-start mb-3">
<h3 class="font-bold text-lg text-gray-800">Creative Story Generator</h3>
<button class="text-gray-400 hover:text-yellow-500">
<i class="far fa-star"></i>
</button>
</div>
<p class="text-gray-600 text-sm mb-4">Generate unique story ideas with characters, settings, and plot twists based your input parameters.</p>
<div class="flex flex-wrap gap-2 mb-4">
<span class="px-2 py-1 bg-blue-100 text-blue-800 text-xs rounded-full">#writing</span>
<span class="px-2 py-1 bg-purple-100 text-purple-800 text-xs rounded-full">#fiction</span>
<span class="px-2 py-1 bg-green-100 text-green-800 text-xs rounded-full">#creative</span>
</div>
<div class="flex justify-between items-center text-xs text-gray-500">
<span>Last used: 2 days ago</span>
<div class="flex space-x-2">
<button class="text-purple-600 hover:text-purple-800">
<i class="far fa-copy"></i>
</button>
<button class="text-purple-600 hover:text-purple-800">
<i class="fas fa-edit"></i>
</button>
</div>
</div>
</div>
</div>
<!-- Prompt Card 2 -->
<div class="prompt-card bg-white rounded-xl shadow-md overflow-hidden transition duration-300">
<div class="p-5">
<div class="flex justify-between items-start mb-3">
<h3 class="font-bold text-lg text-gray-800">Python Code Explainer</h3>
<button class="text-yellow-500">
<i class="fas fa-star"></i>
</button>
</div>
<p class="text-gray-600 text-sm mb-4">Explain Python code snippets in plain English, including functionality, potential edge cases, and optimization suggestions.</p>
<div class="flex flex-wrap gap-2 mb-4">
<span class="px-2 py-1 bg-yellow-100 text-yellow-800 text-xs rounded-full">#coding</span>
<span class="px-2 py-1 bg-blue-100 text-blue-800 text-xs rounded-full">#python</span>
<span class="px-2 py-1 bg-gray-100 text-gray-800 text-xs rounded-full">#technical</span>
</div>
<div class="flex justify-between items-center text-xs text-gray-500">
<span>Last used: Today</span>
<div class="flex space-x-2">
<button class="text-purple-600 hover:text-purple-800">
<i class="far fa-copy"></i>
</button>
<button class="text-purple-600 hover:text-purple-800">
<i class="fas fa-edit"></i>
</button>
</div>
</div>
</div>
</div>
<!-- Prompt Card 3 -->
<div class="prompt-card bg-white rounded-xl shadow-md overflow-hidden transition duration-300">
<div class="p-5">
<div class="flex justify-between items-start mb-3">
<h3 class="font-bold text-lg text-gray-800">Marketing Email Generator</h3>
<button class="text-gray-400 hover:text-yellow-500">
<i class="far fa-star"></i>
</button>
</div>
<p class="text-gray-600 text-sm mb-4">Create compelling marketing emails tailored to your target audience, product, and campaign goals.</p>
<div class="flex flex-wrap gap-2 mb-4">
<span class="px-2 py-1 bg-green-100 text-green-800 text-xs rounded-full">#marketing</span>
<span class="px-2 py-1 bg-red-100 text-red-800 text-xs rounded-full">#copywriting</span>
<span class="px-2 py-1 bg-indigo-100 text-indigo-800 text-xs rounded-full">#business</span>
</div>
<div class="flex justify-between items-center text-xs text-gray-500">
<span>Last used: 1 week ago</span>
<div class="flex space-x-2">
<button class="text-purple-600 hover:text-purple-800">
<i class="far fa-copy"></i>
</button>
<button class="text-purple-600 hover:text-purple-800">
<i class="fas fa-edit"></i>
</button>
</div>
</div>
</div>
</div>
<!-- Prompt Card 4 -->
<div class="prompt-card bg-white rounded-xl shadow-md overflow-hidden transition duration-300">
<div class="p-5">
<div class="flex justify-between items-start mb-3">
<h3 class="font-bold text-lg text-gray-800">Product Naming Assistant</h3>
<button class="text-gray-400 hover:text-yellow-500">
<i class="far fa-star"></i>
</button>
</div>
<p class="text-gray-600 text-sm mb-4">Generate creative and brand-aligned name ideas for your new product or service with explanations.</p>
<div class="flex flex-wrap gap-2 mb-4">
<span class="px-2 py-1 bg-indigo-100 text-indigo-800 text-xs rounded-full">#branding</span>
<span class="px-2 py-1 bg-purple-100 text-purple-800 text-xs rounded-full">#creative</span>
<span class="px-2 py-1 bg-pink-100 text-pink-800 text-xs rounded-full">#naming</span>
</div>
<div class="flex justify-between items-center text-xs text-gray-500">
<span>Last used: 3 days ago</span>
<div class="flex space-x-2">
<button class="text-purple-600 hover:text-purple-800">
<i class="far fa-copy"></i>
</button>
<button class="text-purple-600 hover:text-purple-800">
<i class="fas fa-edit"></i>
</button>
</div>
</div>
</div>
</div>
<!-- Prompt Card 5 -->
<div class="prompt-card bg-white rounded-xl shadow-md overflow-hidden transition duration-300">
<div class="p-5">
<div class="flex justify-between items-start mb-3">
<h3 class="font-bold text-lg text-gray-800">Interview Question Generator</h3>
<button class="text-yellow-500">
<i class="fas fa-star"></i>
</button>
</div>
<p class="text-gray-600 text-sm mb-4">Create tailored interview questions for specific job roles, industries, and experience levels.</p>
<div class="flex flex-wrap gap-2 mb-4">
<span class="px-2 py-1 bg-gray-100 text-gray-800 text-xs rounded-full">#hr</span>
<span class="px-2 py-1 bg-blue-100 text-blue-800 text-xs rounded-full">#recruiting</span>
<span class="px-2 py-1 bg-teal-100 text-teal-800 text-xs rounded-full">#questions</span>
</div>
<div class="flex justify-between items-center text-xs text-gray-500">
<span>Last used: Yesterday</span>
<div class="flex space-x-2">
<button class="text-purple-600 hover:text-purple-800">
<i class="far fa-copy"></i>
</button>
<button class="text-purple-600 hover:text-purple-800">
<i class="fas fa-edit"></i>
</button>
</div>
</div>
</div>
</div>
<!-- Add New Prompt Card -->
<div class="prompt-card bg-white rounded-xl shadow-md overflow-hidden transition duration-300 border-2 border-dashed border-gray-300 hover:border-purple-500 flex items-center justify-center">
<button class="w-full h-full flex flex-col items-center justify-center p-6 text-purple-600 hover:text-purple-800">
<i class="fas fa-plus-circle text-3xl mb-2"></i>
<span class="font-medium">Add New Prompt</span>
</button>
</div>
</div>
<!-- Prompt Editor Modal (Hidden by default) -->
<div id="editorModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
<div class="bg-white rounded-xl shadow-xl w-full max-w-4xl max-h-[90vh] overflow-hidden">
<div class="flex justify-between items-center border-b border-gray-200 px-6 py-4">
<h3 class="text-lg font-semibold text-gray-800">Edit Prompt</h3>
<button id="closeEditor" class="text-gray-500 hover:text-gray-700">
<i class="fas fa-times"></i>
</button>
</div>
<div class="p-6 overflow-y-auto" style="max-height: calc(90vh - 120px)">
<div class="mb-6">
<label class="block text-sm font-medium text-gray-700 mb-1">Prompt Title</label>
<input type="text" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-purple-500" value="Creative Story Generator">
</div>
<div class="mb-6">
<label class="block text-sm font-medium text-gray-700 mb-1">Prompt Description</label>
<textarea class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-purple-500" rows="3">Generate unique story ideas with characters, settings, and plot twists based on your input parameters.</textarea>
</div>
<div class="mb-6">
<label class="block text-sm font-medium text-gray-700 mb-1">Prompt Content</label>
<div class="flex mb-2">
<button class="px-3 py-1 text-sm bg-gray-200 rounded-l-md">Write</button>
<button class="px-3 py-1 text-sm border-t border-b border-gray-300">Preview</button>
<button class="px-3 py-1 text-sm bg-gray-200 rounded-r-md">Help</button>
</div>
<textarea class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-purple-500 font-mono" rows="10">Generate a creative story with the following elements:
- Genre: [insert genre]
- Main Character: [describe character]
- Setting: [describe setting]
- Conflict: [describe main conflict]
The story should include:
1. An engaging opening paragraph
2. Character development throughout
3. At least one plot twist
4. A satisfying conclusion
Write in a [describe tone] tone with [describe style] style.</textarea>
</div>
<div class="mb-6">
<label class="block text-sm font-medium text-gray-700 mb-1">Tags</label>
<div class="flex flex-wrap items-center gap-2 mb-2">
<span class="px-2 py-1 bg-blue-100 text-blue-800 text-xs rounded-full flex items-center">
#writing
<button class="ml-1 text-blue-600 hover:text-blue-800">
<i class="fas fa-times text-xs"></i>
</button>
</span>
<span class="px-2 py-1 bg-purple-100 text-purple-800 text-xs rounded-full flex items-center">
#fiction
<button class="ml-1 text-purple-600 hover:text-purple-800">
<i class="fas fa-times text-xs"></i>
</button>
</span>
<span class="px-2 py-1 bg-green-100 text-green-800 text-xs rounded-full flex items-center">
#creative
<button class="ml-1 text-green-600 hover:text-green-800">
<i class="fas fa-times text-xs"></i>
</button>
</span>
<input type="text" class="text-sm px-2 py-1 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-purple-500" placeholder="Add new tag...">
</div>
</div>
<div class="mb-6">
<label class="block text-sm font-medium text-gray-700 mb-1">Category</label>
<select class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-purple-500">
<option>Creative Writing</option>
<option>Programming</option>
<option>Business</option>
<option>Education</option>
<option>Other</option>
</select>
</div>
<div class="bg-gray-50 p-4 rounded-md mb-6">
<h4 class="text-sm font-medium text-gray-700 mb-2 flex items-center">
<i class="fas fa-robot text-purple-500 mr-2"></i>
AI Suggestions
</h4>
<div class="text-sm text-gray-600 mb-3">
<p>Based on your prompt content, I suggest adding these tags to improve discoverability:</p>
<div class="flex flex-wrap gap-2 mt-2">
<button class="px-2 py-1 bg-gray-200 text-gray-700 text-xs rounded-full hover:bg-gray-300">#storytelling</button>
<button class="px-2 py-1 bg-gray-200 text-gray-700 text-xs rounded-full hover:bg-gray-300">#narrative</button>
<button class="px-2 py-1 bg-gray-200 text-gray-700 text-xs rounded-full hover:bg-gray-300">#character</button>
</div>
</div>
<div class="text-sm text-gray-600">
<p>Consider adding these parameters to make your prompt more flexible:</p>
<ul class="list-disc pl-5 mt-2 space-y-1">
<li>Tone options (e.g., humorous, dark, whimsical)</li>
<li>Length specification (short story, novella, etc.)</li>
<li>Point of view options (first person, third person)</li>
</ul>
</div>
</div>
</div>
<div class="flex justify-end space-x-3 border-t border-gray-200 px-6 py-4">
<button class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50">Cancel</button>
<button class="px-4 py-2 bg-purple-600 text-white rounded-md hover:bg-purple-700">Save Changes</button>
</div>
</div>
</div>
</div>
<script>
// Toggle mobile menu
document.getElementById('menuToggle').addEventListener('click', function() {
document.getElementById('sidebar').classList.toggle('active');
});
// Close editor modal
document.getElementById('closeEditor').addEventListener('click', function() {
document.getElementById('editorModal').classList.add('hidden');
});
// Simulate opening editor when edit button is clicked
document.querySelectorAll('.fa-edit').forEach(button => {
button.addEventListener('click', function() {
document.getElementById('editorModal').classList.remove('hidden');
});
});
// Toggle favorite star
document.querySelectorAll('.fa-star, .fa-star-o').forEach(star => {
star.addEventListener('click', function(e) {
e.stopPropagation();
if (this.classList.contains('far')) {
this.classList.remove('far');
this.classList.add('fas', 'text-yellow-500');
} else {
this.classList.remove('fas', 'text-yellow-500');
this.classList.add('far');
}
});
});
// Copy prompt to clipboard
document.querySelectorAll('.fa-copy').forEach(button => {
button.addEventListener('click', function(e) {
e.stopPropagation();
const card = this.closest('.prompt-card');
const title = card.querySelector('h3').textContent;
const content = "This would be the full prompt content in a real app";
// In a real app, we would copy the actual prompt content
navigator.clipboard.writeText(title + "\n\n" + content).then(() => {
const originalIcon = this.classList.contains('far') ? 'far fa-copy' : 'fas fa-copy';
this.className = 'fas fa-check text-green-500';
setTimeout(() => {
this.className = originalIcon;
}, 2000);
});
});
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=cob05/promptcraft-ui" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>