bmadityas commited on
Commit
1cd97be
·
verified ·
1 Parent(s): 3437d19
Files changed (6) hide show
  1. README.md +8 -5
  2. components/footer.js +38 -0
  3. components/header.js +49 -0
  4. index.html +125 -19
  5. script.js +68 -0
  6. style.css +18 -24
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Rainbow Unicorn Dashboard
3
- emoji: 🌖
4
- colorFrom: purple
5
- colorTo: indigo
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: Rainbow Unicorn Dashboard 🦄
3
+ colorFrom: yellow
4
+ colorTo: red
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,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomFooter extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ :host {
7
+ display: block;
8
+ width: 100%;
9
+ }
10
+ footer {
11
+ background: white;
12
+ border-top: 1px solid rgba(0,0,0,0.1);
13
+ }
14
+ </style>
15
+ <footer class="py-6 mt-8">
16
+ <div class="container mx-auto px-4">
17
+ <div class="flex flex-col md:flex-row justify-between items-center">
18
+ <div class="mb-4 md:mb-0">
19
+ <p class="text-sm text-gray-600">© 2023 Rainbow Unicorn Dashboard. All magic reserved.</p>
20
+ </div>
21
+ <div class="flex space-x-4">
22
+ <a href="#" class="text-gray-500 hover:text-purple-500 transition">
23
+ <i data-feather="twitter"></i>
24
+ </a>
25
+ <a href="#" class="text-gray-500 hover:text-purple-500 transition">
26
+ <i data-feather="instagram"></i>
27
+ </a>
28
+ <a href="#" class="text-gray-500 hover:text-purple-500 transition">
29
+ <i data-feather="github"></i>
30
+ </a>
31
+ </div>
32
+ </div>
33
+ </div>
34
+ </footer>
35
+ `;
36
+ }
37
+ }
38
+ customElements.define('custom-footer', CustomFooter);
components/header.js ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomHeader extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ :host {
7
+ display: block;
8
+ width: 100%;
9
+ }
10
+ header {
11
+ background: white;
12
+ box-shadow: 0 2px 10px rgba(0,0,0,0.1);
13
+ }
14
+ .rainbow-text {
15
+ background: linear-gradient(
16
+ 90deg,
17
+ rgba(255, 0, 0, 1) 0%,
18
+ rgba(255, 154, 0, 1) 20%,
19
+ rgba(208, 222, 33, 1) 40%,
20
+ rgba(79, 220, 74, 1) 60%,
21
+ rgba(63, 218, 216, 1) 80%,
22
+ rgba(47, 201, 226, 1) 100%
23
+ );
24
+ -webkit-background-clip: text;
25
+ background-clip: text;
26
+ color: transparent;
27
+ }
28
+ </style>
29
+ <header class="py-4">
30
+ <div class="container mx-auto px-4 flex justify-between items-center">
31
+ <div class="flex items-center">
32
+ <i data-feather="award" class="mr-2" style="width: 28px; height: 28px;"></i>
33
+ <h1 class="text-2xl font-bold rainbow-text">Rainbow Unicorn Dashboard</h1>
34
+ </div>
35
+ <nav class="hidden md:flex space-x-6">
36
+ <a href="#" class="hover:text-purple-500 transition">Home</a>
37
+ <a href="#" class="hover:text-purple-500 transition">Magic</a>
38
+ <a href="#" class="hover:text-purple-500 transition">Rainbows</a>
39
+ <a href="#" class="hover:text-purple-500 transition">Settings</a>
40
+ </nav>
41
+ <button class="md:hidden">
42
+ <i data-feather="menu"></i>
43
+ </button>
44
+ </div>
45
+ </header>
46
+ `;
47
+ }
48
+ }
49
+ customElements.define('custom-header', CustomHeader);
index.html CHANGED
@@ -1,19 +1,125 @@
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">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Rainbow Unicorn Dashboard</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
+ <style>
12
+ .rainbow-gradient {
13
+ background: linear-gradient(
14
+ 90deg,
15
+ rgba(255, 0, 0, 1) 0%,
16
+ rgba(255, 154, 0, 1) 10%,
17
+ rgba(208, 222, 33, 1) 20%,
18
+ rgba(79, 220, 74, 1) 30%,
19
+ rgba(63, 218, 216, 1) 40%,
20
+ rgba(47, 201, 226, 1) 50%,
21
+ rgba(28, 127, 238, 1) 60%,
22
+ rgba(95, 21, 242, 1) 70%,
23
+ rgba(186, 12, 248, 1) 80%,
24
+ rgba(251, 7, 217, 1) 90%,
25
+ rgba(255, 0, 0, 1) 100%
26
+ );
27
+ }
28
+ </style>
29
+ </head>
30
+ <body class="bg-gray-100 min-h-screen">
31
+ <custom-header></custom-header>
32
+
33
+ <main class="container mx-auto px-4 py-8">
34
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
35
+ <!-- Rainbow Stats Card -->
36
+ <div class="bg-white rounded-xl shadow-md overflow-hidden rainbow-gradient p-1">
37
+ <div class="bg-white p-6 rounded-lg">
38
+ <div class="flex items-center">
39
+ <i data-feather="activity" class="text-purple-500 mr-3"></i>
40
+ <h3 class="text-lg font-semibold">Unicorn Metrics</h3>
41
+ </div>
42
+ <div class="mt-4">
43
+ <div class="flex justify-between py-2 border-b">
44
+ <span>Magic Power</span>
45
+ <span class="font-bold">87%</span>
46
+ </div>
47
+ <div class="flex justify-between py-2 border-b">
48
+ <span>Rainbow Production</span>
49
+ <span class="font-bold">64%</span>
50
+ </div>
51
+ <div class="flex justify-between py-2">
52
+ <span>Happiness Level</span>
53
+ <span class="font-bold">99%</span>
54
+ </div>
55
+ </div>
56
+ </div>
57
+ </div>
58
+
59
+ <!-- Image Card -->
60
+ <div class="bg-white rounded-xl shadow-md overflow-hidden">
61
+ <div class="p-6">
62
+ <h3 class="text-lg font-semibold mb-4">Your Unicorn Companion</h3>
63
+ <img src="http://static.photos/fantasy/640x360/42" alt="Unicorn" class="w-full h-48 object-cover rounded-lg">
64
+ <button class="mt-4 w-full py-2 rainbow-gradient text-white rounded-lg font-bold hover:opacity-90 transition">
65
+ Pet the Unicorn
66
+ </button>
67
+ </div>
68
+ </div>
69
+
70
+ <!-- Rainbow Progress -->
71
+ <div class="bg-white rounded-xl shadow-md overflow-hidden">
72
+ <div class="p-6">
73
+ <h3 class="text-lg font-semibold mb-4">Rainbow Progress</h3>
74
+ <div class="space-y-4">
75
+ <div>
76
+ <div class="flex justify-between mb-1">
77
+ <span>Red</span>
78
+ <span>75%</span>
79
+ </div>
80
+ <div class="w-full bg-gray-200 rounded-full h-2.5">
81
+ <div class="bg-red-500 h-2.5 rounded-full" style="width: 75%"></div>
82
+ </div>
83
+ </div>
84
+ <div>
85
+ <div class="flex justify-between mb-1">
86
+ <span>Orange</span>
87
+ <span>60%</span>
88
+ </div>
89
+ <div class="w-full bg-gray-200 rounded-full h-2.5">
90
+ <div class="bg-orange-500 h-2.5 rounded-full" style="width: 60%"></div>
91
+ </div>
92
+ </div>
93
+ <div>
94
+ <div class="flex justify-between mb-1">
95
+ <span>Yellow</span>
96
+ <span>85%</span>
97
+ </div>
98
+ <div class="w-full bg-gray-200 rounded-full h-2.5">
99
+ <div class="bg-yellow-400 h-2.5 rounded-full" style="width: 85%"></div>
100
+ </div>
101
+ </div>
102
+ </div>
103
+ </div>
104
+ </div>
105
+ </div>
106
+
107
+ <!-- Rainbow Chart -->
108
+ <div class="mt-8 bg-white rounded-xl shadow-md overflow-hidden p-6">
109
+ <h3 class="text-lg font-semibold mb-4">Weekly Rainbow Production</h3>
110
+ <div class="h-64">
111
+ <canvas id="rainbowChart"></canvas>
112
+ </div>
113
+ </div>
114
+ </main>
115
+
116
+ <custom-footer></custom-footer>
117
+
118
+ <script src="components/header.js"></script>
119
+ <script src="components/footer.js"></script>
120
+ <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
121
+ <script src="script.js"></script>
122
+ <script>feather.replace();</script>
123
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
124
+ </body>
125
+ </html>
script.js ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ document.addEventListener('DOMContentLoaded', function() {
2
+ // Initialize Chart.js
3
+ const ctx = document.getElementById('rainbowChart').getContext('2d');
4
+ const rainbowChart = new Chart(ctx, {
5
+ type: 'line',
6
+ data: {
7
+ labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
8
+ datasets: [
9
+ {
10
+ label: 'Rainbow Intensity',
11
+ data: [12, 19, 3, 17, 6, 3, 20],
12
+ backgroundColor: 'rgba(255, 99, 132, 0.2)',
13
+ borderColor: 'rgba(255, 99, 132, 1)',
14
+ borderWidth: 2,
15
+ tension: 0.4
16
+ },
17
+ {
18
+ label: 'Magic Sparkles',
19
+ data: [2, 9, 13, 7, 16, 13, 10],
20
+ backgroundColor: 'rgba(54, 162, 235, 0.2)',
21
+ borderColor: 'rgba(54, 162, 235, 1)',
22
+ borderWidth: 2,
23
+ tension: 0.4
24
+ }
25
+ ]
26
+ },
27
+ options: {
28
+ responsive: true,
29
+ maintainAspectRatio: false,
30
+ scales: {
31
+ y: {
32
+ beginAtZero: true,
33
+ grid: {
34
+ color: 'rgba(0, 0, 0, 0.05)'
35
+ }
36
+ },
37
+ x: {
38
+ grid: {
39
+ color: 'rgba(0, 0, 0, 0.05)'
40
+ }
41
+ }
42
+ },
43
+ plugins: {
44
+ legend: {
45
+ labels: {
46
+ font: {
47
+ family: "'Comic Sans MS', cursive, sans-serif"
48
+ }
49
+ }
50
+ }
51
+ }
52
+ }
53
+ });
54
+
55
+ // Make unicorn pet button interactive
56
+ const petButton = document.querySelector('button');
57
+ petButton.addEventListener('click', function() {
58
+ const messages = [
59
+ "The unicorn nuzzles you affectionately!",
60
+ "Sparkles fly everywhere! ✨",
61
+ "The unicorn does a happy dance!",
62
+ "You hear magical chimes in the distance..."
63
+ ];
64
+ const randomMessage = messages[Math.floor(Math.random() * messages.length)];
65
+
66
+ alert(randomMessage);
67
+ });
68
+ });
style.css CHANGED
@@ -1,28 +1,22 @@
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
+ /* Rainbow glow animation */
2
+ @keyframes rainbow-glow {
3
+ 0% { box-shadow: 0 0 10px rgba(255, 0, 0, 0.7); }
4
+ 10% { box-shadow: 0 0 10px rgba(255, 154, 0, 0.7); }
5
+ 20% { box-shadow: 0 0 10px rgba(208, 222, 33, 0.7); }
6
+ 30% { box-shadow: 0 0 10px rgba(79, 220, 74, 0.7); }
7
+ 40% { box-shadow: 0 0 10px rgba(63, 218, 216, 0.7); }
8
+ 50% { box-shadow: 0 0 10px rgba(47, 201, 226, 0.7); }
9
+ 60% { box-shadow: 0 0 10px rgba(28, 127, 238, 0.7); }
10
+ 70% { box-shadow: 0 0 10px rgba(95, 21, 242, 0.7); }
11
+ 80% { box-shadow: 0 0 10px rgba(186, 12, 248, 0.7); }
12
+ 90% { box-shadow: 0 0 10px rgba(251, 7, 217, 0.7); }
13
+ 100% { box-shadow: 0 0 10px rgba(255, 0, 0, 0.7); }
14
  }
15
 
16
+ .rainbow-glow {
17
+ animation: rainbow-glow 5s infinite;
 
 
 
18
  }
19
 
20
+ body {
21
+ font-family: 'Comic Sans MS', cursive, sans-serif;
22
+ }