File size: 12,154 Bytes
7363a2c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Code Tapestry Timeline</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://unpkg.com/feather-icons"></script>
    <style>
        .tapestry-container {
            perspective: 1000px;
        }
        .thread {
            transition: all 0.3s ease;
            position: relative;
            transform-style: preserve-3d;
        }
        .thread:hover {
            transform: scaleY(1.1) translateZ(10px);
            z-index: 10;
        }
        .thread-addition {
            background: linear-gradient(to right, rgba(46, 125, 50, 0.1), rgba(46, 125, 50, 0.8));
        }
        .thread-deletion {
            background: linear-gradient(to right, rgba(198, 40, 40, 0.1), rgba(198, 40, 40, 0.8));
        }
        .thread:hover .thread-content {
            opacity: 1;
            transform: translateY(0);
        }
        .thread-content {
            opacity: 0;
            transform: translateY(20px);
            transition: all 0.3s ease;
            pointer-events: none;
        }
        .ring {
            position: absolute;
            border-radius: 50%;
            mix-blend-mode: multiply;
            transform-origin: center;
            animation: ripple 1.5s infinite;
        }
        @keyframes ripple {
            0% {
                transform: scale(0.8);
                opacity: 0.6;
            }
            100% {
                transform: scale(1.2);
                opacity: 0;
            }
        }
        .timeline-marker {
            position: relative;
        }
        .timeline-marker::after {
            content: '';
            position: absolute;
            top: 0;
            left: 50%;
            width: 2px;
            height: 100%;
            background: rgba(255,255,255,0.2);
            transform: translateX(-50%);
        }
    </style>
</head>
<body class="bg-gray-900 text-gray-100 min-h-screen">
    <div class="container mx-auto px-4 py-12">
        <header class="mb-12 text-center">
            <h1 class="text-4xl font-bold mb-2 bg-clip-text text-transparent bg-gradient-to-r from-emerald-400 to-red-400">
                Code Tapestry Timeline
            </h1>
            <p class="text-gray-400 max-w-2xl mx-auto">
                Where version history becomes woven art. Hover over threads to reveal the story behind each change.
            </p>
        </header>

        <div class="tapestry-container relative">
            <!-- Timeline markers -->
            <div class="absolute left-0 top-0 h-full w-full flex justify-between px-8">
                <div class="timeline-marker h-full w-px"></div>
                <div class="timeline-marker h-full w-px"></div>
                <div class="timeline-marker h-full w-px"></div>
                <div class="timeline-marker h-full w-px"></div>
                <div class="timeline-marker h-full w-px"></div>
            </div>

            <!-- Tapestry threads -->
            <div class="grid gap-4">
                <!-- Thread 1 -->
                <div class="thread thread-addition rounded-lg p-4 shadow-lg cursor-pointer group">
                    <div class="flex items-center">
                        <div class="w-10 h-10 rounded-full bg-emerald-900 flex items-center justify-center mr-4">
                            <i data-feather="plus" class="text-emerald-400"></i>
                        </div>
                        <div>
                            <h3 class="font-medium">Added authentication middleware</h3>
                            <p class="text-sm text-gray-400">2 days ago by Alex</p>
                        </div>
                    </div>
                    <div class="thread-content absolute left-0 mt-2 w-full bg-gray-800 p-4 rounded-lg shadow-xl">
                        <pre class="text-xs font-mono text-emerald-300 overflow-x-auto">+ const authenticate = (req, res, next) => {
+   const token = req.headers.authorization?.split(' ')[1];
+   if (!token) return res.status(401).send('Access denied');
+   try {
+     const verified = jwt.verify(token, process.env.JWT_SECRET);
+     req.user = verified;
+     next();
+   } catch (err) {
+     res.status(400).send('Invalid token');
+   }
+ };</pre>
                        <div class="flex justify-end mt-2">
                            <span class="text-xs px-2 py-1 rounded-full bg-emerald-900 text-emerald-300">+24 lines</span>
                        </div>
                    </div>
                    <div class="ring w-20 h-20 bg-emerald-400 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"></div>
                </div>

                <!-- Thread 2 -->
                <div class="thread thread-deletion rounded-lg p-4 shadow-lg cursor-pointer group">
                    <div class="flex items-center">
                        <div class="w-10 h-10 rounded-full bg-red-900 flex items-center justify-center mr-4">
                            <i data-feather="minus" class="text-red-400"></i>
                        </div>
                        <div>
                            <h3 class="font-medium">Removed deprecated API endpoints</h3>
                            <p class="text-sm text-gray-400">1 week ago by Sam</p>
                        </div>
                    </div>
                    <div class="thread-content absolute left-0 mt-2 w-full bg-gray-800 p-4 rounded-lg shadow-xl">
                        <pre class="text-xs font-mono text-red-300 overflow-x-auto">- app.get('/api/v1/old-endpoint', (req, res) => {
-   // Deprecated since v2.3
-   res.json({ message: "This endpoint is no longer supported" });
- });</pre>
                        <div class="flex justify-end mt-2">
                            <span class="text-xs px-2 py-1 rounded-full bg-red-900 text-red-300">-8 lines</span>
                        </div>
                    </div>
                    <div class="ring w-20 h-20 bg-red-400 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"></div>
                </div>

                <!-- Thread 3 -->
                <div class="thread thread-addition rounded-lg p-4 shadow-lg cursor-pointer group">
                    <div class="flex items-center">
                        <div class="w-10 h-10 rounded-full bg-emerald-900 flex items-center justify-center mr-4">
                            <i data-feather="plus" class="text-emerald-400"></i>
                        </div>
                        <div>
                            <h3 class="font-medium">Implemented dark mode toggle</h3>
                            <p class="text-sm text-gray-400">3 weeks ago by Jordan</p>
                        </div>
                    </div>
                    <div class="thread-content absolute left-0 mt-2 w-full bg-gray-800 p-4 rounded-lg shadow-xl">
                        <pre class="text-xs font-mono text-emerald-300 overflow-x-auto">+ const [darkMode, setDarkMode] = useState(false);
