AnesKAM commited on
Commit
c2d7742
·
verified ·
1 Parent(s): 34b4d72

Create index.html

Browse files
Files changed (1) hide show
  1. index.html +356 -0
index.html ADDED
@@ -0,0 +1,356 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>SurfGO - Powered by AnesNT</title>
7
+ <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap" rel="stylesheet">
8
+ <style>
9
+ :root {
10
+ --primary-color: #2563eb;
11
+ --accent-color: #7c3aed;
12
+ --bg-color: #f8fafc;
13
+ --text-color: #1e293b;
14
+ --white: #ffffff;
15
+ --shadow: 0 10px 25px rgba(0,0,0,0.05);
16
+ --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
17
+ }
18
+
19
+ body {
20
+ font-family: 'Poppins', sans-serif;
21
+ background-color: var(--bg-color);
22
+ color: var(--text-color);
23
+ margin: 0;
24
+ display: flex;
25
+ flex-direction: column;
26
+ align-items: center;
27
+ min-height: 100vh;
28
+ }
29
+
30
+ /* Header Section */
31
+ .header {
32
+ width: 100%;
33
+ background: var(--white);
34
+ padding: 40px 0;
35
+ box-shadow: var(--shadow);
36
+ display: flex;
37
+ flex-direction: column;
38
+ align-items: center;
39
+ position: sticky;
40
+ top: 0;
41
+ z-index: 1000;
42
+ transition: var(--transition);
43
+ }
44
+
45
+ .header.compact { padding: 15px 0; }
46
+
47
+ .logo {
48
+ font-size: 3rem;
49
+ font-weight: 600;
50
+ color: var(--primary-color);
51
+ text-decoration: none;
52
+ letter-spacing: -1px;
53
+ transition: var(--transition);
54
+ }
55
+
56
+ .header.compact .logo { font-size: 1.5rem; }
57
+
58
+ .dev-info {
59
+ font-size: 0.9rem;
60
+ color: #64748b;
61
+ margin-bottom: 25px;
62
+ }
63
+
64
+ /* Search Box */
65
+ .search-container {
66
+ width: 90%;
67
+ max-width: 700px;
68
+ display: flex;
69
+ gap: 12px;
70
+ }
71
+
72
+ .input-group {
73
+ display: flex;
74
+ background: var(--white);
75
+ border-radius: 50px;
76
+ flex: 1;
77
+ box-shadow: var(--shadow);
78
+ overflow: hidden;
79
+ border: 2px solid transparent;
80
+ transition: var(--transition);
81
+ }
82
+
83
+ .input-group:focus-within {
84
+ border-color: var(--primary-color);
85
+ transform: scale(1.01);
86
+ }
87
+
88
+ input {
89
+ flex: 1;
90
+ border: none;
91
+ padding: 15px 25px;
92
+ font-size: 1.1rem;
93
+ outline: none;
94
+ font-family: inherit;
95
+ }
96
+
97
+ .search-btn {
98
+ background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
99
+ color: white;
100
+ border: none;
101
+ padding: 0 30px;
102
+ border-radius: 50px;
103
+ cursor: pointer;
104
+ font-weight: 600;
105
+ transition: var(--transition);
106
+ box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
107
+ }
108
+
109
+ .search-btn:hover {
110
+ opacity: 0.9;
111
+ transform: translateY(-2px);
112
+ }
113
+
114
+ /* Home Page Section */
115
+ #home-page {
116
+ display: flex;
117
+ flex-direction: column;
118
+ align-items: center;
119
+ justify-content: center;
120
+ flex: 1;
121
+ padding: 40px 20px;
122
+ animation: fadeIn 0.8s ease;
123
+ }
124
+
125
+ .quick-links {
126
+ margin-top: 50px;
127
+ display: grid;
128
+ grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
129
+ gap: 20px;
130
+ width: 100%;
131
+ max-width: 800px;
132
+ }
133
+
134
+ .link-card {
135
+ background: var(--white);
136
+ padding: 20px;
137
+ border-radius: 20px;
138
+ text-align: center;
139
+ text-decoration: none;
140
+ color: var(--text-color);
141
+ box-shadow: var(--shadow);
142
+ transition: var(--transition);
143
+ border: 1px solid rgba(0,0,0,0.05);
144
+ display: flex;
145
+ flex-direction: column;
146
+ align-items: center;
147
+ gap: 10px;
148
+ }
149
+
150
+ .link-card:hover {
151
+ transform: translateY(-10px);
152
+ border-color: var(--primary-color);
153
+ box-shadow: 0 15px 30px rgba(0,0,0,0.1);
154
+ }
155
+
156
+ .link-card img {
157
+ width: 48px;
158
+ height: 48px;
159
+ border-radius: 12px;
160
+ object-fit: cover;
161
+ }
162
+
163
+ .link-card span { font-size: 0.85rem; font-weight: 500; }
164
+
165
+ .genisi-card {
166
+ background: linear-gradient(45deg, var(--primary-color), var(--accent-color)) !important;
167
+ color: white !important;
168
+ }
169
+
170
+ /* Results Page Section */
171
+ #results-page {
172
+ display: none;
173
+ width: 90%;
174
+ max-width: 850px;
175
+ margin: 30px auto;
176
+ animation: slideUp 0.5s ease;
177
+ }
178
+
179
+ .result-card {
180
+ background: var(--white);
181
+ padding: 20px 25px;
182
+ border-radius: 15px;
183
+ box-shadow: var(--shadow);
184
+ text-decoration: none;
185
+ color: inherit;
186
+ transition: var(--transition);
187
+ border: 1px solid #e2e8f0;
188
+ margin-bottom: 20px;
189
+ display: block;
190
+ }
191
+
192
+ .result-card:hover {
193
+ transform: translateX(10px);
194
+ border-color: var(--primary-color);
195
+ box-shadow: 0 10px 20px rgba(0,0,0,0.08);
196
+ }
197
+
198
+ .result-url {
199
+ font-size: 0.8rem;
200
+ color: #94a3b8;
201
+ margin-bottom: 5px;
202
+ display: block;
203
+ }
204
+
205
+ .result-card h3 {
206
+ margin: 0 0 8px 0;
207
+ color: var(--primary-color);
208
+ font-size: 1.2rem;
209
+ }
210
+
211
+ .result-card p {
212
+ margin: 0;
213
+ font-size: 0.9rem;
214
+ color: #475569;
215
+ line-height: 1.6;
216
+ }
217
+
218
+ .loader {
219
+ display: none;
220
+ text-align: center;
221
+ margin: 30px 0;
222
+ font-weight: 500;
223
+ color: var(--primary-color);
224
+ }
225
+
226
+ @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
227
+ @keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
228
+
229
+ footer {
230
+ padding: 20px;
231
+ text-align: center;
232
+ font-size: 0.8rem;
233
+ color: #94a3b8;
234
+ }
235
+ </style>
236
+ </head>
237
+ <body>
238
+
239
+ <div class="header" id="main-header">
240
+ <a href="#" class="logo" onclick="goHome(event)">SurfGO</a>
241
+ <div class="dev-info">Developed by <b>AnesNT</b> 🇩🇿</div>
242
+
243
+ <div class="search-container">
244
+ <div class="input-group">
245
+ <input type="text" id="search-input" placeholder="Search the web with SurfGO...">
246
+ <button class="search-btn" onclick="performSearch()">Search</button>
247
+ </div>
248
+ </div>
249
+ </div>
250
+
251
+ <div id="home-page">
252
+ <div class="quick-links">
253
+ <a href="https://copilot.microsoft.com/" target="_blank" class="link-card genisi-card">
254
+ <img src="https://copilot.microsoft.com/th/id/BCO.f29916dd-b0c1-4089-87cd-43d099a7d1a6.png" alt="Genisi">
255
+ <span>Genisi AI</span>
256
+ </a>
257
+ <a href="https://youtube.com" target="_blank" class="link-card">
258
+ <img src="https://cdn-icons-png.flaticon.com/512/1384/1384060.png" alt="YouTube">
259
+ <span>YouTube</span>
260
+ </a>
261
+ <a href="https://facebook.com" target="_blank" class="link-card">
262
+ <img src="https://cdn-icons-png.flaticon.com/512/733/733547.png" alt="Facebook">
263
+ <span>Facebook</span>
264
+ </a>
265
+ <a href="https://web.whatsapp.com" target="_blank" class="link-card">
266
+ <img src="https://cdn-icons-png.flaticon.com/512/733/733585.png" alt="WhatsApp">
267
+ <span>WhatsApp</span>
268
+ </a>
269
+ <a href="https://instagram.com" target="_blank" class="link-card">
270
+ <img src="https://cdn-icons-png.flaticon.com/512/174/174855.png" alt="Instagram">
271
+ <span>Instagram</span>
272
+ </a>
273
+ <a href="https://github.com" target="_blank" class="link-card">
274
+ <img src="https://cdn-icons-png.flaticon.com/512/25/25231.png" alt="GitHub">
275
+ <span>GitHub</span>
276
+ </a>
277
+ </div>
278
+ </div>
279
+
280
+ <div id="results-page">
281
+ <div class="loader" id="loader">Searching the web...</div>
282
+ <div id="results"></div>
283
+ </div>
284
+
285
+ <footer>
286
+ &copy; 2026 SurfGO - AnesNT Initiative
287
+ </footer>
288
+
289
+ <script>
290
+ // ⚠️ استبدل هذا الرابط برابط الـ Space الخاص بك
291
+ const SEARXNG_URL = 'https://ضع_رابط_سبيس_هجينج_فيس_هنا';
292
+
293
+ const header = document.getElementById('main-header');
294
+ const homePage = document.getElementById('home-page');
295
+ const resultsPage = document.getElementById('results-page');
296
+
297
+ function goHome(e) {
298
+ e.preventDefault();
299
+ homePage.style.display = 'flex';
300
+ resultsPage.style.display = 'none';
301
+ header.classList.remove('compact');
302
+ document.getElementById('search-input').value = '';
303
+ }
304
+
305
+ async function performSearch() {
306
+ const query = document.getElementById('search-input').value;
307
+ const resultsDiv = document.getElementById('results');
308
+ const loader = document.getElementById('loader');
309
+
310
+ if (!query) return;
311
+
312
+ homePage.style.display = 'none';
313
+ resultsPage.style.display = 'block';
314
+ header.classList.add('compact');
315
+
316
+ loader.style.display = 'block';
317
+ resultsDiv.innerHTML = '';
318
+
319
+ try {
320
+ // طلب النتائج بصيغة JSON من سيرفرك في Hugging Face
321
+ const response = await fetch(`${SEARXNG_URL}/search?q=${encodeURIComponent(query)}&format=json`);
322
+ if (!response.ok) throw new Error('Network response was not ok');
323
+
324
+ const data = await response.json();
325
+ loader.style.display = 'none';
326
+
327
+ if (data.results && data.results.length > 0) {
328
+ data.results.forEach((result, index) => {
329
+ const card = document.createElement('a');
330
+ card.className = 'result-card';
331
+ card.href = result.url;
332
+ card.target = '_blank';
333
+ card.style.animationDelay = `${index * 0.1}s`;
334
+
335
+ card.innerHTML = `
336
+ <span class="result-url">${result.pretty_url}</span>
337
+ <h3>${result.title}</h3>
338
+ <p>${result.content}</p>
339
+ `;
340
+ resultsDiv.appendChild(card);
341
+ });
342
+ } else {
343
+ resultsDiv.innerHTML = '<p style="text-align:center">No results found.</p>';
344
+ }
345
+ } catch (error) {
346
+ loader.style.display = 'none';
347
+ resultsDiv.innerHTML = '<p style="text-align:center; color:red;">Error connecting to SurfGO engine. Please check the URL.</p>';
348
+ }
349
+ }
350
+
351
+ document.getElementById('search-input').addEventListener('keypress', (e) => {
352
+ if (e.key === 'Enter') performSearch();
353
+ });
354
+ </script>
355
+ </body>
356
+ </html>