File size: 14,266 Bytes
08f4187
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>MetaSearch - Compare Search Engines</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>
        .search-column {
            transition: all 0.3s ease;
        }
        .search-column:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        }
        .iframe-container {
            position: relative;
            overflow: hidden;
            padding-top: 100%;
        }
        .iframe-container iframe {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border: none;
        }
        .search-input {
            transition: all 0.3s ease;
        }
        .search-input:focus {
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
        }
        .engine-option {
            transition: all 0.2s ease;
        }
        .engine-option:hover {
            transform: scale(1.05);
        }
        .engine-option input:checked + label {
            border-color: #3b82f6;
            background-color: #eff6ff;
        }
        .fade-in {
            animation: fadeIn 0.5s ease-in-out;
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
    </style>
</head>
<body class="bg-gray-50 min-h-screen">
    <div class="container mx-auto px-4 py-8">
        <!-- Header -->
        <header class="text-center mb-12">
            <h1 class="text-4xl font-bold text-blue-600 mb-2">MetaSearch</h1>
            <p class="text-gray-600">Compare search results across multiple engines simultaneously</p>
        </header>

        <!-- Search Section -->
        <div class="max-w-3xl mx-auto bg-white rounded-xl shadow-md overflow-hidden p-6 mb-8">
            <div class="flex items-center">
                <div class="relative flex-grow">
                    <input 
                        type="text" 
                        id="searchQuery" 
                        placeholder="Search the web..." 
                        class="search-input w-full py-4 px-6 border border-gray-300 rounded-l-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
                    >
                    <button 
                        id="searchButton" 
                        class="absolute right-0 top-0 h-full px-4 text-gray-500 hover:text-blue-500 focus:outline-none"
                    >
                        <i class="fas fa-search"></i>
                    </button>
                </div>
                <button 
                    id="searchSubmit" 
                    class="bg-blue-600 hover:bg-blue-700 text-white py-4 px-6 rounded-r-lg transition duration-300"
                >
                    Search
                </button>
            </div>

            <!-- Search Engine Selection -->
            <div class="mt-6">
                <h3 class="text-lg font-medium text-gray-700 mb-3">Select Search Engines:</h3>
                <div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-3">
                    <div class="engine-option">
                        <input type="checkbox" id="google" name="engine" value="google" checked class="hidden peer">
                        <label for="google" class="flex items-center justify-center p-3 border-2 border-gray-200 rounded-lg cursor-pointer peer-checked:border-blue-500 peer-checked:bg-blue-50">
                            <img src="https://www.google.com/favicon.ico" alt="Google" class="w-5 h-5 mr-2">
                            <span>Google</span>
                        </label>
                    </div>
                    <div class="engine-option">
                        <input type="checkbox" id="bing" name="engine" value="bing" class="hidden peer">
                        <label for="bing" class="flex items-center justify-center p-3 border-2 border-gray-200 rounded-lg cursor-pointer peer-checked:border-blue-500 peer-checked:bg-blue-50">
                            <img src="https://www.bing.com/favicon.ico" alt="Bing" class="w-5 h-5 mr-2">
                            <span>Bing</span>
                        </label>
                    </div>
                    <div class="engine-option">
                        <input type="checkbox" id="yahoo" name="engine" value="yahoo" class="hidden peer">
                        <label for="yahoo" class="flex items-center justify-center p-3 border-2 border-gray-200 rounded-lg cursor-pointer peer-checked:border-blue-500 peer-checked:bg-blue-50">
                            <img src="https://www.yahoo.com/favicon.ico" alt="Yahoo" class="w-5 h-5 mr-2">
                            <span>Yahoo</span>
                        </label>
                    </div>
                    <div class="engine-option">
                        <input type="checkbox" id="duckduckgo" name="engine" value="duckduckgo" class="hidden peer">
                        <label for="duckduckgo" class="flex items-center justify-center p-3 border-2 border-gray-200 rounded-lg cursor-pointer peer-checked:border-blue-500 peer-checked:bg-blue-50">
                            <img src="https://duckduckgo.com/favicon.ico" alt="DuckDuckGo" class="w-5 h-5 mr-2">
                            <span>DuckDuckGo</span>
                        </label>
                    </div>
                    <div class="engine-option">
                        <input type="checkbox" id="baidu" name="engine" value="baidu" class="hidden peer">
                        <label for="baidu" class="flex items-center justify-center p-3 border-2 border-gray-200 rounded-lg cursor-pointer peer-checked:border-blue-500 peer-checked:bg-blue-50">
                            <img src="https://www.baidu.com/favicon.ico" alt="Baidu" class="w-5 h-5 mr-2">
                            <span>Baidu</span>
                        </label>
                    </div>
                    <div class="engine-option">
                        <input type="checkbox" id="yandex" name="engine" value="yandex" class="hidden peer">
                        <label for="yandex" class="flex items-center justify-center p-3 border-2 border-gray-200 rounded-lg cursor-pointer peer-checked:border-blue-500 peer-checked:bg-blue-50">
                            <img src="https://yandex.com/favicon.ico" alt="Yandex" class="w-5 h-5 mr-2">
                            <span>Yandex</span>
                        </label>
                    </div>
                </div>
            </div>
        </div>

        <!-- Results Section -->
        <div id="resultsContainer" class="hidden">
            <div class="flex justify-between items-center mb-4">
                <h2 class="text-xl font-semibold text-gray-800">Search Results for: <span id="queryDisplay" class="text-blue-600"></span></h2>
                <button id="newSearchBtn" class="text-blue-600 hover:text-blue-800 flex items-center">
                    <i class="fas fa-redo mr-2"></i> New Search
                </button>
            </div>
            
            <div id="searchColumns" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
                <!-- Columns will be added dynamically here -->
            </div>
        </div>

        <!-- Empty State -->
        <div id="emptyState" class="text-center py-16">
            <div class="inline-block p-6 bg-blue-100 rounded-full mb-4">
                <i class="fas fa-search text-blue-600 text-4xl"></i>
            </div>
            <h3 class="text-xl font-medium text-gray-700 mb-2">Ready to compare search engines?</h3>
            <p class="text-gray-500 max-w-md mx-auto">Enter your search query above and select which search engines you want to compare.</p>
        </div>
    </div>

    <script>
        document.addEventListener('DOMContentLoaded', function() {
            const searchQuery = document.getElementById('searchQuery');
            const searchButton = document.getElementById('searchButton');
            const searchSubmit = document.getElementById('searchSubmit');
            const resultsContainer = document.getElementById('resultsContainer');
            const emptyState = document.getElementById('emptyState');
            const searchColumns = document.getElementById('searchColumns');
            const queryDisplay = document.getElementById('queryDisplay');
            const newSearchBtn = document.getElementById('newSearchBtn');
            
            // Search engine URLs mapping
            const engineUrls = {
                google: 'https://www.google.com/search?q=',
                bing: 'https://www.bing.com/search?q=',
                yahoo: 'https://search.yahoo.com/search?p=',
                duckduckgo: 'https://duckduckgo.com/?q=',
                baidu: 'https://www.baidu.com/s?wd=',
                yandex: 'https://yandex.com/search/?text='
            };
            
            // Engine display names
            const engineNames = {
                google: 'Google',
                bing: 'Bing',
                yahoo: 'Yahoo',
                duckduckgo: 'DuckDuckGo',
                baidu: 'Baidu',
                yandex: 'Yandex'
            };
            
            // Engine icons (using Font Awesome as fallback)
            const engineIcons = {
                google: 'fab fa-google',
                bing: 'fab fa-microsoft',
                yahoo: 'fab fa-yahoo',
                duckduckgo: 'fas fa-search',
                baidu: 'fas fa-bold',
                yandex: 'fas fa-y-combinator'
            };
            
            // Handle search submission
            function performSearch() {
                const query = searchQuery.value.trim();
                if (!query) return;
                
                // Get selected engines
                const selectedEngines = Array.from(document.querySelectorAll('input[name="engine"]:checked'))
                    .map(el => el.value);
                
                if (selectedEngines.length === 0) {
                    alert('Please select at least one search engine');
                    return;
                }
                
                // Display results
                emptyState.classList.add('hidden');
                resultsContainer.classList.remove('hidden');
                queryDisplay.textContent = query;
                
                // Clear previous results
                searchColumns.innerHTML = '';
                
                // Create columns for each selected engine
                selectedEngines.forEach((engine, index) => {
                    const column = document.createElement('div');
                    column.className = `search-column bg-white rounded-xl shadow-md overflow-hidden fade-in`;
                    column.style.animationDelay = `${index * 0.1}s`;
                    
                    // Column header
                    const header = document.createElement('div');
                    header.className = 'bg-gray-50 px-4 py-3 border-b border-gray-200 flex items-center';
                    
                    const icon = document.createElement('i');
                    icon.className = engineIcons[engine] + ' mr-2 text-blue-500';
                    
                    const title = document.createElement('h3');
                    title.className = 'font-medium text-gray-700';
                    title.textContent = engineNames[engine];
                    
                    header.appendChild(icon);
                    header.appendChild(title);
                    
                    // Iframe for search results
                    const iframeContainer = document.createElement('div');
                    iframeContainer.className = 'iframe-container';
                    
                    const iframe = document.createElement('iframe');
                    iframe.src = engineUrls[engine] + encodeURIComponent(query);
                    iframe.setAttribute('frameborder', '0');
                    iframe.setAttribute('allow', '');
                    
                    iframeContainer.appendChild(iframe);
                    
                    // Append elements to column
                    column.appendChild(header);
                    column.appendChild(iframeContainer);
                    
                    // Add column to container
                    searchColumns.appendChild(column);
                });
                
                // Scroll to results
                resultsContainer.scrollIntoView({ behavior: 'smooth' });
            }
            
            // Event listeners
            searchSubmit.addEventListener('click', performSearch);
            searchButton.addEventListener('click', performSearch);
            
            searchQuery.addEventListener('keypress', function(e) {
                if (e.key === 'Enter') {
                    performSearch();
                }
            });
            
            newSearchBtn.addEventListener('click', function() {
                resultsContainer.classList.add('hidden');
                emptyState.classList.remove('hidden');
                searchQuery.focus();
            });
        });
    </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=musicakamusic/side-by-side" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>