+
+ useEffect(() => {
+   if (darkMode) {
+     document.documentElement.classList.add('dark');
+   } else {
+     document.documentElement.classList.remove('dark');
+   }
+ }, [darkMode]);</pre>
                        <div class="flex justify-end mt-2">
                            <span class="text-xs px-2 py-1 rounded-full bg-emerald-900 text-emerald-300">+12 lines</span>
                        </div>
                    </div>
                    <div class="ring w-20 h-20 bg-emerald-400 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"></div>
                </div>

                <!-- Thread 4 -->
                <div class="thread thread-deletion rounded-lg p-4 shadow-lg cursor-pointer group">
                    <div class="flex items-center">
                        <div class="w-10 h-10 rounded-full bg-red-900 flex items-center justify-center mr-4">
                            <i data-feather="minus" class="text-red-400"></i>
                        </div>
                        <div>
                            <h3 class="font-medium">Cleaned up unused dependencies</h3>
                            <p class="text-sm text-gray-400">1 month ago by Taylor</p>
                        </div>
                    </div>
                    <div class="thread-content absolute left-0 mt-2 w-full bg-gray-800 p-4 rounded-lg shadow-xl">
                        <pre class="text-xs font-mono text-red-300 overflow-x-auto">- "dependencies": {
-   "lodash": "^4.17.20",
-   "moment": "^2.29.1",
-   "request": "^2.88.2"
- }</pre>
                        <div class="flex justify-end mt-2">
                            <span class="text-xs px-2 py-1 rounded-full bg-red-900 text-red-300">-5 lines</span>
                        </div>
                    </div>
                    <div class="ring w-20 h-20 bg-red-400 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"></div>
                </div>

                <!-- Thread 5 -->
                <div class="thread thread-addition rounded-lg p-4 shadow-lg cursor-pointer group">
                    <div class="flex items-center">
                        <div class="w-10 h-10 rounded-full bg-emerald-900 flex items-center justify-center mr-4">
                            <i data-feather="plus" class="text-emerald-400"></i>
                        </div>
                        <div>
                            <h3 class="font-medium">Added error boundary component</h3>
                            <p class="text-sm text-gray-400">2 months ago by Casey</p>
                        </div>
                    </div>
                    <div class="thread-content absolute left-0 mt-2 w-full bg-gray-800 p-4 rounded-lg shadow-xl">
                        <pre class="text-xs font-mono text-emerald-300 overflow-x-auto">+ class ErrorBoundary extends React.Component {
+   state = { hasError: false };
+
+   static getDerivedStateFromError(error) {
+     return { hasError: true };
+   }
+
+   componentDidCatch(error, errorInfo) {
+     logErrorToService(error, errorInfo);
+   }
+
+   render() {
+     if (this.state.hasError) {
+       return <FallbackUI />;
+     }
+     return this.props.children;
+   }
+ }</pre>
                        <div class="flex justify-end mt-2">
                            <span class="text-xs px-2 py-1 rounded-full bg-emerald-900 text-emerald-300">+18 lines</span>
                        </div>
                    </div>
                    <div class="ring w-20 h-20 bg-emerald-400 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"></div>
                </div>
            </div>
        </div>

        <footer class="mt-16 text-center text-gray-500 text-sm">
            <p>Weave your code history into a visual tapestry</p>
            <p class="mt-1">Hover over threads to see the changes ripple through time</p>
        </footer>
    </div>

    <script>
        feather.replace();
        
        // Add ripple effect on hover
        document.querySelectorAll('.thread').forEach(thread => {
            thread.addEventListener('mouseenter', function() {
                const ring = this.querySelector('.ring');
                ring.style.animation = 'none';
                void ring.offsetWidth; // Trigger reflow
                ring.style.animation = 'ripple 1.5s infinite';
            });
        });
    </script>
<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=sourcingnuances/code-tapestry" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>