File size: 32,403 Bytes
c12db6a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>YouTube Embed Plugin for WordPress</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        .fade-in {
            animation: fadeIn 0.3s ease-in-out;
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .channel-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        }
        .video-thumbnail:hover {
            transform: scale(1.03);
        }
        .tab-active {
            border-bottom: 3px solid #3b82f6;
            color: #3b82f6;
        }
    </style>
</head>
<body class="bg-gray-50">
    <div class="container mx-auto px-4 py-8 max-w-6xl">
        <div class="bg-white rounded-xl shadow-md overflow-hidden p-6 mb-8">
            <div class="flex items-center justify-between mb-6">
                <div>
                    <h1 class="text-3xl font-bold text-gray-800 flex items-center">
                        <i class="fab fa-youtube text-red-600 mr-3"></i>
                        YouTube Embed Plugin
                    </h1>
                    <p class="text-gray-600">Embed YouTube videos automatically with powerful customization options</p>
                </div>
                <div class="flex space-x-3">
                    <button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg flex items-center">
                        <i class="fas fa-save mr-2"></i> Save Settings
                    </button>
                    <button id="downloadBtn" class="bg-green-600 hover:bg-green-700 text-white px-4 py-2 rounded-lg flex items-center">
                        <i class="fas fa-download mr-2"></i> Download Plugin
                    </button>
                </div>
            </div>

            <div class="border-b border-gray-200 mb-6">
                <nav class="-mb-px flex space-x-8">
                    <button id="settings-tab" class="tab-active whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm">Plugin Settings</button>
                    <button id="channels-tab" class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm text-gray-500 hover:text-gray-700">Manage Channels</button>
                    <button id="categories-tab" class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm text-gray-500 hover:text-gray-700">Post Categories</button>
                    <button id="preview-tab" class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm text-gray-500 hover:text-gray-700">Video Preview</button>
                </nav>
            </div>

            <!-- Settings Tab -->
            <div id="settings-content" class="fade-in">
                <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-8">
                    <div class="bg-gray-50 p-5 rounded-lg">
                        <h3 class="text-lg font-medium text-gray-900 mb-3">Basic Settings</h3>
                        <div class="space-y-4">
                            <div>
                                <label for="cache_duration" class="block text-sm font-medium text-gray-700 mb-1">Cache Duration</label>
                                <select id="cache_duration" class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md">
                                    <option value="3600">1 Hour</option>
                                    <option value="10800" selected>3 Hours</option>
                                    <option value="21600">6 Hours</option>
                                    <option value="43200">12 Hours</option>
                                    <option value="86400">24 Hours</option>
                                </select>
                            </div>
                            <div>
                                <label for="max_videos" class="block text-sm font-medium text-gray-700 mb-1">Max Videos to Fetch</label>
                                <select id="max_videos" class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md">
                                    <option value="5">5 Videos</option>
                                    <option value="10" selected>10 Videos</option>
                                    <option value="15">15 Videos</option>
                                    <option value="20">20 Videos</option>
                                    <option value="25">25 Videos</option>
                                </select>
                            </div>
                            <div class="flex items-center">
                                <input id="auto_post" name="auto_post" type="checkbox" checked class="focus:ring-blue-500 h-4 w-4 text-blue-600 border-gray-300 rounded">
                                <label for="auto_post" class="ml-2 block text-sm text-gray-900">Auto-post videos hourly</label>
                            </div>
                            <div class="flex items-center">
                                <input id="disable_cookies" name="disable_cookies" type="checkbox" class="focus:ring-blue-500 h-4 w-4 text-blue-600 border-gray-300 rounded">
                                <label for="disable_cookies" class="ml-2 block text-sm text-gray-900">Disable YouTube cookies in embeds</label>
                            </div>
                        </div>
                    </div>

                    <div class="bg-gray-50 p-5 rounded-lg">
                        <h3 class="text-lg font-medium text-gray-900 mb-3">SEO & Advanced</h3>
                        <div class="space-y-4">
                            <div>
                                <label for="video_layout" class="block text-sm font-medium text-gray-700 mb-1">Video Layout</label>
                                <select id="video_layout" class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md">
                                    <option value="grid">Grid View</option>
                                    <option value="list" selected>List View</option>
                                    <option value="carousel">Carousel</option>
                                </select>
                            </div>
                            <div class="flex items-center">
                                <input id="enable_seo" name="enable_seo" type="checkbox" checked class="focus:ring-blue-500 h-4 w-4 text-blue-600 border-gray-300 rounded">
                                <label for="enable_seo" class="ml-2 block text-sm text-gray-900">Enable SEO optimizations</label>
                            </div>
                            <div class="flex items-center">
                                <input id="lazy_load" name="lazy_load" type="checkbox" checked class="focus:ring-blue-500 h-4 w-4 text-blue-600 border-gray-300 rounded">
                                <label for="lazy_load" class="ml-2 block text-sm text-gray-900">Lazy load videos</label>
                            </div>
                            <div class="flex items-center">
                                <input id="show_related" name="show_related" type="checkbox" class="focus:ring-blue-500 h-4 w-4 text-blue-600 border-gray-300 rounded">
                                <label for="show_related" class="ml-2 block text-sm text-gray-900">Show related videos</label>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="bg-gray-50 p-5 rounded-lg mb-6">
                    <h3 class="text-lg font-medium text-gray-900 mb-3">Feed Sources</h3>
                    <div class="space-y-4">
                        <div class="flex items-center space-x-4">
                            <div class="flex items-center">
                                <input id="feed_channel" name="feed_type" type="radio" checked class="focus:ring-blue-500 h-4 w-4 text-blue-600 border-gray-300">
                                <label for="feed_channel" class="ml-2 block text-sm text-gray-900">Channel Feed</label>
                            </div>
                            <div class="flex items-center">
                                <input id="feed_playlist" name="feed_type" type="radio" class="focus:ring-blue-500 h-4 w-4 text-blue-600 border-gray-300">
                                <label for="feed_playlist" class="ml-2 block text-sm text-gray-900">Playlist Feed</label>
                            </div>
                        </div>
                        <p class="text-sm text-gray-500">Use the Channels tab to add and manage multiple YouTube channels</p>
                    </div>
                </div>

                <div class="bg-gray-50 p-5 rounded-lg">
                    <h3 class="text-lg font-medium text-gray-900 mb-3">Shortcode Usage</h3>
                    <div class="bg-gray-800 text-gray-100 p-4 rounded-md mb-3">
                        <code class="text-sm">
                            [youtube_embed channel="UCXXXXXX" count="5" layout="grid" category="news"]
                        </code>
                    </div>
                    <div class="flex flex-wrap gap-2">
                        <div class="bg-blue-100 text-blue-800 px-3 py-1 rounded-full text-xs">channel="UCXXXXXX"</div>
                        <div class="bg-blue-100 text-blue-800 px-3 py-1 rounded-full text-xs">count="5"</div>
                        <div class="bg-blue-100 text-blue-800 px-3 py-1 rounded-full text-xs">layout="grid"</div>
                        <div class="bg-blue-100 text-blue-800 px-3 py-1 rounded-full text-xs">category="news"</div>
                        <div class="bg-blue-100 text-blue-800 px-3 py-1 rounded-full text-xs">search="keyword"</div>
                        <div class="bg-blue-100 text-blue-800 px-3 py-1 rounded-full text-xs">nocookies="true"</div>
                    </div>
                </div>
            </div>

            <!-- Channels Tab -->
            <div id="channels-content" class="hidden fade-in">
                <div class="bg-gray-50 p-5 rounded-lg mb-6">
                    <h3 class="text-lg font-medium text-gray-900 mb-4">Add New Channel</h3>
                    <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
                        <div>
                            <label for="channel_id" class="block text-sm font-medium text-gray-700 mb-1">Channel ID</label>
                            <input type="text" id="channel_id" class="mt-1 block w-full shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm border-gray-300 rounded-md p-2" placeholder="UCxxxxxxxxxxxxxxxxx">
                        </div>
                        <div>
                            <label for="channel_name" class="block text-sm font-medium text-gray-700 mb-1">Display Name</label>
                            <input type="text" id="channel_name" class="mt-1 block w-full shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm border-gray-300 rounded-md p-2" placeholder="My YouTube Channel">
                        </div>
                        <div class="flex items-end">
                            <button id="add-channel-btn" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg flex items-center">
                                <i class="fas fa-plus-circle mr-2"></i> Add Channel
                            </button>
                        </div>
                    </div>
                    <p class="mt-2 text-sm text-gray-500">Find your Channel ID in your YouTube account settings</p>
                </div>

                <div class="bg-white border border-gray-200 rounded-lg overflow-hidden">
                    <h4 class="bg-gray-50 px-4 py-3 text-sm font-medium text-gray-700 border-b border-gray-200">Your YouTube Channels</h4>
                    <div id="channels-list" class="divide-y divide-gray-200">
                        <!-- Channels will be added here dynamically -->
                        <div class="p-4">
                            <p class="text-gray-500 text-center">No channels added yet</p>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Categories Tab -->
            <div id="categories-content" class="hidden fade-in">
                <div class="bg-gray-50 p-5 rounded-lg mb-6">
                    <h3 class="text-lg font-medium text-gray-900 mb-3">Post Categories</h3>
                    <p class="text-sm text-gray-600 mb-4">Select which WordPress categories videos will be posted to. You can assign different categories for different channels.</p>
                    
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                        <div>
                            <label for="default_category" class="block text-sm font-medium text-gray-700 mb-1">Default Category</label>
                            <select id="default_category" class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md">
                                <option value="0">-- Select Category --</option>
                                <option value="1" selected>Videos</option>
                                <option value="2">News</option>
                                <option value="3">Tutorials</option>
                                <option value="4">Entertainment</option>
                            </select>
                        </div>
                        <div>
                            <label for="category_mapping" class="block text-sm font-medium text-gray-700 mb-1">Category Mapping</label>
                            <button id="add-mapping-btn" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg flex items-center">
                                <i class="fas fa-plus-circle mr-2"></i> Add Channel-Category Mapping
                            </button>
                        </div>
                    </div>
                </div>

                <div class="bg-white border border-gray-200 rounded-lg overflow-hidden">
                    <h4 class="bg-gray-50 px-4 py-3 text-sm font-medium text-gray-700 border-b border-gray-200">Current Mappings</h4>
                    <div id="mappings-list" class="divide-y divide-gray-200">
                        <div class="grid grid-cols-12 gap-4 items-center p-4">
                            <div class="col-span-5 font-medium">Channel Name</div>
                            <div class="col-span-5 font-medium">Category</div>
                            <div class="col-span-2 font-medium">Actions</div>
                        </div>
                        <div class="grid grid-cols-12 gap-4 items-center p-4 bg-gray-50">
                            <div class="col-span-5">My YouTube Channel</div>
                            <div class="col-span-5">Tutorials</div>
                            <div class="col-span-2">
                                <button class="text-red-600 hover:text-red-800">
                                    <i class="fas fa-trash-alt"></i>
                                </button>
                            </div>
                        </div>
                        <div class="grid grid-cols-12 gap-4 items-center p-4">
                            <div class="col-span-5">Tech Videos</div>
                            <div class="col-span-5">News</div>
                            <div class="col-span-2">
                                <button class="text-red-600 hover:text-red-800">
                                    <i class="fas fa-trash-alt"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Preview Tab -->
            <div id="preview-content" class="hidden fade-in">
                <div class="bg-gray-50 p-5 rounded-lg mb-6">
                    <h3 class="text-lg font-medium text-gray-900 mb-3">Video Preview</h3>
                    <div class="flex flex-wrap items-center justify-between gap-4 mb-4">
                        <div class="flex-1 min-w-[200px]">
                            <label for="preview_channel" class="block text-sm font-medium text-gray-700 mb-1">Select Channel</label>
                            <select id="preview_channel" class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md">
                                <option value="all">All Channels</option>
                                <option value="UCXXXXXX1">My YouTube Channel</option>
                                <option value="UCXXXXXX2">Tech Videos</option>
                            </select>
                        </div>
                        <div class="flex-1 min-w-[200px]">
                            <label for="preview_search" class="block text-sm font-medium text-gray-700 mb-1">Search Videos</label>
                            <input type="text" id="preview_search" class="mt-1 block w-full shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm border-gray-300 rounded-md p-2" placeholder="Search by title...">
                        </div>
                        <div class="flex-1 min-w-[200px]">
                            <label for="preview_sort" class="block text-sm font-medium text-gray-700 mb-1">Sort By</label>
                            <select id="preview_sort" class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md">
                                <option value="date_newest">Date (Newest First)</option>
                                <option value="date_oldest">Date (Oldest First)</option>
                                <option value="title_asc">Title (A-Z)</option>
                                <option value="title_desc">Title (Z-A)</option>
                            </select>
                        </div>
                    </div>
                </div>

                <div id="preview-results">
                    <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
                        <!-- Example video cards -->
                        <div class="bg-white border border-gray-200 rounded-lg overflow-hidden shadow-sm hover:shadow-md transition-shadow duration-200">
                            <div class="video-thumbnail relative pb-[56.25%] overflow-hidden transition-transform duration-200">
                                <img src="https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg" alt="Video thumbnail" class="absolute h-full w-full object-cover">
                                <div class="absolute inset-0 bg-black bg-opacity-30 flex items-center justify-center">
                                    <div class="w-12 h-12 bg-red-600 rounded-full flex items-center justify-center">
                                        <i class="fas fa-play text-white"></i>
                                    </div>
                                </div>
                                <div class="absolute bottom-2 right-2 bg-black bg-opacity-70 text-white text-xs px-1.5 py-0.5 rounded">
                                    10:24
                                </div>
                            </div>
                            <div class="p-4">
                                <h4 class="text-lg font-medium text-gray-900 mb-1 line-clamp-2">Never Gonna Give You Up - Rick Astley (Official Music Video)</h4>
                                <p class="text-sm text-gray-600 mb-2">My YouTube Channel β€’ 2 days ago</p>
                                <p class="text-sm text-gray-500 line-clamp-2">The official video for "Never Gonna Give You Up" by Rick Astley, the song that started the Rickrolling phenomenon.</p>
                                <div class="mt-3 flex justify-between items-center">
                                    <span class="text-xs text-gray-500">1.2B views</span>
                                    <button class="text-blue-600 hover:text-blue-800 text-sm font-medium">
                                        <i class="fas fa-plus-circle mr-1"></i> Post to Site
                                    </button>
                                </div>
                            </div>
                        </div>

                        <div class="bg-white border border-gray-200 rounded-lg overflow-hidden shadow-sm hover:shadow-md transition-shadow duration-200">
                            <div class="video-thumbnail relative pb-[56.25%] overflow-hidden transition-transform duration-200">
                                <img src="https://i.ytimg.com/vi/9bZkp7q19f0/hqdefault.jpg" alt="Video thumbnail" class="absolute h-full w-full object-cover">
                                <div class="absolute inset-0 bg-black bg-opacity-30 flex items-center justify-center">
                                    <div class="w-12 h-12 bg-red-600 rounded-full flex items-center justify-center">
                                        <i class="fas fa-play text-white"></i>
                                    </div>
                                </div>
                                <div class="absolute bottom-2 right-2 bg-black bg-opacity-70 text-white text-xs px-1.5 py-0.5 rounded">
                                    4:12
                                </div>
                            </div>
                            <div class="p-4">
                                <h4 class="text-lg font-medium text-gray-900 mb-1 line-clamp-2">PSY - GANGNAM STYLE(κ°•λ‚¨μŠ€νƒ€μΌ) M/V</h4>
                                <p class="text-sm text-gray-600 mb-2">Tech Videos β€’ 1 week ago</p>
                                <p class="text-sm text-gray-500 line-clamp-2">The most viewed video on YouTube with over 4 billion views. PSY's global hit that took the world by storm.</p>
                                <div class="mt-3 flex justify-between items-center">
                                    <span class="text-xs text-gray-500">4.5B views</span>
                                    <button class="text-blue-600 hover:text-blue-800 text-sm font-medium">
                                        <i class="fas fa-plus-circle mr-1"></i> Post to Site
                                    </button>
                                </div>
                            </div>
                        </div>

                        <div class="bg-white border border-gray-200 rounded-lg overflow-hidden shadow-sm hover:shadow-md transition-shadow duration-200">
                            <div class="video-thumbnail relative pb-[56.25%] overflow-hidden transition-transform duration-200">
                                <img src="https://i.ytimg.com/vi/JGwWNGJdvx8/hqdefault.jpg" alt="Video thumbnail" class="absolute h-full w-full object-cover">
                                <div class="absolute inset-0 bg-black bg-opacity-30 flex items-center justify-center">
                                    <div class="w-12 h-12 bg-red-600 rounded-full flex items-center justify-center">
                                        <i class="fas fa-play text-white"></i>
                                    </div>
                                </div>
                                <div class="absolute bottom-2 right-2 bg-black bg-opacity-70 text-white text-xs px-1.5 py-0.5 rounded">
                                    3:23
                                </div>
                            </div>
                            <div class="p-4">
                                <h4 class="text-lg font-medium text-gray-900 mb-1 line-clamp-2">Ed Sheeran - Shape of You</h4>
                                <p class="text-sm text-gray-600 mb-2">My YouTube Channel β€’ 3 weeks ago</p>
                                <p class="text-sm text-gray-500 line-clamp-2">Ed Sheeran's chart-topping hit that became one of the most streamed songs of all time.</p>
                                <div class="mt-3 flex justify-between items-center">
                                    <span class="text-xs text-gray-500">3.8B views</span>
                                    <button class="text-blue-600 hover:text-blue-800 text-sm font-medium">
                                        <i class="fas fa-plus-circle mr-1"></i> Post to Site
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="bg-white rounded-xl shadow-md overflow-hidden p-6">
            <h2 class="text-xl font-bold text-gray-800 mb-4">Plugin File Structure</h2>
            <div class="bg-gray-800 text-gray-100 p-4 rounded-md mb-4">
                <pre class="text-sm">
