Spaces:
Running
Running
le site ne souvre pas
Browse files- README.md +7 -4
- components/color-card.js +91 -0
- index.html +92 -19
- script.js +15 -0
- style.css +18 -18
README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title: Pixel Palette Explorer
|
| 3 |
-
emoji: π
|
| 4 |
colorFrom: pink
|
| 5 |
-
colorTo:
|
|
|
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Pixel Palette Explorer π¨
|
|
|
|
| 3 |
colorFrom: pink
|
| 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/color-card.js
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class ColorCard extends HTMLElement {
|
| 2 |
+
constructor() {
|
| 3 |
+
super();
|
| 4 |
+
}
|
| 5 |
+
|
| 6 |
+
connectedCallback() {
|
| 7 |
+
this.attachShadow({ mode: 'open' });
|
| 8 |
+
this.render();
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
render() {
|
| 12 |
+
const color = this.getAttribute('color') || 'primary-500';
|
| 13 |
+
const title = this.getAttribute('title') || 'Color Card';
|
| 14 |
+
const description = this.getAttribute('description') || 'Beautiful color palette';
|
| 15 |
+
|
| 16 |
+
this.shadowRoot.innerHTML = `
|
| 17 |
+
<style>
|
| 18 |
+
.card {
|
| 19 |
+
background: white;
|
| 20 |
+
border-radius: 0.75rem;
|
| 21 |
+
overflow: hidden;
|
| 22 |
+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
|
| 23 |
+
transition: all 0.2s ease;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
.card:hover {
|
| 27 |
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
|
| 28 |
+
transform: translateY(-2px);
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
.color-display {
|
| 32 |
+
height: 12rem;
|
| 33 |
+
width: 100%;
|
| 34 |
+
background-color: var(--color, #6366f1);
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
.content {
|
| 38 |
+
padding: 1.5rem;
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
h3 {
|
| 42 |
+
font-size: 1.25rem;
|
| 43 |
+
font-weight: 600;
|
| 44 |
+
margin-bottom: 0.5rem;
|
| 45 |
+
color: #1f2937;
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
p {
|
| 49 |
+
color: #6b7280;
|
| 50 |
+
margin-bottom: 1rem;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
a {
|
| 54 |
+
display: inline-flex;
|
| 55 |
+
align-items: center;
|
| 56 |
+
color: var(--color, #6366f1);
|
| 57 |
+
font-weight: 500;
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
a:hover {
|
| 61 |
+
color: var(--color-dark, #4f46e5);
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
i {
|
| 65 |
+
margin-left: 0.5rem;
|
| 66 |
+
width: 1rem;
|
| 67 |
+
height: 1rem;
|
| 68 |
+
}
|
| 69 |
+
</style>
|
| 70 |
+
|
| 71 |
+
<div class="card">
|
| 72 |
+
<div class="color-display" style="--color: var(--tw-${color})"></div>
|
| 73 |
+
<div class="content">
|
| 74 |
+
<h3>${title}</h3>
|
| 75 |
+
<p>${description}</p>
|
| 76 |
+
<a href="#">
|
| 77 |
+
Explore
|
| 78 |
+
<i data-feather="arrow-right"></i>
|
| 79 |
+
</a>
|
| 80 |
+
</div>
|
| 81 |
+
</div>
|
| 82 |
+
`;
|
| 83 |
+
|
| 84 |
+
// Initialize feather icons within the shadow DOM
|
| 85 |
+
if (window.feather) {
|
| 86 |
+
window.feather.replace({ class: 'feather', 'stroke-width': 2 });
|
| 87 |
+
}
|
| 88 |
+
}
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
customElements.define('color-card', ColorCard);
|
index.html
CHANGED
|
@@ -1,19 +1,92 @@
|
|
| 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 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 |
+
<script>
|
| 12 |
+
tailwind.config = {
|
| 13 |
+
theme: {
|
| 14 |
+
extend: {
|
| 15 |
+
colors: {
|
| 16 |
+
primary: {
|
| 17 |
+
500: '#6366f1',
|
| 18 |
+
},
|
| 19 |
+
secondary: {
|
| 20 |
+
500: '#ec4899',
|
| 21 |
+
}
|
| 22 |
+
}
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
}
|
| 26 |
+
</script>
|
| 27 |
+
</head>
|
| 28 |
+
<body class="bg-gray-50 min-h-screen">
|
| 29 |
+
<main class="container mx-auto px-4 py-12">
|
| 30 |
+
<div class="text-center mb-16">
|
| 31 |
+
<h1 class="text-5xl font-bold text-primary-500 mb-4">Pixel Palette Explorer</h1>
|
| 32 |
+
<p class="text-xl text-gray-600 max-w-2xl mx-auto">Discover the perfect color combinations for your next project</p>
|
| 33 |
+
</div>
|
| 34 |
+
|
| 35 |
+
<div class="grid md:grid-cols-3 gap-8">
|
| 36 |
+
<div class="bg-white rounded-xl shadow-lg overflow-hidden transition-all hover:shadow-xl">
|
| 37 |
+
<div class="h-48 bg-gradient-to-r from-primary-500 to-secondary-500"></div>
|
| 38 |
+
<div class="p-6">
|
| 39 |
+
<h3 class="text-xl font-semibold text-gray-800 mb-2">Color Generator</h3>
|
| 40 |
+
<p class="text-gray-600 mb-4">Generate beautiful color palettes instantly</p>
|
| 41 |
+
<a href="#" class="inline-flex items-center text-primary-500 hover:text-primary-600">
|
| 42 |
+
Explore
|
| 43 |
+
<i data-feather="arrow-right" class="ml-2 w-4 h-4"></i>
|
| 44 |
+
</a>
|
| 45 |
+
</div>
|
| 46 |
+
</div>
|
| 47 |
+
|
| 48 |
+
<div class="bg-white rounded-xl shadow-lg overflow-hidden transition-all hover:shadow-xl">
|
| 49 |
+
<div class="h-48 bg-gradient-to-r from-yellow-400 to-pink-500"></div>
|
| 50 |
+
<div class="p-6">
|
| 51 |
+
<h3 class="text-xl font-semibold text-gray-800 mb-2">Popular Palettes</h3>
|
| 52 |
+
<p class="text-gray-600 mb-4">Browse trending color combinations</p>
|
| 53 |
+
<a href="#" class="inline-flex items-center text-primary-500 hover:text-primary-600">
|
| 54 |
+
Explore
|
| 55 |
+
<i data-feather="arrow-right" class="ml-2 w-4 h-4"></i>
|
| 56 |
+
</a>
|
| 57 |
+
</div>
|
| 58 |
+
</div>
|
| 59 |
+
|
| 60 |
+
<div class="bg-white rounded-xl shadow-lg overflow-hidden transition-all hover:shadow-xl">
|
| 61 |
+
<div class="h-48 bg-gradient-to-r from-green-400 to-blue-500"></div>
|
| 62 |
+
<div class="p-6">
|
| 63 |
+
<h3 class="text-xl font-semibold text-gray-800 mb-2">Save Favorites</h3>
|
| 64 |
+
<p class="text-gray-600 mb-4">Create your personal color library</p>
|
| 65 |
+
<a href="#" class="inline-flex items-center text-primary-500 hover:text-primary-600">
|
| 66 |
+
Explore
|
| 67 |
+
<i data-feather="arrow-right" class="ml-2 w-4 h-4"></i>
|
| 68 |
+
</a>
|
| 69 |
+
</div>
|
| 70 |
+
</div>
|
| 71 |
+
</div>
|
| 72 |
+
|
| 73 |
+
<div class="mt-16 bg-white rounded-xl shadow-lg p-8">
|
| 74 |
+
<h2 class="text-3xl font-bold text-center text-gray-800 mb-8">Color Inspiration</h2>
|
| 75 |
+
<div class="grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-4">
|
| 76 |
+
<div class="h-16 rounded-lg bg-primary-500"></div>
|
| 77 |
+
<div class="h-16 rounded-lg bg-secondary-500"></div>
|
| 78 |
+
<div class="h-16 rounded-lg bg-indigo-500"></div>
|
| 79 |
+
<div class="h-16 rounded-lg bg-pink-500"></div>
|
| 80 |
+
<div class="h-16 rounded-lg bg-yellow-500"></div>
|
| 81 |
+
<div class="h-16 rounded-lg bg-green-500"></div>
|
| 82 |
+
</div>
|
| 83 |
+
</div>
|
| 84 |
+
</main>
|
| 85 |
+
|
| 86 |
+
<script>
|
| 87 |
+
feather.replace();
|
| 88 |
+
</script>
|
| 89 |
+
<script src="script.js"></script>
|
| 90 |
+
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 91 |
+
</body>
|
| 92 |
+
</html>
|
script.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 2 |
+
// Initialize any interactive elements here
|
| 3 |
+
console.log('Pixel Palette Explorer loaded!');
|
| 4 |
+
|
| 5 |
+
// Example: Add click event to color swatches
|
| 6 |
+
const colorSwatches = document.querySelectorAll('[class*="bg-"]');
|
| 7 |
+
colorSwatches.forEach(swatch => {
|
| 8 |
+
swatch.addEventListener('click', function() {
|
| 9 |
+
const colorClass = Array.from(this.classList)
|
| 10 |
+
.find(cls => cls.startsWith('bg-'));
|
| 11 |
+
const colorName = colorClass ? colorClass.replace('bg-', '') : 'unknown';
|
| 12 |
+
console.log(`Selected color: ${colorName}`);
|
| 13 |
+
});
|
| 14 |
+
});
|
| 15 |
+
});
|
style.css
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
|
|
|
|
|
| 1 |
body {
|
| 2 |
-
|
| 3 |
-
font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
|
| 4 |
}
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 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', sans-serif;
|
|
|
|
| 5 |
}
|
| 6 |
|
| 7 |
+
/* Smooth transitions for interactive elements */
|
| 8 |
+
a, button {
|
| 9 |
+
transition: all 0.2s ease;
|
| 10 |
}
|
| 11 |
|
| 12 |
+
/* Custom scrollbar */
|
| 13 |
+
::-webkit-scrollbar {
|
| 14 |
+
width: 8px;
|
|
|
|
|
|
|
| 15 |
}
|
| 16 |
|
| 17 |
+
::-webkit-scrollbar-track {
|
| 18 |
+
background: #f1f1f1;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
}
|
| 20 |
|
| 21 |
+
::-webkit-scrollbar-thumb {
|
| 22 |
+
background: #888;
|
| 23 |
+
border-radius: 4px;
|
| 24 |
}
|
| 25 |
+
|
| 26 |
+
::-webkit-scrollbar-thumb:hover {
|
| 27 |
+
background: #555;
|
| 28 |
+
}
|