josejuan314 commited on
Commit
bc571a4
verified
1 Parent(s): 251fd31

undefined - Initial Deployment

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +196 -19
  3. prompts.txt +0 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Tag Selector
3
- emoji: 馃悽
4
- colorFrom: pink
5
- colorTo: blue
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: tag-selector
3
+ emoji: 馃惓
4
+ colorFrom: yellow
5
+ colorTo: red
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,196 @@
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="es">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Selector de Palabras Interactivo</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ .word-list {
11
+ min-height: 300px;
12
+ max-height: 400px;
13
+ overflow-y: auto;
14
+ }
15
+
16
+ .word-item {
17
+ transition: all 0.2s ease;
18
+ }
19
+
20
+ .word-item:hover {
21
+ transform: scale(1.02);
22
+ }
23
+
24
+ .modal-enter {
25
+ animation: modalEnter 0.3s ease-out forwards;
26
+ }
27
+
28
+ @keyframes modalEnter {
29
+ from {
30
+ opacity: 0;
31
+ transform: translateY(-50px);
32
+ }
33
+ to {
34
+ opacity: 1;
35
+ transform: translateY(0);
36
+ }
37
+ }
38
+
39
+ .shake {
40
+ animation: shake 0.5s;
41
+ }
42
+
43
+ @keyframes shake {
44
+ 0% { transform: translateX(0); }
45
+ 25% { transform: translateX(-5px); }
46
+ 50% { transform: translateX(5px); }
47
+ 75% { transform: translateX(-5px); }
48
+ 100% { transform: translateX(0); }
49
+ }
50
+ </style>
51
+ </head>
52
+ <body class="bg-gray-100 min-h-screen flex items-center justify-center p-4">
53
+ <div class="text-center">
54
+ <button id="openModalBtn" class="bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-6 rounded-lg shadow-lg transform transition hover:scale-105 focus:outline-none">
55
+ <i class="fas fa-list mr-2"></i> Seleccionar Palabras
56
+ </button>
57
+ <p class="mt-4 text-gray-600">Haz clic para abrir el selector de palabras</p>
58
+ </div>
59
+
60
+ <!-- Modal -->
61
+ <div id="modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 hidden">
62
+ <div class="bg-white rounded-xl shadow-2xl w-full max-w-4xl modal-enter">
63
+ <!-- Modal Header -->
64
+ <div class="border-b px-6 py-4 flex justify-between items-center bg-gray-50 rounded-t-xl">
65
+ <h2 class="text-xl font-bold text-gray-800">Selecciona tus palabras preferidas</h2>
66
+ <button id="closeModalBtn" class="text-gray-500 hover:text-gray-700 focus:outline-none">
67
+ <i class="fas fa-times text-xl"></i>
68
+ </button>
69
+ </div>
70
+
71
+ <!-- Modal Content -->
72
+ <div class="p-6">
73
+ <div class="flex flex-col md:flex-row gap-6">
74
+ <!-- Left Column (Available Words) -->
75
+ <div class="flex-1">
76
+ <h3 class="font-semibold text-lg text-green-700 mb-3">Palabras disponibles</h3>
77
+ <div class="word-list bg-gray-50 p-3 rounded-lg border border-green-200">
78
+ <ul id="leftList" class="space-y-2">
79
+ <!-- Words will be added here by JavaScript -->
80
+ </ul>
81
+ </div>
82
+ </div>
83
+
84
+ <!-- Right Column (Selected Words) -->
85
+ <div class="flex-1">
86
+ <h3 class="font-semibold text-lg text-gray-700 mb-3">Palabras seleccionadas</h3>
87
+ <div class="word-list bg-gray-50 p-3 rounded-lg border border-gray-200">
88
+ <ul id="rightList" class="space-y-2">
89
+ <!-- Words will be added here by JavaScript -->
90
+ </ul>
91
+ </div>
92
+ </div>
93
+ </div>
94
+ </div>
95
+
96
+ <!-- Modal Footer -->
97
+ <div class="border-t px-6 py-4 bg-gray-50 flex justify-end gap-4 rounded-b-xl">
98
+ <button id="cancelBtn" class="px-4 py-2 text-gray-600 hover:text-gray-800 transition">
99
+ Cancelar
100
+ </button>
101
+ <button id="acceptBtn" class="px-4 py-2 bg-blue-600 rounded-lg text-white hover:bg-blue-700 transition">
102
+ Aceptar
103
+ </button>
104
+ </div>
105
+ </div>
106
+ </div>
107
+
108
+ <script>
109
+ document.addEventListener('DOMContentLoaded', function() {
110
+ // Sample words
111
+ const words = [
112
+ "Creatividad", "Innovaci贸n", "Tecnolog铆a", "Dise帽o", "Arte",
113
+ "M煤sica", "Literatura", "Deporte", "Viaje", "Naturaleza",
114
+ "Ciencia", "Matem谩ticas", "Historia", "Filosof铆a", "Cultura",
115
+ "Gastronom铆a", "Moda", "Meditaci贸n", "Productividad", "Aprendizaje"
116
+ ];
117
+
118
+ // DOM Elements
119
+ const modal = document.getElementById('modal');
120
+ const openModalBtn = document.getElementById('openModalBtn');
121
+ const closeModalBtn = document.getElementById('closeModalBtn');
122
+ const leftList = document.getElementById('leftList');
123
+ const rightList = document.getElementById('rightList');
124
+ const cancelBtn = document.getElementById('cancelBtn');
125
+ const acceptBtn = document.getElementById('acceptBtn');
126
+
127
+ // Initialize the word lists
128
+ function initializeLists() {
129
+ leftList.innerHTML = '';
130
+ rightList.innerHTML = '';
131
+
132
+ words.forEach(word => {
133
+ const listItem = createWordItem(word);
134
+ leftList.appendChild(listItem);
135
+ });
136
+ }
137
+
138
+ // Create a word item element
139
+ function createWordItem(text) {
140
+ const li = document.createElement('li');
141
+ li.className = 'word-item bg-white p-3 rounded-lg shadow-sm cursor-pointer';
142
+ li.setAttribute('data-word', text);
143
+ li.textContent = text;
144
+
145
+ // For left list (green)
146
+ if (li.parentElement === leftList || !li.parentElement) {
147
+ li.classList.add('border-l-4', 'border-green-500', 'hover:bg-green-50');
148
+ } else {
149
+ li.classList.add('border-l-4', 'border-gray-400', 'hover:bg-gray-50');
150
+ }
151
+
152
+ li.addEventListener('click', function() {
153
+ if (this.parentElement === leftList) {
154
+ this.classList.remove('border-green-500', 'hover:bg-green-50');
155
+ this.classList.add('border-gray-400', 'hover:bg-gray-50');
156
+ rightList.appendChild(this);
157
+ } else {
158
+ this.classList.remove('border-gray-400', 'hover:bg-gray-50');
159
+ this.classList.add('border-green-500', 'hover:bg-green-50');
160
+ leftList.appendChild(this);
161
+ }
162
+ });
163
+
164
+ return li;
165
+ }
166
+
167
+ // Event Listeners
168
+ openModalBtn.addEventListener('click', function() {
169
+ modal.classList.remove('hidden');
170
+ initializeLists();
171
+ });
172
+
173
+ closeModalBtn.addEventListener('click', function() {
174
+ modal.classList.add('hidden');
175
+ });
176
+
177
+ cancelBtn.addEventListener('click', function() {
178
+ modal.classList.add('hidden');
179
+ });
180
+
181
+ acceptBtn.addEventListener('click', function() {
182
+ const selectedWords = Array.from(rightList.children).map(item => item.getAttribute('data-word'));
183
+ alert(`Has seleccionado: ${selectedWords.join(', ')}`);
184
+ modal.classList.add('hidden');
185
+ });
186
+
187
+ // Close modal when clicking outside
188
+ modal.addEventListener('click', function(e) {
189
+ if (e.target === modal) {
190
+ modal.classList.add('hidden');
191
+ }
192
+ });
193
+ });
194
+ </script>
195
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 馃К <a href="https://enzostvs-deepsite.hf.space?remix=josejuan314/tag-selector" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
196
+ </html>
prompts.txt ADDED
File without changes