youtube-embed-plugin/
β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ css/
β”‚   β”‚   └── admin.css
β”‚   β”œβ”€β”€ js/
β”‚   β”‚   └── admin.js
β”‚   └── images/
β”‚       └── icon-128x128.png
β”œβ”€β”€ includes/
β”‚   β”œβ”€β”€ class-yt-embed-admin.php
β”‚   β”œβ”€β”€ class-yt-embed-cron.php
β”‚   β”œβ”€β”€ class-yt-embed-feed.php
β”‚   β”œβ”€β”€ class-yt-embed-shortcode.php
β”‚   └── class-yt-embed-widget.php
β”œβ”€β”€ languages/
β”œβ”€β”€ templates/
β”‚   β”œβ”€β”€ video-grid.php
β”‚   β”œβ”€β”€ video-list.php
β”‚   └── video-single.php
β”œβ”€β”€ uninstall.php
β”œβ”€β”€ index.php
└── youtube-embed-plugin.php</pre>
            </div>
            <div class="bg-blue-100 border-l-4 border-blue-500 p-4 mb-4">
                <div class="flex">
                    <div class="flex-shrink-0">
                        <i class="fas fa-info-circle text-blue-500"></i>
                    </div>
                    <div class="ml-3">
                        <h3 class="text-sm font-medium text-blue-800">Plugin Installation</h3>
                        <div class="mt-2 text-sm text-blue-700">
                            <p>To install this plugin:</p>
                            <ol class="list-decimal pl-5 mt-1 space-y-1">
                                <li>Download the zip file by clicking the button above</li>
                                <li>Go to WordPress admin β†’ Plugins β†’ Add New β†’ Upload Plugin</li>
                                <li>Select the zip file and click "Install Now"</li>
                                <li>Activate the plugin after installation</li>
                                <li>Configure settings under YouTube Embed in your dashboard</li>
                            </ol>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        // Tab switching functionality
        document.addEventListener('DOMContentLoaded', function() {
            const tabs = {
                'settings-tab': 'settings-content',
                'channels-tab': 'channels-content',
                'categories-tab': 'categories-content',
                'preview-tab': 'preview-content'
            };

            // Set up tab click handlers
            Object.keys(tabs).forEach(tabId => {
                const tab = document.getElementById(tabId);
                const content = document.getElementById(tabs[tabId]);
                
                tab.addEventListener('click', () => {
                    // Hide all content
                    Object.values(tabs).forEach(contentId => {
                        document.getElementById(contentId).classList.add('hidden');
                    });
                    
                    // Remove active class from all tabs
                    Object.keys(tabs).forEach(tabId => {
                        document.getElementById(tabId).classList.remove('tab-active');
                        document.getElementById(tabId).classList.add('text-gray-500', 'hover:text-gray-700');
                    });
                    
                    // Show selected content and mark tab as active
                    content.classList.remove('hidden');
                    tab.classList.add('tab-active');
                    tab.classList.remove('text-gray-500', 'hover:text-gray-700');
                });
            });

            // Channel management
            const channelsList = document.getElementById('channels-list');
            const addChannelBtn = document.getElementById('add-channel-btn');
            
            addChannelBtn.addEventListener('click', function() {
                const channelId = document.getElementById('channel_id').value.trim();
                const channelName = document.getElementById('channel_name').value.trim();
                
                if (channelId && channelName) {
                    // Add channel to the list
                    const channelHtml = `
                        <div class="flex justify-between items-center p-4 hover:bg-gray-50">
                            <div class="flex items-center space-x-4">
                                <div class="w-10 h-10 bg-gray-200 rounded-full flex items-center justify-center">
                                    <i class="fab fa-youtube text-red-600"></i>
                                </div>
                                <div>
                                    <h4 class="font-medium text-gray-900">${channelName}</h4>
                                    <p class="text-sm text-gray-500">${channelId}</p>
                                </div>
                            </div>
                            <div class="flex space-x-2">
                                <button class="text-blue-600 hover:text-blue-800 px-3 py-1 rounded">
                                    <i class="fas fa-edit"></i>
                                </button>
                                <button class="text-red-600 hover:text-red-800 px-3 py-1 rounded">
                                    <i class="fas fa-trash-alt"></i>
                                </button>
                            </div>
                        </div>
                    `;
                    
                    if (channelsList.querySelector('.text-center')) {
                        channelsList.innerHTML = channelHtml;
                    } else {
                        channelsList.insertAdjacentHTML('beforeend', channelHtml);
                    }
                    
                    // Clear inputs
                    document.getElementById('channel_id').value = '';
                    document.getElementById('channel_name').value = '';
                }
            });

            // Download button handler (demonstration only)
            document.getElementById('downloadBtn').addEventListener('click', function() {
                alert('In a real implementation, this would download the plugin zip file.\n\nFor demonstration purposes, this alert shows instead.');
            });
        });
    </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=smashmash/youtube-embed-plugin" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>