Mucella commited on
Commit
cc1fb09
·
verified ·
1 Parent(s): d6c871a

https://claude.ai/public/artifacts/0284b05e-fc48-4a06-a64b-9d78a655e706

Browse files
Files changed (5) hide show
  1. README.md +8 -5
  2. components/color-card.js +84 -0
  3. index.html +155 -19
  4. script.js +29 -0
  5. style.css +34 -18
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Pixelpulse Palette Explorer
3
- emoji: 🏆
4
- colorFrom: gray
5
- colorTo: purple
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
  ---
2
+ title: PixelPulse Palette Explorer 🎨
3
+ colorFrom: yellow
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).
components/color-card.js ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class ColorCard extends HTMLElement {
2
+ constructor() {
3
+ super();
4
+ this.attachShadow({ mode: 'open' });
5
+ }
6
+
7
+ connectedCallback() {
8
+ const color = this.getAttribute('color') || 'primary';
9
+ const shade = this.getAttribute('shade') || '500';
10
+ const title = this.getAttribute('title') || 'Color Card';
11
+ const description = this.getAttribute('description') || 'A beautiful color combination';
12
+
13
+ this.shadowRoot.innerHTML = `
14
+ <style>
15
+ .card {
16
+ background: white;
17
+ border-radius: 0.75rem;
18
+ overflow: hidden;
19
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
20
+ transition: all 0.3s ease;
21
+ }
22
+
23
+ .card:hover {
24
+ transform: translateY(-4px);
25
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
26
+ }
27
+
28
+ .color-preview {
29
+ height: 12rem;
30
+ background-color: var(--color);
31
+ }
32
+
33
+ .card-content {
34
+ padding: 1.5rem;
35
+ }
36
+
37
+ .title {
38
+ font-size: 1.25rem;
39
+ font-weight: 600;
40
+ margin-bottom: 0.5rem;
41
+ color: var(--text-color);
42
+ }
43
+
44
+ .description {
45
+ color: var(--text-secondary);
46
+ margin-bottom: 1rem;
47
+ }
48
+
49
+ .swatches {
50
+ display: flex;
51
+ gap: 0.5rem;
52
+ }
53
+
54
+ .swatch {
55
+ width: 2rem;
56
+ height: 2rem;
57
+ border-radius: 9999px;
58
+ cursor: pointer;
59
+ transition: transform 0.2s;
60
+ }
61
+
62
+ .swatch:hover {
63
+ transform: scale(1.1);
64
+ }
65
+ </style>
66
+
67
+ <div class="card">
68
+ <div class="color-preview" style="--color: var(--${color}-${shade})"></div>
69
+ <div class="card-content">
70
+ <h3 class="title">${title}</h3>
71
+ <p class="description">${description}</p>
72
+ <div class="swatches">
73
+ <div class="swatch" style="background-color: var(--${color}-300)"></div>
74
+ <div class="swatch" style="background-color: var(--${color}-500)"></div>
75
+ <div class="swatch" style="background-color: var(--${color}-700)"></div>
76
+ <div class="swatch" style="background-color: var(--${color}-900)"></div>
77
+ </div>
78
+ </div>
79
+ </div>
80
+ `;
81
+ }
82
+ }
83
+
84
+ customElements.define('color-card', ColorCard);
index.html CHANGED
@@ -1,19 +1,155 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en" class="h-full">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>PixelPulse 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
+ 50: '#f0f9ff',
18
+ 100: '#e0f2fe',
19
+ 200: '#bae6fd',
20
+ 300: '#7dd3fc',
21
+ 400: '#38bdf8',
22
+ 500: '#0ea5e9',
23
+ 600: '#0284c7',
24
+ 700: '#0369a1',
25
+ 800: '#075985',
26
+ 900: '#0c4a6e',
27
+ },
28
+ secondary: {
29
+ 50: '#f5f3ff',
30
+ 100: '#ede9fe',
31
+ 200: '#ddd6fe',
32
+ 300: '#c4b5fd',
33
+ 400: '#a78bfa',
34
+ 500: '#8b5cf6',
35
+ 600: '#7c3aed',
36
+ 700: '#6d28d9',
37
+ 800: '#5b21b6',
38
+ 900: '#4c1d95',
39
+ }
40
+ }
41
+ }
42
+ }
43
+ }
44
+ </script>
45
+ </head>
46
+ <body class="min-h-full bg-gradient-to-br from-primary-50 to-secondary-50">
47
+ <main class="container mx-auto px-4 py-12">
48
+ <div class="text-center mb-16">
49
+ <h1 class="text-5xl font-bold text-primary-800 mb-4">PixelPulse Palette Explorer</h1>
50
+ <p class="text-xl text-secondary-700 max-w-2xl mx-auto">Discover the perfect color combinations for your next project</p>
51
+ </div>
52
+
53
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
54
+ <!-- Color Card 1 -->
55
+ <div class="bg-white rounded-xl shadow-lg overflow-hidden transition-all hover:scale-105 hover:shadow-xl">
56
+ <div class="h-48 bg-primary-500"></div>
57
+ <div class="p-6">
58
+ <h3 class="text-xl font-semibold text-primary-800 mb-2">Primary Palette</h3>
59
+ <p class="text-secondary-600 mb-4">A soothing blue gradient perfect for interfaces</p>
60
+ <div class="flex space-x-2">
61
+ <div class="w-8 h-8 rounded-full bg-primary-300"></div>
62
+ <div class="w-8 h-8 rounded-full bg-primary-500"></div>
63
+ <div class="w-8 h-8 rounded-full bg-primary-700"></div>
64
+ <div class="w-8 h-8 rounded-full bg-primary-900"></div>
65
+ </div>
66
+ </div>
67
+ </div>
68
+
69
+ <!-- Color Card 2 -->
70
+ <div class="bg-white rounded-xl shadow-lg overflow-hidden transition-all hover:scale-105 hover:shadow-xl">
71
+ <div class="h-48 bg-secondary-500"></div>
72
+ <div class="p-6">
73
+ <h3 class="text-xl font-semibold text-secondary-800 mb-2">Secondary Palette</h3>
74
+ <p class="text-primary-600 mb-4">Vibrant purple tones for accents and highlights</p>
75
+ <div class="flex space-x-2">
76
+ <div class="w-8 h-8 rounded-full bg-secondary-300"></div>
77
+ <div class="w-8 h-8 rounded-full bg-secondary-500"></div>
78
+ <div class="w-8 h-8 rounded-full bg-secondary-700"></div>
79
+ <div class="w-8 h-8 rounded-full bg-secondary-900"></div>
80
+ </div>
81
+ </div>
82
+ </div>
83
+
84
+ <!-- Color Card 3 -->
85
+ <div class="bg-white rounded-xl shadow-lg overflow-hidden transition-all hover:scale-105 hover:shadow-xl">
86
+ <div class="h-48 bg-gradient-to-r from-primary-400 to-secondary-400"></div>
87
+ <div class="p-6">
88
+ <h3 class="text-xl font-semibold text-primary-800 mb-2">Combination</h3>
89
+ <p class="text-secondary-600 mb-4">How primary and secondary colors work together</p>
90
+ <div class="flex space-x-2">
91
+ <div class="w-8 h-8 rounded-full bg-primary-500"></div>
92
+ <div class="w-8 h-8 rounded-full bg-secondary-500"></div>
93
+ <div class="w-8 h-8 rounded-full bg-primary-300"></div>
94
+ <div class="w-8 h-8 rounded-full bg-secondary-300"></div>
95
+ </div>
96
+ </div>
97
+ </div>
98
+ </div>
99
+
100
+ <div class="mt-16 bg-white rounded-xl shadow-lg p-8 max-w-4xl mx-auto">
101
+ <h2 class="text-3xl font-bold text-primary-800 mb-6">Color Usage Examples</h2>
102
+ <div class="space-y-6">
103
+ <div>
104
+ <h3 class="text-xl font-semibold text-secondary-700 mb-3">Buttons</h3>
105
+ <div class="flex flex-wrap gap-4">
106
+ <button class="px-6 py-3 rounded-lg bg-primary-500 text-white hover:bg-primary-600 transition-colors">Primary Action</button>
107
+ <button class="px-6 py-3 rounded-lg bg-secondary-500 text-white hover:bg-secondary-600 transition-colors">Secondary Action</button>
108
+ <button class="px-6 py-3 rounded-lg border-2 border-primary-500 text-primary-500 hover:bg-primary-50 transition-colors">Outline</button>
109
+ </div>
110
+ </div>
111
+
112
+ <div>
113
+ <h3 class="text-xl font-semibold text-secondary-700 mb-3">Alerts</h3>
114
+ <div class="space-y-3">
115
+ <div class="p-4 rounded-lg bg-primary-100 text-primary-800 border-l-4 border-primary-500">
116
+ <div class="flex items-center">
117
+ <i data-feather="info" class="mr-2"></i>
118
+ <span>This is an informational message</span>
119
+ </div>
120
+ </div>
121
+ <div class="p-4 rounded-lg bg-secondary-100 text-secondary-800 border-l-4 border-secondary-500">
122
+ <div class="flex items-center">
123
+ <i data-feather="alert-circle" class="mr-2"></i>
124
+ <span>This is a secondary alert</span>
125
+ </div>
126
+ </div>
127
+ </div>
128
+ </div>
129
+ </div>
130
+ </div>
131
+ </main>
132
+
133
+ <footer class="bg-primary-900 text-white py-8 mt-16">
134
+ <div class="container mx-auto px-4 text-center">
135
+ <p>© 2023 PixelPulse Palette Explorer. All colors reserved.</p>
136
+ <div class="flex justify-center space-x-4 mt-4">
137
+ <a href="#" class="hover:text-secondary-300 transition-colors">
138
+ <i data-feather="github"></i>
139
+ </a>
140
+ <a href="#" class="hover:text-secondary-300 transition-colors">
141
+ <i data-feather="twitter"></i>
142
+ </a>
143
+ <a href="#" class="hover:text-secondary-300 transition-colors">
144
+ <i data-feather="instagram"></i>
145
+ </a>
146
+ </div>
147
+ </div>
148
+ </footer>
149
+
150
+ <script>
151
+ feather.replace();
152
+ </script>
153
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
154
+ </body>
155
+ </html>
script.js ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ document.addEventListener('DOMContentLoaded', function() {
2
+ // Initialize tooltips for color swatches
3
+ const colorSwatches = document.querySelectorAll('.color-swatch');
4
+
5
+ colorSwatches.forEach(swatch => {
6
+ const color = swatch.style.backgroundColor;
7
+ swatch.setAttribute('title', color);
8
+
9
+ swatch.addEventListener('click', function() {
10
+ navigator.clipboard.writeText(color).then(() => {
11
+ const originalText = swatch.textContent;
12
+ swatch.textContent = 'Copied!';
13
+ setTimeout(() => {
14
+ swatch.textContent = originalText;
15
+ }, 2000);
16
+ });
17
+ });
18
+ });
19
+
20
+ // Smooth scroll for anchor links
21
+ document.querySelectorAll('a[href^="#"]').forEach(anchor => {
22
+ anchor.addEventListener('click', function(e) {
23
+ e.preventDefault();
24
+ document.querySelector(this.getAttribute('href')).scrollIntoView({
25
+ behavior: 'smooth'
26
+ });
27
+ });
28
+ });
29
+ });
style.css CHANGED
@@ -1,28 +1,44 @@
 
 
1
  body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
 
 
 
 
 
4
  }
5
 
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
9
  }
10
 
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
  }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
  }
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
 
 
 
 
 
 
 
 
 
 
 
 
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
+ }
6
+
7
+ /* Custom scrollbar */
8
+ ::-webkit-scrollbar {
9
+ width: 8px;
10
+ height: 8px;
11
  }
12
 
13
+ ::-webkit-scrollbar-track {
14
+ background: #f1f1f1;
 
15
  }
16
 
17
+ ::-webkit-scrollbar-thumb {
18
+ background: #888;
19
+ border-radius: 4px;
 
 
20
  }
21
 
22
+ ::-webkit-scrollbar-thumb:hover {
23
+ background: #555;
 
 
 
 
24
  }
25
 
26
+ /* Animation for color cards */
27
+ @keyframes pulse {
28
+ 0% {
29
+ transform: scale(1);
30
+ opacity: 1;
31
+ }
32
+ 50% {
33
+ transform: scale(1.05);
34
+ opacity: 0.8;
35
+ }
36
+ 100% {
37
+ transform: scale(1);
38
+ opacity: 1;
39
+ }
40
  }
41
+
42
+ .hover\:animate-pulse:hover {
43
+ animation: pulse 2s infinite;
44
+ }