Spaces:
Running
Running
https://unlucid.ai/edit
Browse files- README.md +7 -4
- components/footer.js +63 -0
- components/header.js +52 -0
- index.html +83 -19
- script.js +36 -0
- style.css +34 -18
README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
title: Chromatic Canvas
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
title: Chromatic Canvas
|
| 3 |
+
colorFrom: gray
|
| 4 |
+
colorTo: purple
|
| 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).
|
components/footer.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomFooter extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
footer {
|
| 7 |
+
background-color: rgba(255, 255, 255, 0.8);
|
| 8 |
+
backdrop-filter: blur(10px);
|
| 9 |
+
}
|
| 10 |
+
.social-icon {
|
| 11 |
+
transition: all 0.3s ease;
|
| 12 |
+
}
|
| 13 |
+
.social-icon:hover {
|
| 14 |
+
transform: translateY(-3px);
|
| 15 |
+
}
|
| 16 |
+
</style>
|
| 17 |
+
<footer class="border-t border-gray-100">
|
| 18 |
+
<div class="container mx-auto px-4 py-12">
|
| 19 |
+
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
|
| 20 |
+
<div class="md:col-span-2">
|
| 21 |
+
<h3 class="text-xl font-bold text-secondary-dark mb-4">Chromatic Canvas</h3>
|
| 22 |
+
<p class="text-secondary-DEFAULT mb-6">A vibrant playground where colors come to life.</p>
|
| 23 |
+
<div class="flex space-x-4">
|
| 24 |
+
<a href="#" class="social-icon">
|
| 25 |
+
<i data-feather="twitter" class="text-secondary-DEFAULT hover:text-secondary-dark"></i>
|
| 26 |
+
</a>
|
| 27 |
+
<a href="#" class="social-icon">
|
| 28 |
+
<i data-feather="github" class="text-secondary-DEFAULT hover:text-secondary-dark"></i>
|
| 29 |
+
</a>
|
| 30 |
+
<a href="#" class="social-icon">
|
| 31 |
+
<i data-feather="instagram" class="text-secondary-DEFAULT hover:text-secondary-dark"></i>
|
| 32 |
+
</a>
|
| 33 |
+
</div>
|
| 34 |
+
</div>
|
| 35 |
+
|
| 36 |
+
<div>
|
| 37 |
+
<h4 class="font-semibold text-secondary-dark mb-4">Resources</h4>
|
| 38 |
+
<ul class="space-y-2">
|
| 39 |
+
<li><a href="#" class="text-secondary-DEFAULT hover:text-secondary-dark">Documentation</a></li>
|
| 40 |
+
<li><a href="#" class="text-secondary-DEFAULT hover:text-secondary-dark">Tutorials</a></li>
|
| 41 |
+
<li><a href="#" class="text-secondary-DEFAULT hover:text-secondary-dark">API</a></li>
|
| 42 |
+
</ul>
|
| 43 |
+
</div>
|
| 44 |
+
|
| 45 |
+
<div>
|
| 46 |
+
<h4 class="font-semibold text-secondary-dark mb-4">Company</h4>
|
| 47 |
+
<ul class="space-y-2">
|
| 48 |
+
<li><a href="#" class="text-secondary-DEFAULT hover:text-secondary-dark">About</a></li>
|
| 49 |
+
<li><a href="#" class="text-secondary-DEFAULT hover:text-secondary-dark">Careers</a></li>
|
| 50 |
+
<li><a href="#" class="text-secondary-DEFAULT hover:text-secondary-dark">Contact</a></li>
|
| 51 |
+
</ul>
|
| 52 |
+
</div>
|
| 53 |
+
</div>
|
| 54 |
+
|
| 55 |
+
<div class="border-t border-gray-100 mt-12 pt-8 text-center text-secondary-DEFAULT">
|
| 56 |
+
<p>© ${new Date().getFullYear()} Chromatic Canvas. All rights reserved.</p>
|
| 57 |
+
</div>
|
| 58 |
+
</div>
|
| 59 |
+
</footer>
|
| 60 |
+
`;
|
| 61 |
+
}
|
| 62 |
+
}
|
| 63 |
+
customElements.define('custom-footer', CustomFooter);
|
components/header.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomHeader extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
nav {
|
| 7 |
+
background-color: rgba(255, 255, 255, 0.8);
|
| 8 |
+
backdrop-filter: blur(10px);
|
| 9 |
+
}
|
| 10 |
+
.nav-link {
|
| 11 |
+
position: relative;
|
| 12 |
+
}
|
| 13 |
+
.nav-link::after {
|
| 14 |
+
content: '';
|
| 15 |
+
position: absolute;
|
| 16 |
+
width: 0;
|
| 17 |
+
height: 2px;
|
| 18 |
+
bottom: 0;
|
| 19 |
+
left: 0;
|
| 20 |
+
background-color: #9ca3af;
|
| 21 |
+
transition: width 0.3s ease;
|
| 22 |
+
}
|
| 23 |
+
.nav-link:hover::after {
|
| 24 |
+
width: 100%;
|
| 25 |
+
}
|
| 26 |
+
</style>
|
| 27 |
+
<header>
|
| 28 |
+
<nav class="fixed w-full z-10 border-b border-gray-100 shadow-sm">
|
| 29 |
+
<div class="container mx-auto px-4 py-4 flex justify-between items-center">
|
| 30 |
+
<a href="/" class="text-2xl font-bold text-secondary-dark">Chromatic</a>
|
| 31 |
+
|
| 32 |
+
<div class="hidden md:flex space-x-8 items-center">
|
| 33 |
+
<a href="#" class="nav-link text-secondary-DEFAULT hover:text-secondary-dark">Explore</a>
|
| 34 |
+
<a href="#" class="nav-link text-secondary-DEFAULT hover:text-secondary-dark">Create</a>
|
| 35 |
+
<a href="#" class="nav-link text-secondary-DEFAULT hover:text-secondary-dark">Generate</a>
|
| 36 |
+
<a href="#" class="nav-link text-secondary-DEFAULT hover:text-secondary-dark">About</a>
|
| 37 |
+
|
| 38 |
+
<button id="color-mode-toggle" class="p-2 rounded-full hover:bg-gray-100">
|
| 39 |
+
<i data-feather="moon" class="text-secondary-DEFAULT"></i>
|
| 40 |
+
</button>
|
| 41 |
+
</div>
|
| 42 |
+
|
| 43 |
+
<button class="md:hidden p-2">
|
| 44 |
+
<i data-feather="menu" class="text-secondary-DEFAULT"></i>
|
| 45 |
+
</button>
|
| 46 |
+
</div>
|
| 47 |
+
</nav>
|
| 48 |
+
</header>
|
| 49 |
+
`;
|
| 50 |
+
}
|
| 51 |
+
}
|
| 52 |
+
customElements.define('custom-header', CustomHeader);
|
index.html
CHANGED
|
@@ -1,19 +1,83 @@
|
|
| 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>Chromatic Canvas</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script>
|
| 10 |
+
tailwind.config = {
|
| 11 |
+
theme: {
|
| 12 |
+
extend: {
|
| 13 |
+
colors: {
|
| 14 |
+
primary: {
|
| 15 |
+
light: '#f5f5f5',
|
| 16 |
+
DEFAULT: '#e5e5e5',
|
| 17 |
+
dark: '#d4d4d4',
|
| 18 |
+
},
|
| 19 |
+
secondary: {
|
| 20 |
+
light: '#d1d5db',
|
| 21 |
+
DEFAULT: '#9ca3af',
|
| 22 |
+
dark: '#6b7280',
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
}
|
| 26 |
+
}
|
| 27 |
+
}
|
| 28 |
+
</script>
|
| 29 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 30 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 31 |
+
</head>
|
| 32 |
+
<body class="bg-primary-light min-h-screen">
|
| 33 |
+
<custom-header></custom-header>
|
| 34 |
+
<main class="container mx-auto px-4 py-12">
|
| 35 |
+
<div class="text-center mb-16">
|
| 36 |
+
<h1 class="text-5xl font-bold text-secondary-dark mb-6">Chromatic Canvas</h1>
|
| 37 |
+
<p class="text-xl text-secondary-DEFAULT max-w-2xl mx-auto">A vibrant playground where colors come to life</p>
|
| 38 |
+
</div>
|
| 39 |
+
|
| 40 |
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
|
| 41 |
+
<div class="bg-white rounded-xl shadow-lg overflow-hidden transition-all duration-300 hover:shadow-xl hover:-translate-y-2">
|
| 42 |
+
<div class="h-48 bg-gradient-to-r from-secondary-light to-secondary-dark"></div>
|
| 43 |
+
<div class="p-6">
|
| 44 |
+
<h3 class="text-xl font-semibold text-secondary-dark mb-3">Color Explorer</h3>
|
| 45 |
+
<p class="text-gray-600 mb-4">Discover beautiful color combinations and palettes</p>
|
| 46 |
+
<a href="#" class="inline-flex items-center text-primary-dark font-medium hover:text-secondary-dark">
|
| 47 |
+
Explore <i data-feather="arrow-right" class="ml-2 w-4 h-4"></i>
|
| 48 |
+
</a>
|
| 49 |
+
</div>
|
| 50 |
+
</div>
|
| 51 |
+
|
| 52 |
+
<div class="bg-white rounded-xl shadow-lg overflow-hidden transition-all duration-300 hover:shadow-xl hover:-translate-y-2">
|
| 53 |
+
<div class="h-48 bg-gradient-to-r from-primary-dark to-primary-light"></div>
|
| 54 |
+
<div class="p-6">
|
| 55 |
+
<h3 class="text-xl font-semibold text-secondary-dark mb-3">Theme Creator</h3>
|
| 56 |
+
<p class="text-gray-600 mb-4">Design your perfect color theme for any project</p>
|
| 57 |
+
<a href="#" class="inline-flex items-center text-primary-dark font-medium hover:text-secondary-dark">
|
| 58 |
+
Create <i data-feather="arrow-right" class="ml-2 w-4 h-4"></i>
|
| 59 |
+
</a>
|
| 60 |
+
</div>
|
| 61 |
+
</div>
|
| 62 |
+
|
| 63 |
+
<div class="bg-white rounded-xl shadow-lg overflow-hidden transition-all duration-300 hover:shadow-xl hover:-translate-y-2">
|
| 64 |
+
<div class="h-48 bg-gradient-to-r from-secondary-DEFAULT to-primary-DEFAULT"></div>
|
| 65 |
+
<div class="p-6">
|
| 66 |
+
<h3 class="text-xl font-semibold text-secondary-dark mb-3">Palette Generator</h3>
|
| 67 |
+
<p class="text-gray-600 mb-4">Generate harmonious color palettes instantly</p>
|
| 68 |
+
<a href="#" class="inline-flex items-center text-primary-dark font-medium hover:text-secondary-dark">
|
| 69 |
+
Generate <i data-feather="arrow-right" class="ml-2 w-4 h-4"></i>
|
| 70 |
+
</a>
|
| 71 |
+
</div>
|
| 72 |
+
</div>
|
| 73 |
+
</div>
|
| 74 |
+
</main>
|
| 75 |
+
<custom-footer></custom-footer>
|
| 76 |
+
|
| 77 |
+
<script src="components/header.js"></script>
|
| 78 |
+
<script src="components/footer.js"></script>
|
| 79 |
+
<script src="script.js"></script>
|
| 80 |
+
<script>feather.replace();</script>
|
| 81 |
+
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 82 |
+
</body>
|
| 83 |
+
</html>
|
script.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 2 |
+
// Initialize color mode toggle functionality
|
| 3 |
+
const colorModeToggle = document.getElementById('color-mode-toggle');
|
| 4 |
+
if (colorModeToggle) {
|
| 5 |
+
colorModeToggle.addEventListener('click', () => {
|
| 6 |
+
document.documentElement.classList.toggle('dark');
|
| 7 |
+
|
| 8 |
+
// Update icon
|
| 9 |
+
const icon = colorModeToggle.querySelector('i');
|
| 10 |
+
if (document.documentElement.classList.contains('dark')) {
|
| 11 |
+
icon.setAttribute('data-feather', 'sun');
|
| 12 |
+
} else {
|
| 13 |
+
icon.setAttribute('data-feather', 'moon');
|
| 14 |
+
}
|
| 15 |
+
feather.replace();
|
| 16 |
+
|
| 17 |
+
// Store preference
|
| 18 |
+
localStorage.setItem('darkMode', document.documentElement.classList.contains('dark'));
|
| 19 |
+
});
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
// Check for saved color mode preference
|
| 23 |
+
if (localStorage.getItem('darkMode') === 'true') {
|
| 24 |
+
document.documentElement.classList.add('dark');
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
// Smooth scrolling for anchor links
|
| 28 |
+
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
| 29 |
+
anchor.addEventListener('click', function (e) {
|
| 30 |
+
e.preventDefault();
|
| 31 |
+
document.querySelector(this.getAttribute('href')).scrollIntoView({
|
| 32 |
+
behavior: 'smooth'
|
| 33 |
+
});
|
| 34 |
+
});
|
| 35 |
+
});
|
| 36 |
+
});
|
style.css
CHANGED
|
@@ -1,28 +1,44 @@
|
|
|
|
|
|
|
|
| 1 |
body {
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
}
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
margin-top: 0;
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
margin-bottom: 10px;
|
| 15 |
-
margin-top: 5px;
|
| 16 |
}
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 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', sans-serif;
|
| 5 |
+
transition: background-color 0.3s ease;
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
/* Custom scrollbar */
|
| 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: #9ca3af;
|
| 20 |
+
border-radius: 4px;
|
| 21 |
}
|
| 22 |
|
| 23 |
+
::-webkit-scrollbar-thumb:hover {
|
| 24 |
+
background: #6b7280;
|
|
|
|
| 25 |
}
|
| 26 |
|
| 27 |
+
/* Animation classes */
|
| 28 |
+
.fade-in {
|
| 29 |
+
animation: fadeIn 0.5s ease-in;
|
|
|
|
|
|
|
| 30 |
}
|
| 31 |
|
| 32 |
+
@keyframes fadeIn {
|
| 33 |
+
from { opacity: 0; }
|
| 34 |
+
to { opacity: 1; }
|
|
|
|
|
|
|
|
|
|
| 35 |
}
|
| 36 |
|
| 37 |
+
.slide-up {
|
| 38 |
+
animation: slideUp 0.5s ease-out;
|
| 39 |
}
|
| 40 |
+
|
| 41 |
+
@keyframes slideUp {
|
| 42 |
+
from { transform: translateY(20px); opacity: 0; }
|
| 43 |
+
to { transform: translateY(0); opacity: 1; }
|
| 44 |
+
}
|