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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html dir="rtl" lang="ar">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>سبيدي | فاحص المواقع السريع</title>
|
7 |
+
<style>
|
8 |
+
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');
|
9 |
+
|
10 |
+
:root {
|
11 |
+
--speedy-primary: #8B4513;
|
12 |
+
--speedy-dark: #5C2C0B;
|
13 |
+
--speedy-light: #F5E6DB;
|
14 |
+
--speedy-accent: #D2691E;
|
15 |
+
--speedy-bg: #FDF9F6;
|
16 |
+
--speedy-text: #3E2723;
|
17 |
+
--speedy-border: #DEB887;
|
18 |
+
--speedy-gradient: linear-gradient(135deg, #8B4513 0%, #5C2C0B 100%);
|
19 |
+
--speedy-shadow: 0 4px 6px rgba(139, 69, 19, 0.2);
|
20 |
+
}
|
21 |
+
|
22 |
+
body {
|
23 |
+
font-family: 'Cairo', sans-serif;
|
24 |
+
margin: 0;
|
25 |
+
padding: 20px;
|
26 |
+
background: var(--speedy-bg);
|
27 |
+
color: var(--speedy-text);
|
28 |
+
line-height: 1.6;
|
29 |
+
}
|
30 |
+
|
31 |
+
.container {
|
32 |
+
max-width: 900px;
|
33 |
+
margin: 20px auto;
|
34 |
+
background: white;
|
35 |
+
padding: 30px;
|
36 |
+
border-radius: 20px;
|
37 |
+
box-shadow: var(--speedy-shadow);
|
38 |
+
border: 1px solid var(--speedy-border);
|
39 |
+
}
|
40 |
+
|
41 |
+
.brand {
|
42 |
+
text-align: center;
|
43 |
+
margin-bottom: 10px;
|
44 |
+
}
|
45 |
+
|
46 |
+
.logo {
|
47 |
+
font-size: 3em;
|
48 |
+
font-weight: 700;
|
49 |
+
color: var(--speedy-primary);
|
50 |
+
text-shadow: 2px 2px 4px rgba(139, 69, 19, 0.2);
|
51 |
+
margin: 0;
|
52 |
+
}
|
53 |
+
|
54 |
+
.tagline {
|
55 |
+
color: var(--speedy-accent);
|
56 |
+
font-size: 1.2em;
|
57 |
+
margin-top: 5px;
|
58 |
+
}
|
59 |
+
|
60 |
+
h1 {
|
61 |
+
text-align: center;
|
62 |
+
color: var(--speedy-dark);
|
63 |
+
font-size: 2em;
|
64 |
+
margin: 20px 0;
|
65 |
+
font-weight: 700;
|
66 |
+
}
|
67 |
+
|
68 |
+
.input-group {
|
69 |
+
display: flex;
|
70 |
+
gap: 15px;
|
71 |
+
margin: 30px auto;
|
72 |
+
max-width: 700px;
|
73 |
+
padding: 20px;
|
74 |
+
background: var(--speedy-light);
|
75 |
+
border-radius: 16px;
|
76 |
+
box-shadow: inset 0 2px 4px rgba(92, 44, 11, 0.1);
|
77 |
+
}
|
78 |
+
|
79 |
+
input {
|
80 |
+
flex: 1;
|
81 |
+
padding: 15px 20px;
|
82 |
+
border: 2px solid var(--speedy-border);
|
83 |
+
border-radius: 12px;
|
84 |
+
font-size: 16px;
|
85 |
+
transition: all 0.3s ease;
|
86 |
+
font-family: 'Cairo', sans-serif;
|
87 |
+
background: white;
|
88 |
+
color: var(--speedy-text);
|
89 |
+
}
|
90 |
+
|
91 |
+
input:focus {
|
92 |
+
outline: none;
|
93 |
+
border-color: var(--speedy-primary);
|
94 |
+
box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.2);
|
95 |
+
}
|
96 |
+
|
97 |
+
input::placeholder {
|
98 |
+
color: var(--speedy-border);
|
99 |
+
}
|
100 |
+
|
101 |
+
button {
|
102 |
+
padding: 15px 30px;
|
103 |
+
background: var(--speedy-gradient);
|
104 |
+
color: white;
|
105 |
+
border: none;
|
106 |
+
border-radius: 12px;
|
107 |
+
cursor: pointer;
|
108 |
+
font-size: 16px;
|
109 |
+
font-weight: 600;
|
110 |
+
transition: all 0.3s ease;
|
111 |
+
font-family: 'Cairo', sans-serif;
|
112 |
+
}
|
113 |
+
|
114 |
+
button:hover {
|
115 |
+
transform: translateY(-2px);
|
116 |
+
box-shadow: 0 6px 12px rgba(92, 44, 11, 0.3);
|
117 |
+
}
|
118 |
+
|
119 |
+
button:active {
|
120 |
+
transform: translateY(0);
|
121 |
+
background: var(--speedy-dark);
|
122 |
+
}
|
123 |
+
|
124 |
+
button:disabled {
|
125 |
+
background: var(--speedy-border);
|
126 |
+
transform: none;
|
127 |
+
box-shadow: none;
|
128 |
+
}
|
129 |
+
|
130 |
+
.loading {
|
131 |
+
text-align: center;
|
132 |
+
display: none;
|
133 |
+
margin: 20px 0;
|
134 |
+
color: var(--speedy-primary);
|
135 |
+
font-weight: 600;
|
136 |
+
}
|
137 |
+
|
138 |
+
.loading::after {
|
139 |
+
content: '🚀';
|
140 |
+
display: inline-block;
|
141 |
+
margin-right: 10px;
|
142 |
+
animation: rocket 1s infinite;
|
143 |
+
}
|
144 |
+
|
145 |
+
@keyframes rocket {
|
146 |
+
0% { transform: translateY(0) rotate(45deg); }
|
147 |
+
50% { transform: translateY(-10px) rotate(45deg); }
|
148 |
+
100% { transform: translateY(0) rotate(45deg); }
|
149 |
+
}
|
150 |
+
|
151 |
+
.results {
|
152 |
+
margin-top: 30px;
|
153 |
+
display: none;
|
154 |
+
animation: fadeIn 0.5s ease;
|
155 |
+
}
|
156 |
+
|
157 |
+
@keyframes fadeIn {
|
158 |
+
from { opacity: 0; transform: translateY(20px); }
|
159 |
+
to { opacity: 1; transform: translateY(0); }
|
160 |
+
}
|
161 |
+
|
162 |
+
.results-section {
|
163 |
+
background: white;
|
164 |
+
border-radius: 16px;
|
165 |
+
padding: 25px;
|
166 |
+
margin-bottom: 20px;
|
167 |
+
border: 1px solid var(--speedy-border);
|
168 |
+
transition: all 0.3s ease;
|
169 |
+
}
|
170 |
+
|
171 |
+
.results-section:hover {
|
172 |
+
transform: translateY(-3px);
|
173 |
+
box-shadow: var(--speedy-shadow);
|
174 |
+
border-color: var(--speedy-primary);
|
175 |
+
}
|
176 |
+
|
177 |
+
.results h2 {
|
178 |
+
color: var(--speedy-dark);
|
179 |
+
border-bottom: 2px solid var(--speedy-primary);
|
180 |
+
padding-bottom: 10px;
|
181 |
+
margin-bottom: 20px;
|
182 |
+
}
|
183 |
+
|
184 |
+
.info-item {
|
185 |
+
display: flex;
|
186 |
+
justify-content: space-between;
|
187 |
+
padding: 12px;
|
188 |
+
border-bottom: 1px solid var(--speedy-light);
|
189 |
+
transition: background-color 0.2s ease;
|
190 |
+
}
|
191 |
+
|
192 |
+
.info-item:hover {
|
193 |
+
background-color: var(--speedy-bg);
|
194 |
+
border-radius: 8px;
|
195 |
+
}
|
196 |
+
|
197 |
+
.info-item:last-child {
|
198 |
+
border-bottom: none;
|
199 |
+
}
|
200 |
+
|
201 |
+
.info-label {
|
202 |
+
font-weight: 600;
|
203 |
+
color: var(--speedy-text);
|
204 |
+
}
|
205 |
+
|
206 |
+
.info-value {
|
207 |
+
color: var(--speedy-primary);
|
208 |
+
}
|
209 |
+
|
210 |
+
.error {
|
211 |
+
color: #D35400;
|
212 |
+
background: rgba(211, 84, 0, 0.1);
|
213 |
+
padding: 15px;
|
214 |
+
border-radius: 12px;
|
215 |
+
text-align: center;
|
216 |
+
margin: 20px 0;
|
217 |
+
display: none;
|
218 |
+
border: 1px solid rgba(211, 84, 0, 0.3);
|
219 |
+
}
|
220 |
+
|
221 |
+
/* للشاشات الصغيرة */
|
222 |
+
@media (max-width: 768px) {
|
223 |
+
.input-group {
|
224 |
+
flex-direction: column;
|
225 |
+
}
|
226 |
+
|
227 |
+
button {
|
228 |
+
width: 100%;
|
229 |
+
}
|
230 |
+
|
231 |
+
.container {
|
232 |
+
padding: 20px;
|
233 |
+
}
|
234 |
+
|
235 |
+
.logo {
|
236 |
+
font-size: 2.5em;
|
237 |
+
}
|
238 |
+
}
|
239 |
+
</style>
|
240 |
+
</head>
|
241 |
+
<body>
|
242 |
+
<div class="container">
|
243 |
+
<div class="brand">
|
244 |
+
<h1 class="logo">سبيدي</h1>
|
245 |
+
<div class="tagline">فاحص المواقع السريع والذكي</div>
|
246 |
+
</div>
|
247 |
+
|
248 |
+
<div class="input-group">
|
249 |
+
<input type="url" id="urlInput" placeholder="https://example.com" dir="ltr">
|
250 |
+
<button onclick="checkUrl()">فحص سريع</button>
|
251 |
+
</div>
|
252 |
+
|
253 |
+
<div class="loading" id="loading">
|
254 |
+
جاري التحليل السريع للموقع...
|
255 |
+
</div>
|
256 |
+
|
257 |
+
<div class="error" id="error"></div>
|
258 |
+
|
259 |
+
<div class="results" id="results">
|
260 |
+
<div class="results-section">
|
261 |
+
<h2>معلومات الموقع</h2>
|
262 |
+
<div id="info"></div>
|
263 |
+
</div>
|
264 |
+
|
265 |
+
<div class="results-section">
|
266 |
+
<h2>نصائح تحسين الموقع</h2>
|
267 |
+
<div id="tips"></div>
|
268 |
+
</div>
|
269 |
+
|
270 |
+
<div class="results-section">
|
271 |
+
<h2>تحليل الزيارات</h2>
|
272 |
+
<div id="traffic"></div>
|
273 |
+
</div>
|
274 |
+
</div>
|
275 |
+
</div>
|
276 |
+
|
277 |
+
<script>
|
278 |
+
async function checkUrl() {
|
279 |
+
const urlInput = document.getElementById('urlInput');
|
280 |
+
const loading = document.getElementById('loading');
|
281 |
+
const results = document.getElementById('results');
|
282 |
+
const error = document.getElementById('error');
|
283 |
+
const button = document.querySelector('button');
|
284 |
+
|
285 |
+
if (!urlInput.value) {
|
286 |
+
error.textContent = 'الرجاء إدخال رابط صالح للفحص';
|
287 |
+
error.style.display = 'block';
|
288 |
+
return;
|
289 |
+
}
|
290 |
+
|
291 |
+
error.style.display = 'none';
|
292 |
+
results.style.display = 'none';
|
293 |
+
loading.style.display = 'block';
|
294 |
+
button.disabled = true;
|
295 |
+
|
296 |
+
try {
|
297 |
+
const response = await fetch('/check-url', {
|
298 |
+
method: 'POST',
|
299 |
+
headers: {
|
300 |
+
'Content-Type': 'application/json',
|
301 |
+
},
|
302 |
+
body: JSON.stringify({ url: urlInput.value })
|
303 |
+
});
|
304 |
+
|
305 |
+
const data = await response.json();
|
306 |
+
|
307 |
+
if (data.error) {
|
308 |
+
error.textContent = data.error;
|
309 |
+
error.style.display = 'block';
|
310 |
+
} else {
|
311 |
+
document.getElementById('info').innerHTML = formatInfo(data.info);
|
312 |
+
document.getElementById('tips').innerHTML = formatList(data.tips);
|
313 |
+
document.getElementById('traffic').innerHTML = formatList(data.traffic_estimate);
|
314 |
+
results.style.display = 'block';
|
315 |
+
}
|
316 |
+
} catch (err) {
|
317 |
+
error.textContent = 'عذراً، حدث خطأ أثناء الاتصال بالخا��م';
|
318 |
+
error.style.display = 'block';
|
319 |
+
} finally {
|
320 |
+
loading.style.display = 'none';
|
321 |
+
button.disabled = false;
|
322 |
+
}
|
323 |
+
}
|
324 |
+
|
325 |
+
function formatInfo(info) {
|
326 |
+
return Object.entries(info)
|
327 |
+
.map(([key, value]) => `
|
328 |
+
<div class="info-item">
|
329 |
+
<span class="info-label">${key}</span>
|
330 |
+
<span class="info-value">${value}</span>
|
331 |
+
</div>
|
332 |
+
`).join('');
|
333 |
+
}
|
334 |
+
|
335 |
+
function formatList(items) {
|
336 |
+
return items
|
337 |
+
.map(item => `<div class="info-item">${item}</div>`)
|
338 |
+
.join('');
|
339 |
+
}
|
340 |
+
</script>
|
341 |
+
</body>
|
342 |
+
</html>
|