-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
374 lines (323 loc) · 17.4 KB
/
index.html
File metadata and controls
374 lines (323 loc) · 17.4 KB
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
<!DOCTYPE html>
<html lang="fa" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>پنل هوشمند کانفیگ</title>
<link rel="icon" type="image/jpeg" href="icon.jpg">
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
<style>
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;700;900&display=swap');
:root {
--bg-color: #0d1117;
--text-color: #ffffff;
--card-bg: rgba(22, 27, 34, 0.85);
--color-hv: #ef4444;
--color-all: #3b82f6;
--color-vless: #0ea5e9;
--color-vmess: #a855f7;
--color-trojan: #f43f5e;
--color-ss: #10b981;
}
.light-mode {
--bg-color: #f0f2f5;
--text-color: #1a1a1a;
--card-bg: rgba(255, 255, 255, 0.9);
}
body {
background-color: var(--bg-color);
color: var(--text-color);
font-family: 'Vazirmatn', sans-serif;
transition: 0.4s;
}
.glass-card {
background: var(--card-bg);
backdrop-filter: blur(14px);
border-radius: 26px;
transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.card-hv { border: 1px solid rgba(239, 68, 68, 0.3); }
.card-hv:hover {
border-color: var(--color-hv);
box-shadow: 0 0 35px rgba(239, 68, 68, 0.5), inset 0 0 15px rgba(239, 68, 68, 0.2);
transform: translateY(-6px);
}
.card-all { border: 1px solid rgba(59, 130, 246, 0.3); }
.card-all:hover {
border-color: var(--color-all);
box-shadow: 0 0 35px rgba(59, 130, 246, 0.5), inset 0 0 15px rgba(59, 130, 246, 0.2);
transform: translateY(-6px);
}
.card-small { border-width: 1px; }
.card-vless { border-color: rgba(14, 165, 233, 0.3); }
.card-vless:hover { border-color: var(--color-vless); box-shadow: 0 0 25px rgba(14, 165, 233, 0.5); transform: translateY(-5px); }
.card-vmess { border-color: rgba(168, 85, 247, 0.3); }
.card-vmess:hover { border-color: var(--color-vmess); box-shadow: 0 0 25px rgba(168, 85, 247, 0.5); transform: translateY(-5px); }
.card-trojan { border-color: rgba(244, 63, 94, 0.3); }
.card-trojan:hover { border-color: var(--color-trojan); box-shadow: 0 0 25px rgba(244, 63, 94, 0.5); transform: translateY(-5px); }
.card-ss { border-color: rgba(16, 185, 129, 0.3); }
.card-ss:hover { border-color: var(--color-ss); box-shadow: 0 0 25px rgba(16, 185, 129, 0.5); transform: translateY(-5px); }
.tg-hover:hover { color: #229ED9; filter: drop-shadow(0 0 15px #229ED9); transform: scale(1.2); }
.gh-hover:hover { color: #ffffff; filter: drop-shadow(0 0 15px #ffffff); transform: scale(1.2); }
.ig-hover:hover { color: #E1306C; filter: drop-shadow(0 0 15px #E1306C); transform: scale(1.2); }
.glow-text-all { color: var(--color-all); text-shadow: 0 0 15px rgba(59, 130, 246, 0.6); }
.glow-text-hv { color: var(--color-hv); text-shadow: 0 0 15px rgba(239, 68, 68, 0.6); }
.icon-container {
width: 60px; height: 60px;
display: flex; align-items: center; justify-content: center;
border-radius: 18px;
}
/* ===== Counter ===== */
.counter-value {
font-size: 2.4rem;
font-weight: 900;
line-height: 1;
background: linear-gradient(135deg, #60a5fa, #818cf8);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
min-width: 80px;
display: inline-block;
text-align: center;
}
.counter-value-daily {
background: linear-gradient(135deg, #34d399, #10b981);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.pulse-dot {
width: 8px; height: 8px;
border-radius: 50%;
animation: blink 2s infinite;
}
@keyframes blink {
0%, 100% { opacity: 1; }
50% { opacity: 0.3; }
}
.counter-skeleton {
width: 80px; height: 40px;
border-radius: 8px;
background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
background-size: 200% 100%;
animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
0% { background-position: -200% 0; }
100% { background-position: 200% 0; }
}
</style>
</head>
<body class="min-h-screen p-4 md:p-8 flex flex-col items-center">
<header class="w-full max-w-4xl flex justify-between items-center mb-12">
<div class="flex items-center gap-4">
<img src="icon.jpg" class="w-16 h-16 rounded-2xl shadow-lg border-2 border-blue-500" alt="Logo">
<div>
<h1 class="text-2xl font-black tracking-tight">پنل هوشمند کانفیگ</h1>
<p class="text-gray-400 text-sm">بروزرسانی خودکار هوشمند</p>
</div>
</div>
<button onclick="toggleTheme()" class="w-12 h-12 glass-card flex items-center justify-center text-xl hover:scale-110 transition-all border border-white/10">
<i id="theme-icon" class="fas fa-moon text-blue-500"></i>
</button>
</header>
<main class="w-full max-w-4xl grid grid-cols-1 md:grid-cols-2 gap-6">
<div class="glass-card card-hv p-7 col-span-1 md:col-span-2 flex flex-col md:flex-row justify-between items-center gap-6">
<div class="flex items-center gap-5 w-full md:w-auto">
<div class="icon-container bg-red-500/10 text-red-500 text-3xl shadow-[inset_0_0_10px_rgba(239,68,68,0.2)]">
<i class="fas fa-fire animate-pulse"></i>
</div>
<div class="text-right">
<h2 class="text-lg font-bold text-gray-300">منبع فوق پرحجم (HV)</h2>
<p id="count-hv" class="text-4xl font-black glow-text-hv">---</p>
</div>
</div>
<button onclick="copyLink('high_volume_raw.txt')" class="w-full md:w-auto bg-red-600 hover:bg-red-700 px-10 py-4 rounded-2xl font-black transition-all flex items-center justify-center gap-3 shadow-lg shadow-red-600/20">
<i class="fas fa-bolt"></i> کپی سابلینک حجیم
</button>
</div>
<div class="glass-card card-all p-7 col-span-1 md:col-span-2 flex flex-col md:flex-row justify-between items-center gap-6">
<div class="flex items-center gap-5 w-full md:w-auto">
<div class="icon-container bg-blue-500/10 text-blue-500 text-3xl shadow-[inset_0_0_10px_rgba(59,130,246,0.2)]">
<i class="fas fa-layer-group"></i>
</div>
<div class="text-right">
<h2 class="text-lg font-bold text-gray-300">مجموع کل کانفیگها (هوشمند)</h2>
<p id="count-all" class="text-4xl font-black glow-text-all">---</p>
</div>
</div>
<button onclick="copyLink('all_raw.txt')" class="w-full md:w-auto bg-blue-600 hover:bg-blue-700 px-10 py-4 rounded-2xl font-black transition-all flex items-center justify-center gap-3 shadow-lg shadow-blue-600/20">
<i class="fas fa-copy"></i> کپی سابلینک کامل
</button>
</div>
<div class="glass-card card-small card-vless p-6 flex justify-between items-center">
<div class="flex items-center gap-4">
<i class="fas fa-shield-halved text-sky-500 text-2xl w-8 text-center"></i>
<div><p class="text-gray-400 text-xs">VLESS</p><p id="count-vless" class="text-xl font-bold text-sky-500">--</p></div>
</div>
<button onclick="copyLink('vless_raw.txt')" class="text-sky-400 hover:bg-sky-500/10 p-3 rounded-xl transition-all"><i class="fas fa-link text-xl"></i></button>
</div>
<div class="glass-card card-small card-vmess p-6 flex justify-between items-center">
<div class="flex items-center gap-4">
<i class="fas fa-infinity text-purple-500 text-2xl w-8 text-center"></i>
<div><p class="text-gray-400 text-xs">VMess</p><p id="count-vmess" class="text-xl font-bold text-purple-500">--</p></div>
</div>
<button onclick="copyLink('vmess_raw.txt')" class="text-purple-400 hover:bg-purple-500/10 p-3 rounded-xl transition-all"><i class="fas fa-link text-xl"></i></button>
</div>
<div class="glass-card card-small card-trojan p-6 flex justify-between items-center">
<div class="flex items-center gap-4">
<i class="fas fa-horse-head text-rose-500 text-2xl w-8 text-center"></i>
<div><p class="text-gray-400 text-xs">Trojan</p><p id="count-trojan" class="text-xl font-bold text-rose-500">--</p></div>
</div>
<button onclick="copyLink('trojan_raw.txt')" class="text-rose-400 hover:bg-rose-500/10 p-3 rounded-xl transition-all"><i class="fas fa-link text-xl"></i></button>
</div>
<div class="glass-card card-small card-ss p-6 flex justify-between items-center">
<div class="flex items-center gap-4">
<i class="fas fa-paper-plane text-emerald-500 text-2xl w-8 text-center"></i>
<div><p class="text-gray-400 text-xs">Shadowsocks</p><p id="count-ss" class="text-xl font-bold text-emerald-500">--</p></div>
</div>
<button onclick="copyLink('ss_raw.txt')" class="text-emerald-400 hover:bg-emerald-500/10 p-3 rounded-xl transition-all"><i class="fas fa-link text-xl"></i></button>
</div>
</main>
<footer class="mt-16 w-full max-w-4xl flex flex-col items-center gap-8 pb-12">
<div class="glass-card p-8 w-full flex flex-col md:flex-row justify-around items-center gap-8 border border-white/5 border-b-2 border-b-blue-500/30">
<!-- بازدید امروز -->
<div class="flex flex-col items-center gap-3">
<div class="flex items-center gap-2">
<div class="pulse-dot bg-emerald-400"></div>
<span class="text-gray-400 text-xs font-bold uppercase tracking-widest">بازدید امروز</span>
</div>
<div class="flex items-end gap-2">
<p id="daily-count" class="counter-value counter-value-daily">
<span class="counter-skeleton"></span>
</p>
<span class="text-gray-500 text-sm mb-1">نفر</span>
</div>
<span class="text-gray-600 text-xs" id="today-label"></span>
</div>
<div class="hidden md:block w-px h-16 bg-gradient-to-b from-transparent via-gray-700 to-transparent"></div>
<!-- بازدید کل -->
<div class="flex flex-col items-center gap-3">
<div class="flex items-center gap-2">
<div class="pulse-dot bg-blue-400"></div>
<span class="text-gray-400 text-xs font-bold uppercase tracking-widest">بازدید کل سایت</span>
</div>
<div class="flex items-end gap-2">
<p id="total-count" class="counter-value">
<span class="counter-skeleton"></span>
</p>
<span class="text-gray-500 text-sm mb-1">نفر</span>
</div>
<span class="text-gray-600 text-xs">از ابتدا تاکنون</span>
</div>
</div>
<div class="flex flex-col items-center gap-8">
<div class="flex gap-10">
<a href="https://t.me/smartconfigs" target="_blank" class="text-gray-500 text-5xl transition-all tg-hover"><i class="fab fa-telegram"></i></a>
<a href="https://github.com/kasesm/Free-Config" target="_blank" class="text-gray-500 text-5xl transition-all gh-hover"><i class="fab fa-github"></i></a>
<a href="https://www.instagram.com/_demonedge_/" target="_blank" class="text-gray-500 text-5xl transition-all ig-hover"><i class="fab fa-instagram"></i></a>
</div>
<div class="text-center bg-black/40 px-8 py-3 rounded-full border border-white/5 shadow-2xl">
<p class="text-gray-500 text-[10px] mb-1 tracking-tighter uppercase">Last Successful Sync</p>
<p id="last-update" class="text-blue-500 font-bold text-sm">---</p>
</div>
</div>
</footer>
<script>
// ============================================================
// آدرس Worker خودت رو اینجا بذار
// مثال: https://smartconfigs-visits.YOUR-NAME.workers.dev
// ============================================================
const WORKER_URL = 'https://smartconfigs-visits.task132141.workers.dev/';
// ===== لود اطلاعات کانفیگ =====
fetch('info.json').then(r => r.json()).then(data => {
['all', 'vless', 'vmess', 'trojan', 'ss'].forEach(k => {
const el = document.getElementById(`count-${k}`);
if(el) el.innerText = (data[k] || 0).toLocaleString('fa-IR') + " کانفیگ";
});
const hvEl = document.getElementById('count-hv');
if(hvEl) hvEl.innerText = (data.hv_count || 0).toLocaleString('fa-IR') + " کانفیگ";
document.getElementById('last-update').innerText = data.last_update;
}).catch(() => {});
// ===== تاریخ امروز =====
function showDate() {
const now = new Date();
document.getElementById('today-label').innerText =
now.toLocaleDateString('fa-IR', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' });
}
// ===== انیمیشن شمارنده =====
function animateCounter(id, target, isDaily = false) {
const el = document.getElementById(id);
if (!el) return;
el.innerHTML = '';
let current = 0;
const duration = 1000;
const steps = 60;
const increment = target / steps;
const interval = duration / steps;
const timer = setInterval(() => {
current += increment;
if (current >= target) {
current = target;
clearInterval(timer);
}
el.innerText = Math.floor(current).toLocaleString('fa-IR');
}, interval);
}
// ===== ثبت بازدید و دریافت آمار از Worker =====
async function trackVisit() {
try {
// ارسال بازدید به Worker
const res = await fetch(`${WORKER_URL}/visit`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
});
if (!res.ok) throw new Error('Worker error');
const data = await res.json();
animateCounter('daily-count', data.daily, true);
animateCounter('total-count', data.total);
} catch (err) {
// اگه Worker در دسترس نبود، از localStorage بخون
console.warn('Worker unavailable, using localStorage fallback');
fallbackCounter();
}
}
// ===== Fallback با localStorage (اگه Worker کار نکرد) =====
function fallbackCounter() {
const todayKey = (() => {
const d = new Date();
return `v_${d.getFullYear()}_${d.getMonth()}_${d.getDate()}`;
})();
const totalKey = 'v_total';
const sessionKey = 'counted_' + todayKey;
let daily = parseInt(localStorage.getItem(todayKey) || '0');
let total = parseInt(localStorage.getItem(totalKey) || '0');
if (!sessionStorage.getItem(sessionKey)) {
daily++; total++;
localStorage.setItem(todayKey, daily);
localStorage.setItem(totalKey, total);
sessionStorage.setItem(sessionKey, '1');
}
animateCounter('daily-count', daily, true);
animateCounter('total-count', total);
}
// ===== اجرا =====
showDate();
trackVisit();
// ===== توابع عمومی =====
function copyLink(f) {
const url = `https://raw.githubusercontent.com/kasesm/Free-Config/main/${f}`;
navigator.clipboard.writeText(url).then(() => {
alert("سابلینک با موفقیت کپی شد! ✅");
});
}
function toggleTheme() {
document.body.classList.toggle('light-mode');
const icon = document.getElementById('theme-icon');
icon.classList.toggle('fa-moon');
icon.classList.toggle('fa-sun');
}
</script>
</body>
</html>