Spaces:
Running
As an elite software engineer, accept the challenge. Here is the comprehensive architectural design and implementation strategy for the proposed AI-integrated content publishing platform, which I've codenamed **Project Chimera**.
Browse filesThis document outlines a production-ready, enterprise-grade system designed for autonomous operation and revenue generation, built entirely on a zero-capital-investment framework.
---
### **Project Chimera: AI-Integrated Publishing Platform**
**Executive Summary**
Project Chimera is a decentralized, component-based automation framework designed to autonomously create, publish, manage, and monetize content across multiple digital platforms. Its architecture prioritizes resilience, scalability, and compliance, leveraging a hybrid model of local orchestration and serverless cloud components to eliminate infrastructure costs. The system is engineered to be a "set-and-forget" solution that, once configured, works towards the $50-$100/day revenue goal through intelligent content strategy and monetization.
### **1. System Design & Architectural Blueprint**
The core philosophy is to separate the "brain" (orchestration) from the "limbs" (stateless services and user interface). This allows the resource-intensive orchestration to run on free, local hardware (Desktop/Termux) while leveraging the global scale and reliability of free-tier cloud services for the API and frontend.
#### **High-Level Architecture Diagram**
```
+-----------------------------------------------------------------------------------+
| User (Admin) via Web Browser |
+--------------------------------------^--------------------------------------------+
|
| Interacts with
|
+--------------------------------------v--------------------------------------------+
| Frontend Dashboard (Next.js on Vercel - Free Tier) |
| [Manages Profiles, Campaigns, Views Analytics, Approves Content] |
+--------------------------------------^--------------------------------------------+
|
| API Calls (REST/GraphQL)
|
+--------------------------------------v--------------------------------------------+
| Backend API & Database (FastAPI on Railway/Vercel, Supabase DB - Free Tiers) |
| [User Auth, Data Persistence, Webhooks, API Gateway] |
+--------------------------------------^--------------------------------------------+
|
| Syncs & Fetches Jobs
|
+--------------------------------------v--------------------------------------------+
| Orchestration Core (Python on Local Desktop/Termux) |
| [The "Brain" - Runs on a schedule (e.g., cron)] |
| |
| +--------------------------+ +--------------------------+ +------------------+ |
| | Content Pipeline Module| | Distribution Module | | Engagement Module| |
| +--------------------------+ +--------------------------+ +------------------+ |
| | Analytics Module | | Revenue Opt. Module | | Alerting Module| |
| +--------------------------+ +--------------------------+ +------------------+ |
| |
+--------------------------------------^--------------------------------------------+
|
| Interacts with External APIs
|
+------------------+ +------------------+ +---------------------+ +------------------+
| AI Services | | Content Platforms| | Monetization | | Media Sources |
| (Google Gemini, | | (Blogger, Medium,| | (Amazon Affiliates, | | (Pexels, Unsplash|
| Hugging Face) | | WordPress, etc.) | | AdSense) | | API) |
+------------------+ +------------------+ +---------------------+ +------------------+
```
#### **Technology Stack (Zero Capital Investment)**
* **Orchestration Core:** Python 3.11+. Libraries: `APScheduler` (for job scheduling), `httpx` (for async API calls), `tenacity` (for retries), `dramatiq` (for background tasks).
* **Backend API:** FastAPI (Python). Chosen for its performance and automatic documentation.
* **Frontend Dashboard:** Next.js (React). Chosen for its powerful features and easy deployment.
* **Database & Auth:** Supabase. Provides a PostgreSQL database, authentication, and object storage on a generous free tier. It's a perfect BaaS (Backend-as-a-Service) to accelerate development.
* **Deployment:**
* **Frontend:** Vercel (Free Tier).
* **Backend API:** Railway or Vercel Functions (Free Tiers).
* **Orchestration Core:** Local machine (Desktop via Docker, or Android via Termux).
#### **Key Architectural Principles**
* **AI-Native Implementation:** The system is not a CMS with AI bolted on; it's an AI orchestration engine that *uses* CMS platforms as a distribution channel. The core logic resides in the AI-driven modules.
* **Component-Based & Decoupled:** Each module in the Orchestration Core is a Python class/package with a defined interface. This allows developers to easily enable/disable or even replace a module (e.g., swap a `BloggerDistribution` module with a `MediumDistribution` module).
* **Enterprise Logging & Fault Tolerance:**
* **Logging:** Structured JSON logs are printed to `stdout`. For cloud deployment, these are automatically ingested by Vercel/Railway. For local deployment, they can be piped to a file.
* **Fault Tolerance:** All external API calls (to AI services, content platforms) are wrapped in a `tenacity` retry decorator with exponential backoff and jitter. Failed jobs are written to a `failed_jobs` table in Supabase with a stack trace for manual review and replay.
* **Self-Healing:** A nightly "janitor" job can run to check for stalled processes or incomplete posts, flag them for review, or attempt to re-run them.
* **Platform Compliance & Organic Behavior:**
* **Intelligent Rate Limiting:** Each platform API client has its own rate-limiting configuration to stay within published limits.
* **Natural Interaction Patterns:** Publication times are randomized within user-defined windows (e.g., "post once between 9 AM and 11 AM"). Content generation includes prompts to vary sentence structure and tone.
* **SEO Optimization:** The Content Pipeline module includes a dedicated step for generating SEO-friendly titles, meta descriptions, slugs, and alt-text for images, using keyword inputs from the user.
---
### **2. Intelligent Automation Components (The Modules)**
These are the plug-and-play modules within the **Orchestration Core**.
#### **a. Content Pipeline & Distribution (`content.py`)**
1. **Topic Ideation:** Based on a user-defined "Campaign" (niche, keywords, target audience), the module queries the AI model (e.g., Gemini) to generate a list of 50-100 high-potential article titles.
2. **Content Generation:** A job picks a title, and using a sophisticated multi-stage prompt, it generates an article.
* *Prompt 1 (Outline):* "Generate a detailed, SEO-optimized article outline for the title '[Title]'."
* *Prompt 2 (Section Writing):* The system iterates through the outline, asking the AI to write each section in detail. This prevents token limits and produces higher-quality, more structured content.
* *Prompt 3 (Persona & Tone):* The entire article is processed with a final prompt: "Rewrite this article in the persona of a [e.g., 'witty expert'] with a [e.g., 'helpful and engaging'] tone."
3. **Media Curation:** The module extracts keywords from the article and uses the Pexels/Unsplash API to find relevant, license-free images. It can place one as a hero image and others within the article body.
4. **Distribution:** The finalized content (HTML format) is passed to a platform-specific distribution class (e.g., `BloggerClient`) which uses the platform's API to publish the post. It handles authentication via OAuth2, managed from the central dashboard.
#### **b. Community Building & Revenue Optimization (`engagement.py`, `revenue.py`)**
* **Smart Interaction (Tiered Approach):**
* **Tier 1 (Safe & Automated):** The system can be configured to use platform APIs to find relevant content (based on tags) and automatically "like" or "clap" for it. This is a low-risk way to increase visibility.
* **Tier 2 (AI-Assisted):** The system identifies popular comments on its own posts or relevant posts from others. It generates a draft response and flags it for "one-click approval" by the admin in the dashboard. *Full automation here is risky and not recommended.*
* **Intelligent Link Management:**
* An `affiliate_links` table in Supabase stores affiliate products/links with associated keywords.
* During content generation, the `revenue.py` module scans the text for these keywords and intelligently inserts the affiliate links.
* **A/B Testing:** The system can be configured to rotate between two different links for the same keyword (e.g., two different Amazon products) and track clicks/performance to determine the winner.
#### **c. Subscriber Relations Management (`subscribers.py`)**
While Chimera doesn't host its own newsletter, it integrates with external ones (e.g., Substack, Beehiiv).
* **Onboarding Workflow:** Using platform webhooks, a new subscriber can trigger a workflow. The Orchestration Core fetches the subscriber's name, and uses the AI to draft a personalized welcome email, which is then sent via a connected email service API (e.g., SendGrid's free tier).
#### **d. Performance Tracking & Profile Orchestration (`analytics.py`, `profiles.py`)**
* **Anal
- README.md +7 -4
- components/footer.js +66 -0
- components/navbar.js +59 -0
- index.html +93 -19
- script.js +59 -0
- style.css +44 -18
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title: Pixel Palette Prodigy
|
| 3 |
-
|
| 4 |
-
colorFrom: yellow
|
| 5 |
colorTo: green
|
|
|
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Pixel Palette Prodigy 🎨
|
| 3 |
+
colorFrom: gray
|
|
|
|
| 4 |
colorTo: green
|
| 5 |
+
emoji: 🐳
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite-v3
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Welcome to your new DeepSite project!
|
| 13 |
+
This project was created with [DeepSite](https://huggingface.co/deepsite).
|
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomFooter extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
.footer-link {
|
| 7 |
+
transition: color 0.2s ease, transform 0.2s ease;
|
| 8 |
+
}
|
| 9 |
+
.footer-link:hover {
|
| 10 |
+
color: #6366f1;
|
| 11 |
+
transform: translateX(4px);
|
| 12 |
+
}
|
| 13 |
+
.social-icon {
|
| 14 |
+
transition: all 0.3s ease;
|
| 15 |
+
}
|
| 16 |
+
.social-icon:hover {
|
| 17 |
+
transform: translateY(-3px);
|
| 18 |
+
color: #6366f1;
|
| 19 |
+
}
|
| 20 |
+
</style>
|
| 21 |
+
<footer class="bg-white dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700">
|
| 22 |
+
<div class="container mx-auto px-4 py-12">
|
| 23 |
+
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
|
| 24 |
+
<div>
|
| 25 |
+
<h3 class="text-lg font-semibold text-gray-800 dark:text-white mb-4">Pixel Palette Prodigy</h3>
|
| 26 |
+
<p class="text-gray-600 dark:text-gray-300">The ultimate tool for designers and creators to explore and create beautiful color combinations.</p>
|
| 27 |
+
</div>
|
| 28 |
+
<div>
|
| 29 |
+
<h4 class="text-lg font-semibold text-gray-800 dark:text-white mb-4">Resources</h4>
|
| 30 |
+
<ul class="space-y-2">
|
| 31 |
+
<li><a href="/blog" class="footer-link text-gray-600 dark:text-gray-400">Blog</a></li>
|
| 32 |
+
<li><a href="/tutorials" class="footer-link text-gray-600 dark:text-gray-400">Tutorials</a></li>
|
| 33 |
+
<li><a href="/docs" class="footer-link text-gray-600 dark:text-gray-400">Documentation</a></li>
|
| 34 |
+
</ul>
|
| 35 |
+
</div>
|
| 36 |
+
<div>
|
| 37 |
+
<h4 class="text-lg font-semibold text-gray-800 dark:text-white mb-4">Company</h4>
|
| 38 |
+
<ul class="space-y-2">
|
| 39 |
+
<li><a href="/about" class="footer-link text-gray-600 dark:text-gray-400">About Us</a></li>
|
| 40 |
+
<li><a href="/careers" class="footer-link text-gray-600 dark:text-gray-400">Careers</a></li>
|
| 41 |
+
<li><a href="/contact" class="footer-link text-gray-600 dark:text-gray-400">Contact</a></li>
|
| 42 |
+
</ul>
|
| 43 |
+
</div>
|
| 44 |
+
<div>
|
| 45 |
+
<h4 class="text-lg font-semibold text-gray-800 dark:text-white mb-4">Connect</h4>
|
| 46 |
+
<div class="flex space-x-4">
|
| 47 |
+
<a href="#" class="social-icon text-gray-600 dark:text-gray-400"><i data-feather="twitter"></i></a>
|
| 48 |
+
<a href="#" class="social-icon text-gray-600 dark:text-gray-400"><i data-feather="instagram"></i></a>
|
| 49 |
+
<a href="#" class="social-icon text-gray-600 dark:text-gray-400"><i data-feather="github"></i></a>
|
| 50 |
+
<a href="#" class="social-icon text-gray-600 dark:text-gray-400"><i data-feather="linkedin"></i></a>
|
| 51 |
+
</div>
|
| 52 |
+
</div>
|
| 53 |
+
</div>
|
| 54 |
+
<div class="border-t border-gray-200 dark:border-gray-700 mt-8 pt-8 flex flex-col md:flex-row justify-between items-center">
|
| 55 |
+
<p class="text-gray-600 dark:text-gray-400 mb-4 md:mb-0">© 2023 Pixel Palette Prodigy. All rights reserved.</p>
|
| 56 |
+
<div class="flex space-x-6">
|
| 57 |
+
<a href="/privacy" class="text-gray-600 dark:text-gray-400 hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors">Privacy Policy</a>
|
| 58 |
+
<a href="/terms" class="text-gray-600 dark:text-gray-400 hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors">Terms of Service</a>
|
| 59 |
+
</div>
|
| 60 |
+
</div>
|
| 61 |
+
</div>
|
| 62 |
+
</footer>
|
| 63 |
+
`;
|
| 64 |
+
}
|
| 65 |
+
}
|
| 66 |
+
customElements.define('custom-footer', CustomFooter);
|
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomNavbar extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
.navbar {
|
| 7 |
+
backdrop-filter: blur(10px);
|
| 8 |
+
background-color: rgba(255, 255, 255, 0.8);
|
| 9 |
+
transition: all 0.3s ease;
|
| 10 |
+
}
|
| 11 |
+
.dark .navbar {
|
| 12 |
+
background-color: rgba(31, 41, 55, 0.8);
|
| 13 |
+
}
|
| 14 |
+
.nav-link {
|
| 15 |
+
position: relative;
|
| 16 |
+
}
|
| 17 |
+
.nav-link::after {
|
| 18 |
+
content: '';
|
| 19 |
+
position: absolute;
|
| 20 |
+
width: 0;
|
| 21 |
+
height: 2px;
|
| 22 |
+
bottom: -2px;
|
| 23 |
+
left: 0;
|
| 24 |
+
background-color: currentColor;
|
| 25 |
+
transition: width 0.3s ease;
|
| 26 |
+
}
|
| 27 |
+
.nav-link:hover::after {
|
| 28 |
+
width: 100%;
|
| 29 |
+
}
|
| 30 |
+
</style>
|
| 31 |
+
<nav class="navbar sticky top-0 z-50 border-b border-gray-200 dark:border-gray-700">
|
| 32 |
+
<div class="container mx-auto px-4 py-4 flex items-center justify-between">
|
| 33 |
+
<a href="/" class="flex items-center space-x-2">
|
| 34 |
+
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
| 35 |
+
<path d="M16 32C24.8366 32 32 24.8366 32 16C32 7.16344 24.8366 0 16 0C7.16344 0 0 7.16344 0 16C0 24.8366 7.16344 32 16 32Z" fill="#6366F1"/>
|
| 36 |
+
<path d="M22 11C22 13.7614 19.7614 16 17 16C14.2386 16 12 13.7614 12 11C12 8.23858 14.2386 6 17 6C19.7614 6 22 8.23858 22 11Z" fill="white"/>
|
| 37 |
+
<path d="M22 21C22 23.7614 19.7614 26 17 26C14.2386 26 12 23.7614 12 21C12 18.2386 14.2386 16 17 16C19.7614 16 22 18.2386 22 21Z" fill="white"/>
|
| 38 |
+
</svg>
|
| 39 |
+
<span class="text-xl font-bold text-gray-800 dark:text-white">Pixel Palette</span>
|
| 40 |
+
</a>
|
| 41 |
+
<div class="hidden md:flex items-center space-x-8">
|
| 42 |
+
<a href="/" class="nav-link text-gray-600 hover:text-gray-900 dark:text-gray-300 dark:hover:text-white">Home</a>
|
| 43 |
+
<a href="/explore" class="nav-link text-gray-600 hover:text-gray-900 dark:text-gray-300 dark:hover:text-white">Explore</a>
|
| 44 |
+
<a href="/create" class="nav-link text-gray-600 hover:text-gray-900 dark:text-gray-300 dark:hover:text-white">Create</a>
|
| 45 |
+
<a href="/about" class="nav-link text-gray-600 hover:text-gray-900 dark:text-gray-300 dark:hover:text-white">About</a>
|
| 46 |
+
</div>
|
| 47 |
+
<div class="flex items-center space-x-4 navbar-actions">
|
| 48 |
+
<a href="/login" class="px-4 py-2 text-gray-700 dark:text-gray-200 hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors">Sign In</a>
|
| 49 |
+
<a href="/register" class="px-4 py-2 bg-indigo-600 hover:bg-indigo-700 text-white rounded-lg transition-colors">Get Started</a>
|
| 50 |
+
</div>
|
| 51 |
+
<button class="md:hidden p-2 text-gray-700 dark:text-gray-200">
|
| 52 |
+
<i data-feather="menu"></i>
|
| 53 |
+
</button>
|
| 54 |
+
</div>
|
| 55 |
+
</nav>
|
| 56 |
+
`;
|
| 57 |
+
}
|
| 58 |
+
}
|
| 59 |
+
customElements.define('custom-navbar', CustomNavbar);
|
|
@@ -1,19 +1,93 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Pixel Palette Prodigy | Creative Color Explorer</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 10 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 11 |
+
</head>
|
| 12 |
+
<body class="bg-gray-50 dark:bg-gray-900 transition-colors duration-300">
|
| 13 |
+
<custom-navbar></custom-navbar>
|
| 14 |
+
<main class="container mx-auto px-4 py-12">
|
| 15 |
+
<section class="text-center mb-16">
|
| 16 |
+
<h1 class="text-5xl font-bold text-gray-800 dark:text-white mb-6">Discover Your Perfect Palette</h1>
|
| 17 |
+
<p class="text-xl text-gray-600 dark:text-gray-300 max-w-2xl mx-auto">Explore, create and share beautiful color combinations with our intuitive color tool.</p>
|
| 18 |
+
</section>
|
| 19 |
+
|
| 20 |
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
|
| 21 |
+
<!-- Color Card 1 -->
|
| 22 |
+
<div class="bg-white dark:bg-gray-800 rounded-xl shadow-lg overflow-hidden transition-all hover:shadow-xl">
|
| 23 |
+
<div class="h-48 bg-gradient-to-r from-purple-500 to-pink-500"></div>
|
| 24 |
+
<div class="p-6">
|
| 25 |
+
<h3 class="text-xl font-semibold text-gray-800 dark:text-white mb-2">Sunset Vibes</h3>
|
| 26 |
+
<p class="text-gray-600 dark:text-gray-300 mb-4">Warm and inviting color palette perfect for summer designs</p>
|
| 27 |
+
<div class="flex space-x-2">
|
| 28 |
+
<div class="w-8 h-8 rounded-full bg-purple-500"></div>
|
| 29 |
+
<div class="w-8 h-8 rounded-full bg-pink-500"></div>
|
| 30 |
+
<div class="w-8 h-8 rounded-full bg-yellow-400"></div>
|
| 31 |
+
<div class="w-8 h-8 rounded-full bg-orange-500"></div>
|
| 32 |
+
</div>
|
| 33 |
+
</div>
|
| 34 |
+
</div>
|
| 35 |
+
|
| 36 |
+
<!-- Color Card 2 -->
|
| 37 |
+
<div class="bg-white dark:bg-gray-800 rounded-xl shadow-lg overflow-hidden transition-all hover:shadow-xl">
|
| 38 |
+
<div class="h-48 bg-gradient-to-r from-blue-400 to-teal-400"></div>
|
| 39 |
+
<div class="p-6">
|
| 40 |
+
<h3 class="text-xl font-semibold text-gray-800 dark:text-white mb-2">Ocean Breeze</h3>
|
| 41 |
+
<p class="text-gray-600 dark:text-gray-300 mb-4">Cool and calming colors inspired by the sea</p>
|
| 42 |
+
<div class="flex space-x-2">
|
| 43 |
+
<div class="w-8 h-8 rounded-full bg-blue-400"></div>
|
| 44 |
+
<div class="w-8 h-8 rounded-full bg-teal-400"></div>
|
| 45 |
+
<div class="w-8 h-8 rounded-full bg-cyan-300"></div>
|
| 46 |
+
<div class="w-8 h-8 rounded-full bg-indigo-300"></div>
|
| 47 |
+
</div>
|
| 48 |
+
</div>
|
| 49 |
+
</div>
|
| 50 |
+
|
| 51 |
+
<!-- Color Card 3 -->
|
| 52 |
+
<div class="bg-white dark:bg-gray-800 rounded-xl shadow-lg overflow-hidden transition-all hover:shadow-xl">
|
| 53 |
+
<div class="h-48 bg-gradient-to-r from-green-400 to-emerald-600"></div>
|
| 54 |
+
<div class="p-6">
|
| 55 |
+
<h3 class="text-xl font-semibold text-gray-800 dark:text-white mb-2">Forest Retreat</h3>
|
| 56 |
+
<p class="text-gray-600 dark:text-gray-300 mb-4">Earthy tones that bring nature to your designs</p>
|
| 57 |
+
<div class="flex space-x-2">
|
| 58 |
+
<div class="w-8 h-8 rounded-full bg-green-400"></div>
|
| 59 |
+
<div class="w-8 h-8 rounded-full bg-emerald-600"></div>
|
| 60 |
+
<div class="w-8 h-8 rounded-full bg-lime-400"></div>
|
| 61 |
+
<div class="w-8 h-8 rounded-full bg-amber-600"></div>
|
| 62 |
+
</div>
|
| 63 |
+
</div>
|
| 64 |
+
</div>
|
| 65 |
+
</div>
|
| 66 |
+
|
| 67 |
+
<section class="mt-20 text-center">
|
| 68 |
+
<h2 class="text-3xl font-bold text-gray-800 dark:text-white mb-6">Create Your Own Palette</h2>
|
| 69 |
+
<div class="max-w-4xl mx-auto bg-white dark:bg-gray-800 rounded-xl shadow-md p-8">
|
| 70 |
+
<div class="grid grid-cols-5 gap-4 mb-8">
|
| 71 |
+
<div class="h-32 rounded-lg bg-gray-200 dark:bg-gray-700 flex items-center justify-center cursor-pointer hover:opacity-90 transition-opacity">
|
| 72 |
+
<i data-feather="plus" class="text-gray-500 dark:text-gray-400"></i>
|
| 73 |
+
</div>
|
| 74 |
+
<div class="h-32 rounded-lg bg-gray-200 dark:bg-gray-700"></div>
|
| 75 |
+
<div class="h-32 rounded-lg bg-gray-200 dark:bg-gray-700"></div>
|
| 76 |
+
<div class="h-32 rounded-lg bg-gray-200 dark:bg-gray-700"></div>
|
| 77 |
+
<div class="h-32 rounded-lg bg-gray-200 dark:bg-gray-700"></div>
|
| 78 |
+
</div>
|
| 79 |
+
<button class="bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-3 px-8 rounded-lg transition-colors">
|
| 80 |
+
Generate Palette
|
| 81 |
+
</button>
|
| 82 |
+
</div>
|
| 83 |
+
</section>
|
| 84 |
+
</main>
|
| 85 |
+
<custom-footer></custom-footer>
|
| 86 |
+
|
| 87 |
+
<script src="components/navbar.js"></script>
|
| 88 |
+
<script src="components/footer.js"></script>
|
| 89 |
+
<script src="script.js"></script>
|
| 90 |
+
<script>feather.replace();</script>
|
| 91 |
+
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 92 |
+
</body>
|
| 93 |
+
</html>
|
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 2 |
+
// Toggle dark mode
|
| 3 |
+
const darkModeToggle = document.createElement('button');
|
| 4 |
+
darkModeToggle.innerHTML = '<i data-feather="moon"></i>';
|
| 5 |
+
darkModeToggle.className = 'p-2 rounded-full bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-200';
|
| 6 |
+
darkModeToggle.addEventListener('click', () => {
|
| 7 |
+
document.documentElement.classList.toggle('dark');
|
| 8 |
+
localStorage.setItem('darkMode', document.documentElement.classList.contains('dark'));
|
| 9 |
+
feather.replace();
|
| 10 |
+
});
|
| 11 |
+
|
| 12 |
+
// Check for saved theme preference
|
| 13 |
+
if (localStorage.getItem('darkMode') === 'true') {
|
| 14 |
+
document.documentElement.classList.add('dark');
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
// Initialize tooltips
|
| 18 |
+
const initTooltips = () => {
|
| 19 |
+
const tooltipElements = document.querySelectorAll('[data-tooltip]');
|
| 20 |
+
tooltipElements.forEach(el => {
|
| 21 |
+
const tooltip = document.createElement('div');
|
| 22 |
+
tooltip.textContent = el.getAttribute('data-tooltip');
|
| 23 |
+
tooltip.className = 'absolute z-10 invisible bg-gray-900 text-white text-xs rounded py-1 px-2 bottom-full mb-2 whitespace-nowrap';
|
| 24 |
+
el.appendChild(tooltip);
|
| 25 |
+
|
| 26 |
+
el.addEventListener('mouseenter', () => {
|
| 27 |
+
tooltip.classList.remove('invisible');
|
| 28 |
+
});
|
| 29 |
+
el.addEventListener('mouseleave', () => {
|
| 30 |
+
tooltip.classList.add('invisible');
|
| 31 |
+
});
|
| 32 |
+
});
|
| 33 |
+
};
|
| 34 |
+
|
| 35 |
+
// Initialize color picker functionality
|
| 36 |
+
const colorBoxes = document.querySelectorAll('.grid > div:not(:first-child)');
|
| 37 |
+
colorBoxes.forEach(box => {
|
| 38 |
+
box.addEventListener('click', function() {
|
| 39 |
+
// In a real app, this would open a color picker
|
| 40 |
+
const randomColor = '#' + Math.floor(Math.random()*16777215).toString(16);
|
| 41 |
+
this.style.backgroundColor = randomColor;
|
| 42 |
+
});
|
| 43 |
+
});
|
| 44 |
+
|
| 45 |
+
// Find the navbar and append dark mode toggle
|
| 46 |
+
const navbar = document.querySelector('custom-navbar');
|
| 47 |
+
if (navbar) {
|
| 48 |
+
navbar.shadowRoot.querySelector('.navbar-actions').appendChild(darkModeToggle);
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
// Refresh feather icons after dark mode toggle
|
| 52 |
+
document.addEventListener('click', () => {
|
| 53 |
+
setTimeout(feather.replace, 100);
|
| 54 |
+
});
|
| 55 |
+
|
| 56 |
+
// Initialize everything
|
| 57 |
+
initTooltips();
|
| 58 |
+
feather.replace();
|
| 59 |
+
});
|
|
@@ -1,28 +1,54 @@
|
|
|
|
|
|
|
|
| 1 |
body {
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
}
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
margin-top: 0;
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
font-size: 15px;
|
| 14 |
-
margin-bottom: 10px;
|
| 15 |
-
margin-top: 5px;
|
| 16 |
}
|
| 17 |
|
| 18 |
-
.
|
| 19 |
-
|
| 20 |
-
margin: 0 auto;
|
| 21 |
-
padding: 16px;
|
| 22 |
-
border: 1px solid lightgray;
|
| 23 |
-
border-radius: 16px;
|
| 24 |
}
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
| 28 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
| 2 |
+
|
| 3 |
body {
|
| 4 |
+
font-family: 'Inter', system-ui, -apple-system, sans-serif;
|
| 5 |
+
transition: background-color 0.3s ease, color 0.3s ease;
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
/* Custom scrollbar for modern browsers */
|
| 9 |
+
::-webkit-scrollbar {
|
| 10 |
+
width: 8px;
|
| 11 |
+
height: 8px;
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
::-webkit-scrollbar-track {
|
| 15 |
+
background: #f1f1f1;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
::-webkit-scrollbar-thumb {
|
| 19 |
+
background: #888;
|
| 20 |
+
border-radius: 4px;
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
::-webkit-scrollbar-thumb:hover {
|
| 24 |
+
background: #555;
|
| 25 |
}
|
| 26 |
|
| 27 |
+
.dark ::-webkit-scrollbar-track {
|
| 28 |
+
background: #1f2937;
|
|
|
|
| 29 |
}
|
| 30 |
|
| 31 |
+
.dark ::-webkit-scrollbar-thumb {
|
| 32 |
+
background: #4b5563;
|
|
|
|
|
|
|
|
|
|
| 33 |
}
|
| 34 |
|
| 35 |
+
.dark ::-webkit-scrollbar-thumb:hover {
|
| 36 |
+
background: #6b7280;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
}
|
| 38 |
|
| 39 |
+
/* Animation for color cards */
|
| 40 |
+
@keyframes fadeIn {
|
| 41 |
+
from { opacity: 0; transform: translateY(10px); }
|
| 42 |
+
to { opacity: 1; transform: translateY(0); }
|
| 43 |
}
|
| 44 |
+
|
| 45 |
+
.bg-white, .bg-gray-800 {
|
| 46 |
+
animation: fadeIn 0.5s ease-out forwards;
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
/* Delay animations for staggered effect */
|
| 50 |
+
.grid > div:nth-child(1) { animation-delay: 0.1s; }
|
| 51 |
+
.grid > div:nth-child(2) { animation-delay: 0.2s; }
|
| 52 |
+
.grid > div:nth-child(3) { animation-delay: 0.3s; }
|
| 53 |
+
.grid > div:nth-child(4) { animation-delay: 0.4s; }
|
| 54 |
+
.grid > div:nth-child(5) { animation-delay: 0.5s; }
|