Spaces:
Running
Running
Add 3 files
Browse files- README.md +6 -4
- index.html +592 -19
- prompts.txt +1 -0
README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
colorTo: green
|
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: chandelier-events
|
3 |
+
emoji: 🐳
|
4 |
+
colorFrom: red
|
5 |
colorTo: green
|
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,592 @@
|
|
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>Event Management System</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 |
+
.custom-checkbox:checked {
|
11 |
+
background-color: #4f46e5;
|
12 |
+
}
|
13 |
+
|
14 |
+
#eventModal {
|
15 |
+
transition: all 0.3s ease;
|
16 |
+
}
|
17 |
+
|
18 |
+
.month-nav:hover {
|
19 |
+
background-color: #4f46e5;
|
20 |
+
color: white;
|
21 |
+
}
|
22 |
+
|
23 |
+
.event-day {
|
24 |
+
background-color: #e0e7ff;
|
25 |
+
}
|
26 |
+
|
27 |
+
.has-event {
|
28 |
+
position: relative;
|
29 |
+
}
|
30 |
+
|
31 |
+
.has-event::after {
|
32 |
+
content: '';
|
33 |
+
position: absolute;
|
34 |
+
bottom: 5px;
|
35 |
+
left: 50%;
|
36 |
+
transform: translateX(-50%);
|
37 |
+
width: 6px;
|
38 |
+
height: 6px;
|
39 |
+
background-color: #4f46e5;
|
40 |
+
border-radius: 50%;
|
41 |
+
}
|
42 |
+
|
43 |
+
.floating-btn {
|
44 |
+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
45 |
+
transition: all 0.3s ease;
|
46 |
+
}
|
47 |
+
|
48 |
+
.floating-btn:hover {
|
49 |
+
transform: translateY(-3px);
|
50 |
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
51 |
+
}
|
52 |
+
|
53 |
+
.event-card:hover {
|
54 |
+
transform: translateY(-3px);
|
55 |
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
|
56 |
+
}
|
57 |
+
</style>
|
58 |
+
</head>
|
59 |
+
<body class="bg-gray-50">
|
60 |
+
<!-- Header -->
|
61 |
+
<header class="bg-indigo-600 text-white shadow-lg">
|
62 |
+
<div class="container mx-auto px-4 py-6">
|
63 |
+
<div class="flex justify-between items-center">
|
64 |
+
<h1 class="text-2xl md:text-3xl font-bold">Local Event Calendar</h1>
|
65 |
+
<div class="hidden md:block">
|
66 |
+
<input type="text" placeholder="Search events..." class="px-4 py-2 rounded-full text-gray-800 focus:outline-none focus:ring-2 focus:ring-indigo-300">
|
67 |
+
</div>
|
68 |
+
</div>
|
69 |
+
<div class="flex mt-4 space-x-4">
|
70 |
+
<button class="px-4 py-2 rounded-full bg-indigo-700 hover:bg-indigo-800 transition">All Events</button>
|
71 |
+
<button class="px-4 py-2 rounded-full hover:bg-indigo-700 transition">Music</button>
|
72 |
+
<button class="px-4 py-2 rounded-full hover:bg-indigo-700 transition">Sports</button>
|
73 |
+
<button class="px-4 py-2 rounded-full hover:bg-indigo-700 transition">Art</button>
|
74 |
+
</div>
|
75 |
+
</div>
|
76 |
+
</header>
|
77 |
+
|
78 |
+
<!-- Main Content -->
|
79 |
+
<main class="container mx-auto px-4 py-8">
|
80 |
+
<div class="flex flex-col lg:flex-row gap-8">
|
81 |
+
<!-- Calendar Section -->
|
82 |
+
<div class="lg:w-2/3">
|
83 |
+
<div class="bg-white rounded-lg shadow-md p-6 mb-8">
|
84 |
+
<div class="flex justify-between items-center mb-6">
|
85 |
+
<h2 class="text-xl font-bold text-gray-800">Event Calendar</h2>
|
86 |
+
<div class="flex space-x-2">
|
87 |
+
<button onclick="previousMonth()" class="month-nav px-3 py-1 rounded-lg bg-indigo-100 text-indigo-600"><i class="fas fa-chevron-left"></i></button>
|
88 |
+
<h3 id="currentMonthYear" class="px-4 py-1 font-semibold text-gray-700">June 2023</h3>
|
89 |
+
<button onclick="nextMonth()" class="month-nav px-3 py-1 rounded-lg bg-indigo-100 text-indigo-600"><i class="fas fa-chevron-right"></i></button>
|
90 |
+
</div>
|
91 |
+
</div>
|
92 |
+
<div class="grid grid-cols-7 gap-2 mb-2">
|
93 |
+
<div class="text-center font-semibold text-gray-500 py-2">Sun</div>
|
94 |
+
<div class="text-center font-semibold text-gray-500 py-2">Mon</div>
|
95 |
+
<div class="text-center font-semibold text-gray-500 py-2">Tue</div>
|
96 |
+
<div class="text-center font-semibold text-gray-500 py-2">Wed</div>
|
97 |
+
<div class="text-center font-semibold text-gray-500 py-2">Thu</div>
|
98 |
+
<div class="text-center font-semibold text-gray-500 py-2">Fri</div>
|
99 |
+
<div class="text-center font-semibold text-gray-500 py-2">Sat</div>
|
100 |
+
</div>
|
101 |
+
<div id="calendarDays" class="grid grid-cols-7 gap-2">
|
102 |
+
<!-- Calendar days will be populated by JavaScript -->
|
103 |
+
</div>
|
104 |
+
</div>
|
105 |
+
|
106 |
+
<!-- Events List Section -->
|
107 |
+
<div id="eventsList" class="space-y-4">
|
108 |
+
<!-- Events will be displayed here -->
|
109 |
+
</div>
|
110 |
+
</div>
|
111 |
+
|
112 |
+
<!-- Sidebar -->
|
113 |
+
<div class="lg:w-1/3">
|
114 |
+
<div class="bg-white rounded-lg shadow-md p-6 mb-6">
|
115 |
+
<h2 class="text-xl font-bold text-gray-800 mb-4">Featured Venues</h2>
|
116 |
+
<div class="space-y-4">
|
117 |
+
<div class="flex items-center space-x-3">
|
118 |
+
<div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center">
|
119 |
+
<i class="fas fa-music text-indigo-600"></i>
|
120 |
+
</div>
|
121 |
+
<div>
|
122 |
+
<h3 class="font-semibold">The Jazz Club</h3>
|
123 |
+
<p class="text-sm text-gray-500">Live music venue</p>
|
124 |
+
</div>
|
125 |
+
</div>
|
126 |
+
<div class="flex items-center space-x-3">
|
127 |
+
<div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center">
|
128 |
+
<i class="fas fa-theater-masks text-indigo-600"></i>
|
129 |
+
</div>
|
130 |
+
<div>
|
131 |
+
<h3 class="font-semibold">City Theater</h3>
|
132 |
+
<p class="text-sm text-gray-500">Drama & plays</p>
|
133 |
+
</div>
|
134 |
+
</div>
|
135 |
+
<div class="flex items-center space-x-3">
|
136 |
+
<div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center">
|
137 |
+
<i class="fas fa-futbol text-indigo-600"></i>
|
138 |
+
</div>
|
139 |
+
<div>
|
140 |
+
<h3 class="font-semibold">Sports Arena</h3>
|
141 |
+
<p class="text-sm text-gray-500">Athletic events</p>
|
142 |
+
</div>
|
143 |
+
</div>
|
144 |
+
</div>
|
145 |
+
</div>
|
146 |
+
|
147 |
+
<div class="bg-white rounded-lg shadow-md p-6">
|
148 |
+
<h2 class="text-xl font-bold text-gray-800 mb-4">Recently Added</h2>
|
149 |
+
<div id="recentEvents" class="space-y-4">
|
150 |
+
<!-- Recent events will be shown here -->
|
151 |
+
</div>
|
152 |
+
</div>
|
153 |
+
</div>
|
154 |
+
</div>
|
155 |
+
</main>
|
156 |
+
|
157 |
+
<!-- Floating Add Event Button -->
|
158 |
+
<div id="addEventBtn" class="fixed bottom-6 right-6 bg-indigo-600 text-white rounded-full w-16 h-16 flex items-center justify-center cursor-pointer shadow-lg floating-btn z-50">
|
159 |
+
<i class="fas fa-plus text-2xl"></i>
|
160 |
+
</div>
|
161 |
+
|
162 |
+
<!-- Event Form Modal -->
|
163 |
+
<div id="eventModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
|
164 |
+
<div class="bg-white rounded-lg shadow-xl w-full max-w-md mx-4">
|
165 |
+
<div class="flex justify-between items-center border-b px-6 py-4">
|
166 |
+
<h3 class="text-lg font-semibold text-gray-800">Add New Event</h3>
|
167 |
+
<button id="closeModal" class="text-gray-500 hover:text-gray-700">
|
168 |
+
<i class="fas fa-times"></i>
|
169 |
+
</button>
|
170 |
+
</div>
|
171 |
+
<div class="p-6">
|
172 |
+
<form id="eventForm" class="space-y-4">
|
173 |
+
<div>
|
174 |
+
<label for="eventName" class="block text-sm font-medium text-gray-700 mb-1">Event Name</label>
|
175 |
+
<input type="text" id="eventName" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500" required>
|
176 |
+
</div>
|
177 |
+
|
178 |
+
<div>
|
179 |
+
<label for="artistName" class="block text-sm font-medium text-gray-700 mb-1">Performer/Artist</label>
|
180 |
+
<input type="text" id="artistName" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500" required>
|
181 |
+
</div>
|
182 |
+
|
183 |
+
<div>
|
184 |
+
<label for="eventDate" class="block text-sm font-medium text-gray-700 mb-1">Date & Time</label>
|
185 |
+
<input type="datetime-local" id="eventDate" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500" required>
|
186 |
+
</div>
|
187 |
+
|
188 |
+
<div>
|
189 |
+
<label for="venueName" class="block text-sm font-medium text-gray-700 mb-1">Venue Name</label>
|
190 |
+
<input type="text" id="venueName" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500" required>
|
191 |
+
</div>
|
192 |
+
|
193 |
+
<div>
|
194 |
+
<label for="ticketPrice" class="block text-sm font-medium text-gray-700 mb-1">Ticket Price ($)</label>
|
195 |
+
<input type="number" id="ticketPrice" min="0" step="0.01" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500">
|
196 |
+
</div>
|
197 |
+
|
198 |
+
<div>
|
199 |
+
<label for="eventUrl" class="block text-sm font-medium text-gray-700 mb-1">Event Website URL</label>
|
200 |
+
<input type="url" id="eventUrl" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500">
|
201 |
+
</div>
|
202 |
+
|
203 |
+
<div class="flex items-center space-x-4">
|
204 |
+
<div class="flex items-center">
|
205 |
+
<input type="radio" id="statusActive" name="eventStatus" value="active" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500" checked>
|
206 |
+
<label for="statusActive" class="ml-2 block text-sm text-gray-700">Active</label>
|
207 |
+
</div>
|
208 |
+
<div class="flex items-center">
|
209 |
+
<input type="radio" id="statusCancelled" name="eventStatus" value="cancelled" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500">
|
210 |
+
<label for="statusCancelled" class="ml-2 block text-sm text-gray-700">Cancelled</label>
|
211 |
+
</div>
|
212 |
+
</div>
|
213 |
+
|
214 |
+
<div class="flex justify-end space-x-3 pt-4">
|
215 |
+
<button type="button" id="cancelBtn" class="px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50">Cancel</button>
|
216 |
+
<button type="submit" class="px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2">Add Event</button>
|
217 |
+
</div>
|
218 |
+
</form>
|
219 |
+
</div>
|
220 |
+
</div>
|
221 |
+
</div>
|
222 |
+
|
223 |
+
<script>
|
224 |
+
// Sample events data
|
225 |
+
let events = [
|
226 |
+
{
|
227 |
+
id: 1,
|
228 |
+
name: "Jazz Night with Sarah Smith",
|
229 |
+
artist: "Sarah Smith Quartet",
|
230 |
+
date: "2023-06-15T20:00:00",
|
231 |
+
venue: "The Jazz Club",
|
232 |
+
price: 25.00,
|
233 |
+
status: "active",
|
234 |
+
url: "https://thejazzclub.com/events"
|
235 |
+
},
|
236 |
+
{
|
237 |
+
id: 2,
|
238 |
+
name: "Rock Festival 2023",
|
239 |
+
artist: "Various Artists",
|
240 |
+
date: "2023-06-22T15:00:00",
|
241 |
+
venue: "City Park",
|
242 |
+
price: 45.00,
|
243 |
+
status: "active",
|
244 |
+
url: "https://rockfest.city"
|
245 |
+
},
|
246 |
+
{
|
247 |
+
id: 3,
|
248 |
+
name: "Modern Art Exhibition",
|
249 |
+
artist: "Contemporary Artists",
|
250 |
+
date: "2023-06-10T10:00:00",
|
251 |
+
venue: "City Art Gallery",
|
252 |
+
price: 12.50,
|
253 |
+
status: "active",
|
254 |
+
url: "https://cityartgallery.net"
|
255 |
+
},
|
256 |
+
{
|
257 |
+
id: 4,
|
258 |
+
name: "Cancelled: Summer Poetry Slam",
|
259 |
+
artist: "Local Poets",
|
260 |
+
date: "2023-06-08T19:30:00",
|
261 |
+
venue: "Downtown Books",
|
262 |
+
price: 10.00,
|
263 |
+
status: "cancelled",
|
264 |
+
url: "https://dtbooks.com/events"
|
265 |
+
}
|
266 |
+
];
|
267 |
+
|
268 |
+
// DOM elements
|
269 |
+
const calendarDays = document.getElementById('calendarDays');
|
270 |
+
const currentMonthYear = document.getElementById('currentMonthYear');
|
271 |
+
const eventsList = document.getElementById('eventsList');
|
272 |
+
const recentEvents = document.getElementById('recentEvents');
|
273 |
+
const addEventBtn = document.getElementById('addEventBtn');
|
274 |
+
const eventModal = document.getElementById('eventModal');
|
275 |
+
const closeModal = document.getElementById('closeModal');
|
276 |
+
const cancelBtn = document.getElementById('cancelBtn');
|
277 |
+
const eventForm = document.getElementById('eventForm');
|
278 |
+
|
279 |
+
// Calendar variables
|
280 |
+
let currentDate = new Date();
|
281 |
+
let currentMonth = currentDate.getMonth();
|
282 |
+
let currentYear = currentDate.getFullYear();
|
283 |
+
|
284 |
+
// Initialize app
|
285 |
+
document.addEventListener('DOMContentLoaded', () => {
|
286 |
+
renderCalendar();
|
287 |
+
displayEvents();
|
288 |
+
displayRecentEvents();
|
289 |
+
|
290 |
+
// Event listeners
|
291 |
+
addEventBtn.addEventListener('click', () => {
|
292 |
+
eventModal.classList.remove('hidden');
|
293 |
+
});
|
294 |
+
|
295 |
+
closeModal.addEventListener('click', () => {
|
296 |
+
eventModal.classList.add('hidden');
|
297 |
+
});
|
298 |
+
|
299 |
+
cancelBtn.addEventListener('click', () => {
|
300 |
+
eventModal.classList.add('hidden');
|
301 |
+
});
|
302 |
+
|
303 |
+
eventForm.addEventListener('submit', addNewEvent);
|
304 |
+
});
|
305 |
+
|
306 |
+
// Render calendar
|
307 |
+
function renderCalendar() {
|
308 |
+
// Clear previous calendar
|
309 |
+
calendarDays.innerHTML = '';
|
310 |
+
|
311 |
+
// Set month and year display
|
312 |
+
const monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
313 |
+
currentMonthYear.textContent = `${monthNames[currentMonth]} ${currentYear}`;
|
314 |
+
|
315 |
+
// Get first day of month and total days
|
316 |
+
const firstDay = new Date(currentYear, currentMonth, 1).getDay();
|
317 |
+
const daysInMonth = new Date(currentYear, currentMonth + 1, 0).getDate();
|
318 |
+
|
319 |
+
// Get days from previous month
|
320 |
+
const daysInPrevMonth = new Date(currentYear, currentMonth, 0).getDate();
|
321 |
+
|
322 |
+
// Get days from next month
|
323 |
+
const totalCells = Math.ceil((daysInMonth + firstDay) / 7) * 7;
|
324 |
+
const daysFromNextMonth = totalCells - (daysInMonth + firstDay);
|
325 |
+
|
326 |
+
// Previous month days
|
327 |
+
for (let i = 0; i < firstDay; i++) {
|
328 |
+
const day = daysInPrevMonth - firstDay + i + 1;
|
329 |
+
const dayElement = document.createElement('div');
|
330 |
+
dayElement.className = 'text-center py-2 text-gray-400';
|
331 |
+
dayElement.textContent = day;
|
332 |
+
calendarDays.appendChild(dayElement);
|
333 |
+
}
|
334 |
+
|
335 |
+
// Current month days
|
336 |
+
for (let i = 1; i <= daysInMonth; i++) {
|
337 |
+
const dayElement = document.createElement('div');
|
338 |
+
dayElement.className = 'text-center py-2 cursor-pointer rounded-lg';
|
339 |
+
|
340 |
+
// Check if this is today
|
341 |
+
const today = new Date();
|
342 |
+
if (currentYear === today.getFullYear() && currentMonth === today.getMonth() && i === today.getDate()) {
|
343 |
+
dayElement.classList.add('bg-indigo-100', 'font-semibold', 'text-indigo-700');
|
344 |
+
}
|
345 |
+
|
346 |
+
// Check if there are events on this day
|
347 |
+
const hasEvent = events.some(event => {
|
348 |
+
const eventDate = new Date(event.date);
|
349 |
+
return eventDate.getFullYear() === currentYear &&
|
350 |
+
eventDate.getMonth() === currentMonth &&
|
351 |
+
eventDate.getDate() === i;
|
352 |
+
});
|
353 |
+
|
354 |
+
if (hasEvent) {
|
355 |
+
dayElement.classList.add('has-event', 'event-day', 'hover:bg-indigo-200');
|
356 |
+
} else {
|
357 |
+
dayElement.classList.add('hover:bg-gray-100');
|
358 |
+
}
|
359 |
+
|
360 |
+
dayElement.textContent = i;
|
361 |
+
dayElement.dataset.day = i;
|
362 |
+
dayElement.dataset.month = currentMonth;
|
363 |
+
dayElement.dataset.year = currentYear;
|
364 |
+
dayElement.addEventListener('click', () => {
|
365 |
+
showEventsForDay(i, currentMonth, currentYear);
|
366 |
+
});
|
367 |
+
calendarDays.appendChild(dayElement);
|
368 |
+
}
|
369 |
+
|
370 |
+
// Next month days
|
371 |
+
for (let i = 1; i <= daysFromNextMonth; i++) {
|
372 |
+
const dayElement = document.createElement('div');
|
373 |
+
dayElement.className = 'text-center py-2 text-gray-400';
|
374 |
+
dayElement.textContent = i;
|
375 |
+
calendarDays.appendChild(dayElement);
|
376 |
+
}
|
377 |
+
}
|
378 |
+
|
379 |
+
// Navigate to previous month
|
380 |
+
function previousMonth() {
|
381 |
+
currentMonth--;
|
382 |
+
if (currentMonth < 0) {
|
383 |
+
currentMonth = 11;
|
384 |
+
currentYear--;
|
385 |
+
}
|
386 |
+
renderCalendar();
|
387 |
+
displayEvents(); // Update events display for the new month
|
388 |
+
}
|
389 |
+
|
390 |
+
// Navigate to next month
|
391 |
+
function nextMonth() {
|
392 |
+
currentMonth++;
|
393 |
+
if (currentMonth > 11) {
|
394 |
+
currentMonth = 0;
|
395 |
+
currentYear++;
|
396 |
+
}
|
397 |
+
renderCalendar();
|
398 |
+
displayEvents(); // Update events display for the new month
|
399 |
+
}
|
400 |
+
|
401 |
+
// Display all events for current month
|
402 |
+
function displayEvents() {
|
403 |
+
eventsList.innerHTML = '';
|
404 |
+
|
405 |
+
const filteredEvents = events.filter(event => {
|
406 |
+
const eventDate = new Date(event.date);
|
407 |
+
return eventDate.getFullYear() === currentYear && eventDate.getMonth() === currentMonth;
|
408 |
+
});
|
409 |
+
|
410 |
+
if (filteredEvents.length === 0) {
|
411 |
+
eventsList.innerHTML = '<p class="text-gray-500 text-center py-4">No events scheduled for this month.</p>';
|
412 |
+
return;
|
413 |
+
}
|
414 |
+
|
415 |
+
// Sort events by date
|
416 |
+
filteredEvents.sort((a, b) => new Date(a.date) - new Date(b.date));
|
417 |
+
|
418 |
+
filteredEvents.forEach(event => {
|
419 |
+
const eventCard = createEventCard(event);
|
420 |
+
eventsList.appendChild(eventCard);
|
421 |
+
});
|
422 |
+
}
|
423 |
+
|
424 |
+
// Show events for a specific day
|
425 |
+
function showEventsForDay(day, month, year) {
|
426 |
+
eventsList.innerHTML = '';
|
427 |
+
|
428 |
+
const filteredEvents = events.filter(event => {
|
429 |
+
const eventDate = new Date(event.date);
|
430 |
+
return eventDate.getFullYear() == year &&
|
431 |
+
eventDate.getMonth() == month &&
|
432 |
+
eventDate.getDate() == day;
|
433 |
+
});
|
434 |
+
|
435 |
+
if (filteredEvents.length === 0) {
|
436 |
+
const date = new Date(year, month, day);
|
437 |
+
const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
|
438 |
+
eventsList.innerHTML = `
|
439 |
+
<div class="bg-white rounded-lg shadow-md p-6 text-center">
|
440 |
+
<h3 class="text-xl font-semibold text-gray-800 mb-2">No Events Scheduled</h3>
|
441 |
+
<p class="text-gray-500">${date.toLocaleDateString('en-US', options)}</p>
|
442 |
+
</div>
|
443 |
+
`;
|
444 |
+
return;
|
445 |
+
}
|
446 |
+
|
447 |
+
filteredEvents.forEach(event => {
|
448 |
+
const eventCard = createEventCard(event);
|
449 |
+
eventsList.appendChild(eventCard);
|
450 |
+
});
|
451 |
+
}
|
452 |
+
|
453 |
+
// Display recent events in sidebar
|
454 |
+
function displayRecentEvents() {
|
455 |
+
recentEvents.innerHTML = '';
|
456 |
+
|
457 |
+
const now = new Date();
|
458 |
+
const recent = events.filter(event => {
|
459 |
+
const eventDate = new Date(event.date);
|
460 |
+
return eventDate > now && event.status === 'active';
|
461 |
+
}).sort((a, b) => new Date(a.date) - new Date(b.date));
|
462 |
+
|
463 |
+
const maxRecent = 3;
|
464 |
+
const displayCount = Math.min(recent.length, maxRecent);
|
465 |
+
|
466 |
+
if (displayCount === 0) {
|
467 |
+
recentEvents.innerHTML = '<p class="text-gray-500">No upcoming events</p>';
|
468 |
+
return;
|
469 |
+
}
|
470 |
+
|
471 |
+
for (let i = 0; i < displayCount; i++) {
|
472 |
+
const eventCard = document.createElement('div');
|
473 |
+
eventCard.className = 'bg-gray-50 rounded-lg p-4 event-card transition cursor-pointer';
|
474 |
+
|
475 |
+
const eventDate = new Date(recent[i].date);
|
476 |
+
const options = { month: 'short', day: 'numeric' };
|
477 |
+
|
478 |
+
eventCard.innerHTML = `
|
479 |
+
<div class="flex justify-between items-start">
|
480 |
+
<div>
|
481 |
+
<h3 class="font-semibold text-gray-800">${recent[i].name}</h3>
|
482 |
+
<p class="text-sm text-indigo-600">${recent[i].artist}</p>
|
483 |
+
</div>
|
484 |
+
<div class="bg-indigo-100 text-indigo-800 text-xs font-medium px-2 py-1 rounded-lg">
|
485 |
+
${eventDate.toLocaleDateString('en-US', options)}
|
486 |
+
</div>
|
487 |
+
</div>
|
488 |
+
<div class="mt-2 text-sm text-gray-600">
|
489 |
+
<p>${recent[i].venue} • $${recent[i].price.toFixed(2)}</p>
|
490 |
+
</div>
|
491 |
+
`;
|
492 |
+
|
493 |
+
eventCard.addEventListener('click', () => {
|
494 |
+
// Scroll to the event in the main list
|
495 |
+
const eventElement = document.querySelector(`[data-event-id="${recent[i].id}"]`);
|
496 |
+
if (eventElement) {
|
497 |
+
eventElement.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
|
498 |
+
eventElement.classList.add('ring-2', 'ring-indigo-500');
|
499 |
+
setTimeout(() => {
|
500 |
+
eventElement.classList.remove('ring-2', 'ring-indigo-500');
|
501 |
+
}, 2000);
|
502 |
+
}
|
503 |
+
});
|
504 |
+
|
505 |
+
recentEvents.appendChild(eventCard);
|
506 |
+
}
|
507 |
+
}
|
508 |
+
|
509 |
+
// Create event card element
|
510 |
+
function createEventCard(event) {
|
511 |
+
const eventDate = new Date(event.date);
|
512 |
+
const eventDay = eventDate.getDate();
|
513 |
+
const eventMonth = eventDate.toLocaleString('default', { month: 'short' });
|
514 |
+
const eventTime = eventDate.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
|
515 |
+
const fullDate = eventDate.toLocaleString('en-US', { weekday: 'long', month: 'long', day: 'numeric', year: 'numeric' });
|
516 |
+
|
517 |
+
const eventCard = document.createElement('div');
|
518 |
+
eventCard.className = `bg-white rounded-lg shadow-md overflow-hidden event-card transition ${event.status === 'cancelled' ? 'opacity-70' : ''}`;
|
519 |
+
eventCard.dataset.eventId = event.id;
|
520 |
+
|
521 |
+
eventCard.innerHTML = `
|
522 |
+
<div class="p-6">
|
523 |
+
<div class="flex items-start justify-between">
|
524 |
+
<div class="flex items-start space-x-4">
|
525 |
+
<div class="bg-indigo-100 text-indigo-800 p-3 rounded-lg text-center">
|
526 |
+
<div class="font-bold text-xl">${eventDay}</div>
|
527 |
+
<div class="text-sm uppercase">${eventMonth}</div>
|
528 |
+
</div>
|
529 |
+
<div>
|
530 |
+
<h3 class="text-xl font-bold text-gray-800 ${event.status === 'cancelled' ? 'line-through' : ''}">${event.name}</h3>
|
531 |
+
<p class="text-indigo-600">${event.artist}</p>
|
532 |
+
<p class="text-gray-500 text-sm mt-1">${fullDate} at ${eventTime}</p>
|
533 |
+
<div class="flex items-center mt-2 space-x-4">
|
534 |
+
<span class="text-gray-700">${event.venue}</span>
|
535 |
+
<span class="text-gray-700">$${event.price.toFixed(2)}</span>
|
536 |
+
${event.status === 'cancelled' ?
|
537 |
+
'<span class="bg-red-100 text-red-800 text-xs font-medium px-2 py-0.5 rounded">Cancelled</span>' :
|
538 |
+
'<span class="bg-green-100 text-green-800 text-xs font-medium px-2 py-0.5 rounded">Active</span>'}
|
539 |
+
</div>
|
540 |
+
${event.url ? `<a href="${event.url}" target="_blank" class="inline-block mt-3 text-sm text-indigo-600 hover:underline">More info & tickets →</a>` : ''}
|
541 |
+
</div>
|
542 |
+
</div>
|
543 |
+
</div>
|
544 |
+
</div>
|
545 |
+
`;
|
546 |
+
|
547 |
+
return eventCard;
|
548 |
+
}
|
549 |
+
|
550 |
+
// Add new event
|
551 |
+
function addNewEvent(e) {
|
552 |
+
e.preventDefault();
|
553 |
+
|
554 |
+
// Get form values
|
555 |
+
const eventName = document.getElementById('eventName').value;
|
556 |
+
const artistName = document.getElementById('artistName').value;
|
557 |
+
const eventDate = document.getElementById('eventDate').value;
|
558 |
+
const venueName = document.getElementById('venueName').value;
|
559 |
+
const ticketPrice = parseFloat(document.getElementById('ticketPrice').value) || 0;
|
560 |
+
const eventUrl = document.getElementById('eventUrl').value;
|
561 |
+
const eventStatus = document.querySelector('input[name="eventStatus"]:checked').value;
|
562 |
+
|
563 |
+
// Create new event object
|
564 |
+
const newEvent = {
|
565 |
+
id: events.length > 0 ? Math.max(...events.map(e => e.id)) + 1 : 1,
|
566 |
+
name: eventName,
|
567 |
+
artist: artistName,
|
568 |
+
date: eventDate,
|
569 |
+
venue: venueName,
|
570 |
+
price: ticketPrice,
|
571 |
+
status: eventStatus,
|
572 |
+
url: eventUrl
|
573 |
+
};
|
574 |
+
|
575 |
+
// Add to events array
|
576 |
+
events.push(newEvent);
|
577 |
+
|
578 |
+
// Reset form and close modal
|
579 |
+
eventForm.reset();
|
580 |
+
eventModal.classList.add('hidden');
|
581 |
+
|
582 |
+
// Update UI
|
583 |
+
renderCalendar();
|
584 |
+
displayEvents();
|
585 |
+
displayRecentEvents();
|
586 |
+
|
587 |
+
// For demo purposes, show success message
|
588 |
+
alert('Event added successfully!');
|
589 |
+
}
|
590 |
+
</script>
|
591 |
+
<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=privateuserh/chandelier-events" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
592 |
+
</html>
|
prompts.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Keep all components and AI Agent working add a floating button to allow a venue to post an event allow the data to be displayed on a main page event calendar include relevant event details that can be entered like performance artist name, date, ticket price, and if event is active or cancelled also include web address link for user entering show data. keep the same site design and color scheme and locations
|