File size: 13,838 Bytes
b9e5343
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>WanderPin - My Travel Map</title>
    <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
    <script src="https://unpkg.com/feather-icons"></script>
    <link rel="stylesheet" href="style.css">
    <script src="components/navbar.js"></script>
    <script src="components/footer.js"></script>
    <script src="components/travel-card.js"></script>
    <script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
    <link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
    <script src="https://unpkg.com/leaflet.markercluster@1.5.3/dist/leaflet.markercluster.js"></script>
    <link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster@1.5.3/dist/MarkerCluster.css" />
    <link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster@1.5.3/dist/MarkerCluster.Default.css" />
    <style>
        #map { height: 500px; }
        .leaflet-popup-content { font-family: 'Inter', sans-serif; }
        .custom-marker { background: none; border: none; }
    </style>
</head>
<body class="bg-gradient-to-br from-gray-50 to-blue-50 min-h-screen">
    <custom-navbar></custom-navbar>

    <main class="container mx-auto px-4 py-8 max-w-7xl">
        <!-- Hero Section -->
        <section class="text-center mb-12">
            <h1 class="text-5xl font-bold text-gray-800 mb-4">My Travel Journey <i data-feather="map-pin" class="inline-block text-blue-500"></i></h1>
            <p class="text-xl text-gray-600 max-w-3xl mx-auto">A visual diary of all the amazing places I've visited across Southeast Asia and beyond. Each pin tells a story!</p>
            <div class="mt-6">
                <span class="inline-block px-4 py-2 bg-blue-100 text-blue-800 rounded-full text-sm font-semibold mr-2 mb-2">πŸ“ 7 Destinations</span>
                <span class="inline-block px-4 py-2 bg-green-100 text-green-800 rounded-full text-sm font-semibold mr-2 mb-2">🌏 4 Countries</span>
                <span class="inline-block px-4 py-2 bg-purple-100 text-purple-800 rounded-full text-sm font-semibold mr-2 mb-2">✈️ 1 Adventurer</span>
            </div>
        </section>

        <!-- Interactive Map Section -->
        <section class="mb-16">
            <div class="bg-white rounded-2xl shadow-xl p-4 md:p-6 border border-gray-200">
                <div class="flex justify-between items-center mb-4">
                    <h2 class="text-2xl font-bold text-gray-800 flex items-center">
                        <i data-feather="map" class="mr-2 text-blue-500"></i> Interactive Travel Map
                    </h2>
                    <button id="resetView" class="px-4 py-2 bg-blue-500 hover:bg-blue-600 text-white rounded-lg transition duration-300 flex items-center">
                        <i data-feather="refresh-cw" class="mr-2 w-4 h-4"></i> Reset View
                    </button>
                </div>
                <p class="text-gray-600 mb-6">Click on any pin to see details about my visit. Drag and zoom to explore!</p>
                <div id="map" class="rounded-xl overflow-hidden border border-gray-300"></div>
                <div class="mt-4 text-sm text-gray-500 flex items-center">
                    <i data-feather="info" class="mr-2 w-4 h-4"></i>
                    <span>Map data Β© OpenStreetMap contributors | Icons by Feather Icons</span>
                </div>
            </div>
        </section>

        <!-- Destinations Grid -->
        <section class="mb-16">
            <h2 class="text-3xl font-bold text-gray-800 mb-8 text-center">My Travel Destinations</h2>
            <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6">
                <!-- Destination cards will be populated by JavaScript -->
            </div>
        </section>

        <!-- Travel Stats -->
        <section class="mb-16">
            <div class="bg-gradient-to-r from-blue-500 to-purple-600 rounded-2xl shadow-xl p-8 text-white">
                <h2 class="text-3xl font-bold mb-6 text-center">Travel Statistics</h2>
                <div class="grid grid-cols-2 md:grid-cols-4 gap-6">
                    <div class="text-center">
                        <div class="text-4xl font-bold mb-2">7</div>
                        <div class="text-blue-100">Destinations</div>
                    </div>
                    <div class="text-center">
                        <div class="text-4xl font-bold mb-2">4</div>
                        <div class="text-blue-100">Countries</div>
                    </div>
                    <div class="text-center">
                        <div class="text-4xl font-bold mb-2">1</div>
                        <div class="text-blue-100">Continent</div>
                    </div>
                    <div class="text-center">
                        <div class="text-4xl font-bold mb-2">∞</div>
                        <div class="text-blue-100">Memories</div>
                    </div>
                </div>
                <div class="mt-8 text-center">
                    <p class="text-blue-100 italic">"The world is a book and those who do not travel read only one page." - Saint Augustine</p>
                </div>
            </div>
        </section>

        <!-- Timeline Preview -->
        <section class="mb-16">
            <div class="bg-white rounded-2xl shadow-xl p-6 border border-gray-200">
                <h2 class="text-2xl font-bold text-gray-800 mb-6 flex items-center">
                    <i data-feather="clock" class="mr-2 text-blue-500"></i> Travel Timeline
                </h2>
                <div class="relative">
                    <div class="absolute left-1/2 transform -translate-x-1/2 h-full w-1 bg-blue-200"></div>
                    
                    <div class="mb-8 flex items-center">
                        <div class="w-1/2 pr-8 text-right">
                            <div class="bg-blue-100 p-4 rounded-lg inline-block">
                                <h3 class="font-bold text-blue-800">Bangkok, Thailand</h3>
                                <p class="text-sm text-blue-600">The City of Angels</p>
                            </div>
                        </div>
                        <div class="absolute left-1/2 transform -translate-x-1/2 w-4 h-4 bg-blue-500 rounded-full border-4 border-white"></div>
                        <div class="w-1/2 pl-8">
                            <p class="text-gray-600">Vibrant street markets and majestic temples</p>
                        </div>
                    </div>

                    <div class="mb-8 flex items-center">
                        <div class="w-1/2 pr-8 text-right">
                            <p class="text-gray-600">Island paradise with stunning beaches</p>
                        </div>
                        <div class="absolute left-1/2 transform -translate-x-1/2 w-4 h-4 bg-green-500 rounded-full border-4 border-white"></div>
                        <div class="w-1/2 pl-8">
                            <div class="bg-green-100 p-4 rounded-lg inline-block">
                                <h3 class="font-bold text-green-800">Phuket, Thailand</h3>
                                <p class="text-sm text-green-600">Tropical Paradise</p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="text-center mt-6">
                    <a href="timeline.html" class="inline-flex items-center px-6 py-3 bg-blue-500 hover:bg-blue-600 text-white rounded-lg transition duration-300">
                        View Full Timeline
                        <i data-feather="arrow-right" class="ml-2 w-4 h-4"></i>
                    </a>
                </div>
            </div>
        </section>
    </main>

    <custom-footer></custom-footer>

    <script src="script.js"></script>
    <script>
        feather.replace();
        
        // Initialize map after DOM is loaded
        document.addEventListener('DOMContentLoaded', function() {
            // Map initialization
            const map = L.map('map').setView([15.8700, 100.9925], 5);
            
            L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
                attribution: 'Β© OpenStreetMap contributors',
                maxZoom: 18,
            }).addTo(map);

            // Destination data with coordinates
            const destinations = [
                {
                    name: "Bangkok, Thailand",
                    lat: 13.7563,
                    lng: 100.5018,
                    country: "Thailand",
                    description: "Vibrant capital city with amazing street food and temples",
                    icon: "map-pin",
                    color: "blue",
                    image: "http://static.photos/cityscape/640x360/101"
                },
                {
                    name: "Phuket, Thailand",
                    lat: 7.8804,
                    lng: 98.3923,
                    country: "Thailand",
                    description: "Tropical island paradise with stunning beaches",
                    icon: "sun",
                    color: "green",
                    image: "http://static.photos/nature/640x360/102"
                },
                {
                    name: "Hong Kong",
                    lat: 22.3193,
                    lng: 114.1694,
                    country: "China",
                    description: "Bustling metropolis with stunning skyline",
                    icon: "trending-up",
                    color: "red",
                    image: "http://static.photos/cityscape/640x360/103"
                },
                {
                    name: "Beijing, China",
                    lat: 39.9042,
                    lng: 116.4074,
                    country: "China",
                    description: "Ancient capital with rich history",
                    icon: "flag",
                    color: "red",
                    image: "http://static.photos/travel/640x360/104"
                },
                {
                    name: "Singapore",
                    lat: 1.3521,
                    lng: 103.8198,
                    country: "Singapore",
                    description: "Garden city with modern architecture",
                    icon: "feather",
                    color: "blue",
                    image: "http://static.photos/technology/640x360/105"
                },
                {
                    name: "Kuala Lumpur, Malaysia",
                    lat: 3.1390,
                    lng: 101.6869,
                    country: "Malaysia",
                    description: "Cultural melting pot with iconic towers",
                    icon: "home",
                    color: "yellow",
                    image: "http://static.photos/cityscape/640x360/106"
                },
                {
                    name: "Hanoi, Vietnam",
                    lat: 21.0285,
                    lng: 105.8542,
                    country: "Vietnam",
                    description: "Charming city with French colonial architecture",
                    icon: "coffee",
                    color: "green",
                    image: "http://static.photos/travel/640x360/107"
                }
            ];

            // Create marker cluster group
            const markers = L.markerClusterGroup();

            destinations.forEach(dest => {
                // Create custom icon
                const customIcon = L.divIcon({
                    html: `<div class="custom-marker"><i data-feather="${dest.icon}" style="color: ${dest.color}; width: 24px; height: 24px;"></i></div>`,
                    className: 'custom-div-icon',
                    iconSize: [30, 30],
                    iconAnchor: [15, 30]
                });

                const marker = L.marker([dest.lat, dest.lng], { icon: customIcon });
                
                marker.bindPopup(`
                    <div class="p-2">
                        <h3 class="font-bold text-lg">${dest.name}</h3>
                        <p class="text-gray-600">${dest.country}</p>
                        <p class="mt-2">${dest.description}</p>
                        <img src="${dest.image}" alt="${dest.name}" class="mt-2 rounded-lg w-full h-32 object-cover">
                    </div>
                `);
                
                markers.addLayer(marker);
            });

            map.addLayer(markers);

            // Reset view button
            document.getElementById('resetView').addEventListener('click', () => {
                map.setView([15.8700, 100.9925], 5);
            });

            // Populate destination cards
            const gridContainer = document.querySelector('.grid');
            destinations.forEach(dest => {
                const card = document.createElement('travel-card');
                card.setAttribute('name', dest.name);
                card.setAttribute('country', dest.country);
                card.setAttribute('description', dest.description);
                card.setAttribute('image', dest.image);
                card.setAttribute('icon', dest.icon);
                card.setAttribute('color', dest.color);
                gridContainer.appendChild(card);
            });

            // Update feather icons for markers
            setTimeout(() => feather.replace(), 100);
        });
    </script>
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
</body>
</html>