Spaces:
Running
Running
Add 2 files
Browse files- README.md +7 -5
- index.html +497 -19
README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
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: roadmap-builder
|
3 |
+
emoji: 🐳
|
4 |
+
colorFrom: yellow
|
5 |
+
colorTo: gray
|
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,497 @@
|
|
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>AI Department Roadmap Builder</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 |
+
.timeline-item:not(:last-child)::after {
|
11 |
+
content: '';
|
12 |
+
position: absolute;
|
13 |
+
left: 24px;
|
14 |
+
top: 32px;
|
15 |
+
height: calc(100% - 32px);
|
16 |
+
width: 2px;
|
17 |
+
background-color: #e5e7eb;
|
18 |
+
}
|
19 |
+
.draggable {
|
20 |
+
cursor: move;
|
21 |
+
user-select: none;
|
22 |
+
}
|
23 |
+
.dropzone {
|
24 |
+
min-height: 100px;
|
25 |
+
transition: background-color 0.3s;
|
26 |
+
}
|
27 |
+
.dropzone.active {
|
28 |
+
background-color: rgba(59, 130, 246, 0.1);
|
29 |
+
border: 1px dashed #3b82f6;
|
30 |
+
}
|
31 |
+
</style>
|
32 |
+
</head>
|
33 |
+
<body class="bg-gray-50 min-h-screen">
|
34 |
+
<div class="container mx-auto px-4 py-8">
|
35 |
+
<!-- Header -->
|
36 |
+
<header class="mb-8">
|
37 |
+
<div class="flex justify-between items-center">
|
38 |
+
<div>
|
39 |
+
<h1 class="text-3xl font-bold text-gray-800">AI Department Roadmap Builder</h1>
|
40 |
+
<p class="text-gray-600">Strategic planning tool for AI initiatives</p>
|
41 |
+
</div>
|
42 |
+
<div class="flex space-x-4">
|
43 |
+
<button id="exportBtn" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg flex items-center">
|
44 |
+
<i class="fas fa-file-export mr-2"></i> Export
|
45 |
+
</button>
|
46 |
+
<button id="printBtn" class="bg-gray-200 hover:bg-gray-300 text-gray-800 px-4 py-2 rounded-lg flex items-center">
|
47 |
+
<i class="fas fa-print mr-2"></i> Print
|
48 |
+
</button>
|
49 |
+
</div>
|
50 |
+
</div>
|
51 |
+
</header>
|
52 |
+
|
53 |
+
<div class="grid grid-cols-1 lg:grid-cols-4 gap-6">
|
54 |
+
<!-- Left Panel - Components -->
|
55 |
+
<div class="lg:col-span-1 bg-white rounded-xl shadow p-6">
|
56 |
+
<h2 class="text-xl font-semibold mb-4 text-gray-800">Roadmap Components</h2>
|
57 |
+
|
58 |
+
<div class="space-y-4">
|
59 |
+
<div class="component-group">
|
60 |
+
<h3 class="font-medium text-gray-700 mb-2 flex items-center">
|
61 |
+
<i class="fas fa-layer-group mr-2 text-blue-500"></i> Strategic Goals
|
62 |
+
</h3>
|
63 |
+
<div class="space-y-2">
|
64 |
+
<div draggable="true" class="draggable bg-blue-50 border border-blue-200 rounded-lg p-3 text-blue-800" data-type="goal">
|
65 |
+
<div class="flex items-center">
|
66 |
+
<i class="fas fa-bullseye mr-2"></i>
|
67 |
+
<span>Improve AI Model Accuracy</span>
|
68 |
+
</div>
|
69 |
+
</div>
|
70 |
+
<div draggable="true" class="draggable bg-blue-50 border border-blue-200 rounded-lg p-3 text-blue-800" data-type="goal">
|
71 |
+
<div class="flex items-center">
|
72 |
+
<i class="fas fa-bullseye mr-2"></i>
|
73 |
+
<span>Reduce Model Bias</span>
|
74 |
+
</div>
|
75 |
+
</div>
|
76 |
+
<div draggable="true" class="draggable bg-blue-50 border border-blue-200 rounded-lg p-3 text-blue-800" data-type="goal">
|
77 |
+
<div class="flex items-center">
|
78 |
+
<i class="fas fa-bullseye mr-2"></i>
|
79 |
+
<span>Enhance Explainability</span>
|
80 |
+
</div>
|
81 |
+
</div>
|
82 |
+
</div>
|
83 |
+
</div>
|
84 |
+
|
85 |
+
<div class="component-group">
|
86 |
+
<h3 class="font-medium text-gray-700 mb-2 flex items-center">
|
87 |
+
<i class="fas fa-tasks mr-2 text-green-500"></i> Initiatives
|
88 |
+
</h3>
|
89 |
+
<div class="space-y-2">
|
90 |
+
<div draggable="true" class="draggable bg-green-50 border border-green-200 rounded-lg p-3 text-green-800" data-type="initiative">
|
91 |
+
<div class="flex items-center">
|
92 |
+
<i class="fas fa-project-diagram mr-2"></i>
|
93 |
+
<span>Model Optimization</span>
|
94 |
+
</div>
|
95 |
+
</div>
|
96 |
+
<div draggable="true" class="draggable bg-green-50 border border-green-200 rounded-lg p-3 text-green-800" data-type="initiative">
|
97 |
+
<div class="flex items-center">
|
98 |
+
<i class="fas fa-project-diagram mr-2"></i>
|
99 |
+
<span>Data Pipeline Upgrade</span>
|
100 |
+
</div>
|
101 |
+
</div>
|
102 |
+
<div draggable="true" class="draggable bg-green-50 border border-green-200 rounded-lg p-3 text-green-800" data-type="initiative">
|
103 |
+
<div class="flex items-center">
|
104 |
+
<i class="fas fa-project-diagram mr-2"></i>
|
105 |
+
<span>Ethics Framework</span>
|
106 |
+
</div>
|
107 |
+
</div>
|
108 |
+
</div>
|
109 |
+
</div>
|
110 |
+
|
111 |
+
<div class="component-group">
|
112 |
+
<h3 class="font-medium text-gray-700 mb-2 flex items-center">
|
113 |
+
<i class="fas fa-calendar-check mr-2 text-purple-500"></i> Milestones
|
114 |
+
</h3>
|
115 |
+
<div class="space-y-2">
|
116 |
+
<div draggable="true" class="draggable bg-purple-50 border border-purple-200 rounded-lg p-3 text-purple-800" data-type="milestone">
|
117 |
+
<div class="flex items-center">
|
118 |
+
<i class="fas fa-flag-checkered mr-2"></i>
|
119 |
+
<span>Model Validation</span>
|
120 |
+
</div>
|
121 |
+
</div>
|
122 |
+
<div draggable="true" class="draggable bg-purple-50 border border-purple-200 rounded-lg p-3 text-purple-800" data-type="milestone">
|
123 |
+
<div class="flex items-center">
|
124 |
+
<i class="fas fa-flag-checkered mr-2"></i>
|
125 |
+
<span>Deployment</span>
|
126 |
+
</div>
|
127 |
+
</div>
|
128 |
+
<div draggable="true" class="draggable bg-purple-50 border border-purple-200 rounded-lg p-3 text-purple-800" data-type="milestone">
|
129 |
+
<div class="flex items-center">
|
130 |
+
<i class="fas fa-flag-checkered mr-2"></i>
|
131 |
+
<span>Audit Completion</span>
|
132 |
+
</div>
|
133 |
+
</div>
|
134 |
+
</div>
|
135 |
+
</div>
|
136 |
+
|
137 |
+
<div class="component-group">
|
138 |
+
<h3 class="font-medium text-gray-700 mb-2 flex items-center">
|
139 |
+
<i class="fas fa-users mr-2 text-yellow-500"></i> Resources
|
140 |
+
</h3>
|
141 |
+
<div class="space-y-2">
|
142 |
+
<div draggable="true" class="draggable bg-yellow-50 border border-yellow-200 rounded-lg p-3 text-yellow-800" data-type="resource">
|
143 |
+
<div class="flex items-center">
|
144 |
+
<i class="fas fa-user-tie mr-2"></i>
|
145 |
+
<span>Research Team</span>
|
146 |
+
</div>
|
147 |
+
</div>
|
148 |
+
<div draggable="true" class="draggable bg-yellow-50 border border-yellow-200 rounded-lg p-3 text-yellow-800" data-type="resource">
|
149 |
+
<div class="flex items-center">
|
150 |
+
<i class="fas fa-server mr-2"></i>
|
151 |
+
<span>GPU Cluster</span>
|
152 |
+
</div>
|
153 |
+
</div>
|
154 |
+
<div draggable="true" class="draggable bg-yellow-50 border border-yellow-200 rounded-lg p-3 text-yellow-800" data-type="resource">
|
155 |
+
<div class="flex items-center">
|
156 |
+
<i class="fas fa-money-bill-wave mr-2"></i>
|
157 |
+
<span>Budget Allocation</span>
|
158 |
+
</div>
|
159 |
+
</div>
|
160 |
+
</div>
|
161 |
+
</div>
|
162 |
+
</div>
|
163 |
+
|
164 |
+
<div class="mt-6">
|
165 |
+
<h3 class="font-medium text-gray-700 mb-2 flex items-center">
|
166 |
+
<i class="fas fa-plus-circle mr-2 text-red-500"></i> Custom Component
|
167 |
+
</h3>
|
168 |
+
<div class="flex">
|
169 |
+
<input type="text" id="customComponent" placeholder="New component name" class="flex-1 border rounded-l-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500">
|
170 |
+
<button id="addCustomBtn" class="bg-red-500 hover:bg-red-600 text-white px-4 py-2 rounded-r-lg">
|
171 |
+
Add
|
172 |
+
</button>
|
173 |
+
</div>
|
174 |
+
<select id="customType" class="mt-2 w-full border rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500">
|
175 |
+
<option value="goal">Strategic Goal</option>
|
176 |
+
<option value="initiative">Initiative</option>
|
177 |
+
<option value="milestone">Milestone</option>
|
178 |
+
<option value="resource">Resource</option>
|
179 |
+
</select>
|
180 |
+
</div>
|
181 |
+
</div>
|
182 |
+
|
183 |
+
<!-- Main Roadmap Area -->
|
184 |
+
<div class="lg:col-span-3">
|
185 |
+
<div class="bg-white rounded-xl shadow p-6 mb-6">
|
186 |
+
<div class="flex justify-between items-center mb-4">
|
187 |
+
<h2 class="text-xl font-semibold text-gray-800">AI Department Roadmap</h2>
|
188 |
+
<div class="flex space-x-2">
|
189 |
+
<select id="timeframe" class="border rounded-lg px-3 py-1 focus:outline-none focus:ring-2 focus:ring-blue-500">
|
190 |
+
<option value="quarterly">Quarterly View</option>
|
191 |
+
<option value="yearly">Yearly View</option>
|
192 |
+
<option value="3year">3-Year Plan</option>
|
193 |
+
</select>
|
194 |
+
<button id="clearAllBtn" class="bg-gray-200 hover:bg-gray-300 text-gray-800 px-3 py-1 rounded-lg text-sm">
|
195 |
+
Clear All
|
196 |
+
</button>
|
197 |
+
</div>
|
198 |
+
</div>
|
199 |
+
|
200 |
+
<div class="overflow-x-auto">
|
201 |
+
<div id="roadmapTimeline" class="min-w-full">
|
202 |
+
<!-- Timeline will be generated here -->
|
203 |
+
<div class="relative">
|
204 |
+
<!-- Q1 -->
|
205 |
+
<div class="timeline-item relative pb-8 pl-10">
|
206 |
+
<div class="absolute left-0 top-0 w-8 h-8 rounded-full bg-blue-500 flex items-center justify-center text-white font-bold">
|
207 |
+
Q1
|
208 |
+
</div>
|
209 |
+
<div class="dropzone p-3 rounded-lg border border-dashed border-gray-300" data-timeframe="q1">
|
210 |
+
<h3 class="font-medium text-gray-700 mb-2">Q1 2024</h3>
|
211 |
+
<div class="space-y-2" id="q1-items"></div>
|
212 |
+
</div>
|
213 |
+
</div>
|
214 |
+
|
215 |
+
<!-- Q2 -->
|
216 |
+
<div class="timeline-item relative pb-8 pl-10">
|
217 |
+
<div class="absolute left-0 top-0 w-8 h-8 rounded-full bg-green-500 flex items-center justify-center text-white font-bold">
|
218 |
+
Q2
|
219 |
+
</div>
|
220 |
+
<div class="dropzone p-3 rounded-lg border border-dashed border-gray-300" data-timeframe="q2">
|
221 |
+
<h3 class="font-medium text-gray-700 mb-2">Q2 2024</h3>
|
222 |
+
<div class="space-y-2" id="q2-items"></div>
|
223 |
+
</div>
|
224 |
+
</div>
|
225 |
+
|
226 |
+
<!-- Q3 -->
|
227 |
+
<div class="timeline-item relative pb-8 pl-10">
|
228 |
+
<div class="absolute left-0 top-0 w-8 h-8 rounded-full bg-yellow-500 flex items-center justify-center text-white font-bold">
|
229 |
+
Q3
|
230 |
+
</div>
|
231 |
+
<div class="dropzone p-3 rounded-lg border border-dashed border-gray-300" data-timeframe="q3">
|
232 |
+
<h3 class="font-medium text-gray-700 mb-2">Q3 2024</h3>
|
233 |
+
<div class="space-y-2" id="q3-items"></div>
|
234 |
+
</div>
|
235 |
+
</div>
|
236 |
+
|
237 |
+
<!-- Q4 -->
|
238 |
+
<div class="timeline-item relative pb-8 pl-10">
|
239 |
+
<div class="absolute left-0 top-0 w-8 h-8 rounded-full bg-purple-500 flex items-center justify-center text-white font-bold">
|
240 |
+
Q4
|
241 |
+
</div>
|
242 |
+
<div class="dropzone p-3 rounded-lg border border-dashed border-gray-300" data-timeframe="q4">
|
243 |
+
<h3 class="font-medium text-gray-700 mb-2">Q4 2024</h3>
|
244 |
+
<div class="space-y-2" id="q4-items"></div>
|
245 |
+
</div>
|
246 |
+
</div>
|
247 |
+
</div>
|
248 |
+
</div>
|
249 |
+
</div>
|
250 |
+
</div>
|
251 |
+
|
252 |
+
<!-- Roadmap Summary -->
|
253 |
+
<div class="bg-white rounded-xl shadow p-6">
|
254 |
+
<h2 class="text-xl font-semibold mb-4 text-gray-800">Roadmap Summary</h2>
|
255 |
+
<div id="roadmapSummary" class="space-y-4">
|
256 |
+
<div class="text-center text-gray-500 py-8">
|
257 |
+
<i class="fas fa-road text-4xl mb-2 text-gray-300"></i>
|
258 |
+
<p>Your roadmap summary will appear here</p>
|
259 |
+
<p class="text-sm">Drag and drop components to build your AI department roadmap</p>
|
260 |
+
</div>
|
261 |
+
</div>
|
262 |
+
</div>
|
263 |
+
</div>
|
264 |
+
</div>
|
265 |
+
</div>
|
266 |
+
|
267 |
+
<script>
|
268 |
+
document.addEventListener('DOMContentLoaded', function() {
|
269 |
+
// Drag and drop functionality
|
270 |
+
const draggables = document.querySelectorAll('.draggable');
|
271 |
+
const dropzones = document.querySelectorAll('.dropzone');
|
272 |
+
let draggedItem = null;
|
273 |
+
|
274 |
+
// Add event listeners for draggable items
|
275 |
+
draggables.forEach(item => {
|
276 |
+
item.addEventListener('dragstart', function() {
|
277 |
+
draggedItem = this;
|
278 |
+
setTimeout(() => {
|
279 |
+
this.style.opacity = '0.5';
|
280 |
+
}, 0);
|
281 |
+
});
|
282 |
+
|
283 |
+
item.addEventListener('dragend', function() {
|
284 |
+
this.style.opacity = '1';
|
285 |
+
});
|
286 |
+
});
|
287 |
+
|
288 |
+
// Add event listeners for drop zones
|
289 |
+
dropzones.forEach(zone => {
|
290 |
+
zone.addEventListener('dragover', function(e) {
|
291 |
+
e.preventDefault();
|
292 |
+
this.classList.add('active');
|
293 |
+
});
|
294 |
+
|
295 |
+
zone.addEventListener('dragleave', function() {
|
296 |
+
this.classList.remove('active');
|
297 |
+
});
|
298 |
+
|
299 |
+
zone.addEventListener('drop', function(e) {
|
300 |
+
e.preventDefault();
|
301 |
+
this.classList.remove('active');
|
302 |
+
|
303 |
+
if (draggedItem) {
|
304 |
+
const clone = draggedItem.cloneNode(true);
|
305 |
+
clone.classList.add('mt-2');
|
306 |
+
|
307 |
+
// Add delete button to the cloned item
|
308 |
+
const deleteBtn = document.createElement('button');
|
309 |
+
deleteBtn.innerHTML = '<i class="fas fa-times"></i>';
|
310 |
+
deleteBtn.className = 'ml-2 text-red-500 hover:text-red-700 float-right';
|
311 |
+
deleteBtn.addEventListener('click', function() {
|
312 |
+
clone.remove();
|
313 |
+
updateRoadmapSummary();
|
314 |
+
});
|
315 |
+
|
316 |
+
clone.appendChild(deleteBtn);
|
317 |
+
|
318 |
+
const itemsContainer = this.querySelector('div[id$="-items"]');
|
319 |
+
itemsContainer.appendChild(clone);
|
320 |
+
|
321 |
+
updateRoadmapSummary();
|
322 |
+
}
|
323 |
+
});
|
324 |
+
});
|
325 |
+
|
326 |
+
// Add custom component
|
327 |
+
document.getElementById('addCustomBtn').addEventListener('click', function() {
|
328 |
+
const componentName = document.getElementById('customComponent').value.trim();
|
329 |
+
const componentType = document.getElementById('customType').value;
|
330 |
+
|
331 |
+
if (componentName) {
|
332 |
+
let bgColor, borderColor, textColor, icon;
|
333 |
+
|
334 |
+
switch(componentType) {
|
335 |
+
case 'goal':
|
336 |
+
bgColor = 'bg-blue-50';
|
337 |
+
borderColor = 'border-blue-200';
|
338 |
+
textColor = 'text-blue-800';
|
339 |
+
icon = 'fa-bullseye';
|
340 |
+
break;
|
341 |
+
case 'initiative':
|
342 |
+
bgColor = 'bg-green-50';
|
343 |
+
borderColor = 'border-green-200';
|
344 |
+
textColor = 'text-green-800';
|
345 |
+
icon = 'fa-project-diagram';
|
346 |
+
break;
|
347 |
+
case 'milestone':
|
348 |
+
bgColor = 'bg-purple-50';
|
349 |
+
borderColor = 'border-purple-200';
|
350 |
+
textColor = 'text-purple-800';
|
351 |
+
icon = 'fa-flag-checkered';
|
352 |
+
break;
|
353 |
+
case 'resource':
|
354 |
+
bgColor = 'bg-yellow-50';
|
355 |
+
borderColor = 'border-yellow-200';
|
356 |
+
textColor = 'text-yellow-800';
|
357 |
+
icon = 'fa-user-tie';
|
358 |
+
break;
|
359 |
+
}
|
360 |
+
|
361 |
+
const newComponent = document.createElement('div');
|
362 |
+
newComponent.className = `draggable ${bgColor} border ${borderColor} rounded-lg p-3 ${textColor}`;
|
363 |
+
newComponent.setAttribute('draggable', 'true');
|
364 |
+
newComponent.setAttribute('data-type', componentType);
|
365 |
+
newComponent.innerHTML = `
|
366 |
+
<div class="flex items-center">
|
367 |
+
<i class="fas ${icon} mr-2"></i>
|
368 |
+
<span>${componentName}</span>
|
369 |
+
</div>
|
370 |
+
`;
|
371 |
+
|
372 |
+
// Add drag events to the new component
|
373 |
+
newComponent.addEventListener('dragstart', function() {
|
374 |
+
draggedItem = this;
|
375 |
+
setTimeout(() => {
|
376 |
+
this.style.opacity = '0.5';
|
377 |
+
}, 0);
|
378 |
+
});
|
379 |
+
|
380 |
+
newComponent.addEventListener('dragend', function() {
|
381 |
+
this.style.opacity = '1';
|
382 |
+
});
|
383 |
+
|
384 |
+
// Add to the appropriate component group
|
385 |
+
const componentGroups = document.querySelectorAll('.component-group');
|
386 |
+
componentGroups.forEach(group => {
|
387 |
+
const heading = group.querySelector('h3');
|
388 |
+
if (heading.textContent.includes(componentType.replace(/([A-Z])/g, ' $1').replace(/^./, str => str.toUpperCase()))) {
|
389 |
+
group.querySelector('.space-y-2').appendChild(newComponent);
|
390 |
+
}
|
391 |
+
});
|
392 |
+
|
393 |
+
document.getElementById('customComponent').value = '';
|
394 |
+
}
|
395 |
+
});
|
396 |
+
|
397 |
+
// Update roadmap summary
|
398 |
+
function updateRoadmapSummary() {
|
399 |
+
const summaryContainer = document.getElementById('roadmapSummary');
|
400 |
+
summaryContainer.innerHTML = '';
|
401 |
+
|
402 |
+
const quarters = ['q1', 'q2', 'q3', 'q4'];
|
403 |
+
let hasContent = false;
|
404 |
+
|
405 |
+
quarters.forEach(q => {
|
406 |
+
const quarterItems = document.getElementById(`${q}-items`).children;
|
407 |
+
if (quarterItems.length > 0) {
|
408 |
+
hasContent = true;
|
409 |
+
|
410 |
+
const quarterSection = document.createElement('div');
|
411 |
+
quarterSection.className = 'bg-gray-50 rounded-lg p-4';
|
412 |
+
|
413 |
+
const quarterTitle = document.createElement('h3');
|
414 |
+
quarterTitle.className = 'font-semibold text-lg mb-2';
|
415 |
+
quarterTitle.textContent = document.querySelector(`[data-timeframe="${q}"] h3`).textContent;
|
416 |
+
|
417 |
+
quarterSection.appendChild(quarterTitle);
|
418 |
+
|
419 |
+
const itemsList = document.createElement('ul');
|
420 |
+
itemsList.className = 'space-y-2';
|
421 |
+
|
422 |
+
Array.from(quarterItems).forEach(item => {
|
423 |
+
const listItem = document.createElement('li');
|
424 |
+
listItem.className = 'flex items-center';
|
425 |
+
|
426 |
+
const itemType = item.getAttribute('data-type');
|
427 |
+
let typeBadge;
|
428 |
+
|
429 |
+
switch(itemType) {
|
430 |
+
case 'goal':
|
431 |
+
typeBadge = '<span class="bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded mr-2">Goal</span>';
|
432 |
+
break;
|
433 |
+
case 'initiative':
|
434 |
+
typeBadge = '<span class="bg-green-100 text-green-800 text-xs px-2 py-1 rounded mr-2">Initiative</span>';
|
435 |
+
break;
|
436 |
+
case 'milestone':
|
437 |
+
typeBadge = '<span class="bg-purple-100 text-purple-800 text-xs px-2 py-1 rounded mr-2">Milestone</span>';
|
438 |
+
break;
|
439 |
+
case 'resource':
|
440 |
+
typeBadge = '<span class="bg-yellow-100 text-yellow-800 text-xs px-2 py-1 rounded mr-2">Resource</span>';
|
441 |
+
break;
|
442 |
+
}
|
443 |
+
|
444 |
+
listItem.innerHTML = `
|
445 |
+
${typeBadge}
|
446 |
+
<span>${item.querySelector('span').textContent}</span>
|
447 |
+
`;
|
448 |
+
|
449 |
+
itemsList.appendChild(listItem);
|
450 |
+
});
|
451 |
+
|
452 |
+
quarterSection.appendChild(itemsList);
|
453 |
+
summaryContainer.appendChild(quarterSection);
|
454 |
+
}
|
455 |
+
});
|
456 |
+
|
457 |
+
if (!hasContent) {
|
458 |
+
summaryContainer.innerHTML = `
|
459 |
+
<div class="text-center text-gray-500 py-8">
|
460 |
+
<i class="fas fa-road text-4xl mb-2 text-gray-300"></i>
|
461 |
+
<p>Your roadmap summary will appear here</p>
|
462 |
+
<p class="text-sm">Drag and drop components to build your AI department roadmap</p>
|
463 |
+
</div>
|
464 |
+
`;
|
465 |
+
}
|
466 |
+
}
|
467 |
+
|
468 |
+
// Clear all button
|
469 |
+
document.getElementById('clearAllBtn').addEventListener('click', function() {
|
470 |
+
if (confirm('Are you sure you want to clear all items from the roadmap?')) {
|
471 |
+
const itemContainers = document.querySelectorAll('[id$="-items"]');
|
472 |
+
itemContainers.forEach(container => {
|
473 |
+
container.innerHTML = '';
|
474 |
+
});
|
475 |
+
updateRoadmapSummary();
|
476 |
+
}
|
477 |
+
});
|
478 |
+
|
479 |
+
// Export button
|
480 |
+
document.getElementById('exportBtn').addEventListener('click', function() {
|
481 |
+
alert('Export functionality would be implemented here. In a real app, this would generate a PDF or image of the roadmap.');
|
482 |
+
});
|
483 |
+
|
484 |
+
// Print button
|
485 |
+
document.getElementById('printBtn').addEventListener('click', function() {
|
486 |
+
window.print();
|
487 |
+
});
|
488 |
+
|
489 |
+
// Timeframe selector
|
490 |
+
document.getElementById('timeframe').addEventListener('change', function() {
|
491 |
+
// In a real app, this would change the view of the timeline
|
492 |
+
alert(`View changed to ${this.value}. In a real app, this would adjust the timeline display.`);
|
493 |
+
});
|
494 |
+
});
|
495 |
+
</script>
|
496 |
+
<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=aceeee/roadmap-builder" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
497 |
+
</html>
|