-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
464 lines (410 loc) · 19.3 KB
/
Copy pathindex.html
File metadata and controls
464 lines (410 loc) · 19.3 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
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
<!DOCTYPE html>
<html lang="fa" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Smart Media Manager - Documentation</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/vazirmatn-font-face.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap">
<style>
/* Developed by Amin Arjmand | aminarjmand.com */
:root {
--bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
--card-bg: rgba(255, 255, 255, 0.7);
--card-border: rgba(255, 255, 255, 0.4);
--text-main: #2c3e50;
--text-muted: #7f8c8d;
--accent-color: #2ecc71;
--accent-hover: #27ae60;
--code-bg: rgba(0, 0, 0, 0.04);
--code-text: #e74c3c;
--shadow: rgba(31, 38, 135, 0.06);
}
[data-theme="dark"] {
--bg-gradient: linear-gradient(135deg, #111827 0%, #1f2937 100%);
--card-bg: rgba(31, 41, 55, 0.7);
--card-border: rgba(255, 255, 255, 0.08);
--text-main: #f3f4f6;
--text-muted: #9ca3af;
--accent-color: #10b981;
--accent-hover: #059669;
--code-bg: rgba(255, 255, 255, 0.05);
--code-text: #f87171;
--shadow: rgba(0, 0, 0, 0.3);
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
body {
font-family: 'Vazirmatn', 'Inter', sans-serif;
background: var(--bg-gradient);
color: var(--text-main);
min-height: 100vh;
padding: 40px 20px;
display: flex;
justify-content: center;
}
body.en {
font-family: 'Inter', 'Vazirmatn', sans-serif;
}
.container {
width: 100%;
max-width: 900px;
}
/* Top Controls Toolbar */
.toolbar {
display: flex;
justify-content: flex-end;
gap: 12px;
margin-bottom: 20px;
}
.btn-control {
background: var(--card-bg);
border: 1px solid var(--card-border);
color: var(--text-main);
padding: 10px 18px;
border-radius: 30px;
cursor: pointer;
font-family: inherit;
font-size: 0.9rem;
font-weight: 500;
display: flex;
align-items: center;
gap: 8px;
box-shadow: 0 4px 10px var(--shadow);
}
.btn-control:hover {
border-color: var(--accent-color);
transform: translateY(-1px);
}
/* Documentation Card */
.doc-card {
background: var(--card-bg);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid var(--card-border);
border-radius: 24px;
padding: 40px;
box-shadow: 0 20px 50px var(--shadow);
}
/* Badges Area */
.badge-wrapper {
display: flex;
justify-content: center;
gap: 10px;
margin: 20px 0 35px 0;
flex-wrap: wrap;
}
.badge {
padding: 6px 16px;
border-radius: 30px;
font-size: 0.85rem;
font-weight: 600;
color: white;
text-decoration: none;
box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.badge-demo { background: #3498db; }
.badge-wp { background: #21759b; }
.badge-php { background: #617cbe; }
/* Typography */
h1 {
font-size: 2.2rem;
text-align: center;
font-weight: 800;
color: var(--text-main);
letter-spacing: -0.5px;
}
h2 {
font-size: 1.5rem;
margin: 40px 0 20px 0;
padding-bottom: 10px;
border-bottom: 2px solid var(--card-border);
color: var(--accent-color);
display: flex;
align-items: center;
gap: 10px;
}
h3 {
font-size: 1.15rem;
margin: 25px 0 12px 0;
color: var(--text-main);
}
p {
font-size: 1.05rem;
line-height: 1.8;
color: var(--text-main);
margin-bottom: 15px;
}
/* Features List Grid */
.features-grid {
display: grid;
grid-template-columns: 1fr;
gap: 15px;
margin: 25px 0;
}
.feature-item {
background: rgba(255, 255, 255, 0.3);
border: 1px solid var(--card-border);
padding: 18px;
border-radius: 14px;
display: flex;
gap: 15px;
align-items: flex-start;
}
[data-theme="dark"] .feature-item {
background: rgba(0, 0, 0, 0.15);
}
.feature-icon {
font-size: 1.4rem;
flex-shrink: 0;
}
.feature-text strong {
display: block;
margin-bottom: 4px;
color: var(--text-main);
}
.feature-text span {
font-size: 0.95rem;
color: var(--text-muted);
line-height: 1.6;
}
/* Conditional Language Display */
.lang-en { display: none; }
body.en .lang-fa { display: none; }
body.en .lang-en { display: block; }
@media (max-width: 600px) {
.doc-card { padding: 25px; }
h1 { font-size: 1.7rem; }
}
</style>
</head>
<body>
<div class="container">
<div class="toolbar">
<button class="btn-control" id="btn-lang" onclick="toggleLanguage()">
🌐 <span>English</span>
</button>
<button class="btn-control" id="btn-theme" onclick="toggleTheme()">
🌙 <span class="lang-fa">حالت تاریک</span><span class="lang-en">Dark Mode</span>
</button>
</div>
<div class="doc-card">
<div class="lang-fa">
<h1>🚀 مدیریت هوشمند رسانه | Smart Media Manager</h1>
<p style="text-align: center; margin-top: 10px; color: var(--text-muted)">افزونه سبک و همهکاره برای مدیریت، بهینهسازی و ارتقای تصاویر وردپرس</p>
</div>
<div class="lang-en">
<h1>🚀 Smart Media Manager Layout Portal</h1>
<p style="text-align: center; margin-top: 10px; color: var(--text-muted)">Lightweight WordPress plugin to manage, optimize, and enhance image galleries</p>
</div>
<div class="badge-wrapper">
<a href="https://demo.aminarjmand.com/Smart-Media-Manager/" target="_blank" class="badge badge-demo">⚡ Live Extension Demo</a>
<span class="badge badge-wp">WordPress 5.0+ Verified</span>
<span class="badge badge-php">PHP 7.4 / 8.x Compatible</span>
</div>
<div class="lang-fa">
<p>افزونه <strong>Smart Media Manager</strong> یک ابزار هوشمند برای بهینهسازی کامل بخش رسانههای وردپرس است که به شما کنترل کاملی روی نحوه ذخیرهسازی، کیفیت آپلود و نمایش تصاویر سایت میدهد.</p>
<h2>✨ قابلیتهای اصلی افزونه</h2>
<div class="features-grid">
<div class="feature-item">
<div class="feature-icon">✍️</div>
<div class="feature-text">
<strong>غیرفعال کردن گوتنبرگ و بازگشت به ویرایشگر کلاسیک</strong>
<span>به راحتی میتوانید ویرایشگر جدید و سنگین گوتنبرگ را در وردپرس غیرفعال کرده و از همان ویرایشگر قدیمی و روان (Classic Editor) استفاده کنید.</span>
</div>
</div>
<div class="feature-item">
<div class="feature-icon">💎</div>
<div class="feature-text">
<strong>حفظ کیفیت ۱۰۰٪ تصاویر آپلودی</strong>
<span>وردپرس به طور خودکار کیفیت عکسها را هنگام آپلود کاهش میدهد. این ماژول کیفیت تصاویر با فرمت JPG و PNG را روی ۱۰۰٪ قفل میکند تا عکسها با همان کیفیت اصلی و بدون افت پیکسل آپلود شوند.</span>
</div>
</div>
<div class="feature-item">
<div class="feature-icon">📐</div>
<div class="feature-text">
<strong>مدیریت و مهار سایزهای اضافی تصاویر</strong>
<span>این افزونه تمام ابعاد و سایزهایی که توسط وردپرس، پوسته یا افزونههای دیگر ساخته میشوند را لیست میکند. شما میتوانید انتخاب کنید کدام سایزها ساخته نشوند؛ این کار از اشغال بیهوده و انبوه فضای هاست جلوگیری میکند.</span>
</div>
</div>
<div class="feature-item">
<div class="feature-icon">📸</div>
<div class="feature-text">
<strong>تبدیل خودکار گالریها به اسلایدر لایتباکس (Fancybox)</strong>
<span>اگر در نوشتهها یا محصولات خود یک گالری تصاویر ساده بسازید، افزونه به طور خودکار افکت شیک لایتباکس و Fancybox را به آن اضافه میکند تا تصاویر به صورت یک اسلایدر لمسی، تمیز و مدرن نمایش داده شوند.</span>
</div>
</div>
<div class="feature-item">
<div class="feature-icon">🎯</div>
<div class="feature-text">
<strong>سیستم جایگزینی هوشمند تصویر اصلی (Fallback)</strong>
<span>اگر سایز تصویر درخواستی قالب در هاست موجود نباشد یا حذف شده باشد، افزونه به طور خودکار نسخه اصلی تصویر را نشان میدهد تا کاربر با کادر تصویر شکسته (خطای 404) مواجه نشود.</span>
</div>
</div>
</div>
<h2>🛠️ نحوه نصب و راهاندازی</h2>
<p>۱. پوشه افزونه را در مسیر <code>wp-content/plugins/</code> آپلود کنید.</p>
<p>۲. افزونه را از بخش «افزونهها» در پیشخوان وردپرس فعال کنید.</p>
<p>۳. برای مدیریت تنظیمات، به منوی جدید <strong>رسانه ← Smart Media Manager</strong> بروید.</p>
</div>
<div class="lang-en">
<p><strong>Smart Media Manager</strong> is an advanced utility plugin designed for the WordPress Media Library, granting you full control over storage parameters, image delivery quality, and front-end gallery presentations.</p>
<h2>✨ Core Plugin Features</h2>
<div class="features-grid">
<div class="feature-item">
<div class="feature-icon">✍️</div>
<div class="feature-text">
<strong>Disable Gutenberg Block Editor</strong>
<span>Easily switch off the modern block editor and return to the lightweight, fast legacy Classic Editor environment.</span>
</div>
</div>
<div class="feature-item">
<div class="feature-icon">💎</div>
<div class="feature-text">
<strong>100% Lossless Image Uploads</strong>
<span>Bypasses native WordPress compression ratios to enforce maximum 100% resolution rendering metrics for newly uploaded JPG and PNG files.</span>
</div>
</div>
<div class="feature-item">
<div class="feature-icon">📐</div>
<div class="feature-text">
<strong>Dynamic Thumbnail Layout Control</strong>
<span>Lists every intermediate size generated by active theme frameworks. Allows you to choose which dimensions to drop, heavily decreasing host disk space usage.</span>
</div>
</div>
<div class="feature-item">
<div class="feature-icon">📸</div>
<div class="feature-text">
<strong>Automatic Fancybox Lightbox Conversion</strong>
<span>Detects basic WordPress or product image galleries and wraps them into premium touch-responsive Fancybox sliders.</span>
</div>
</div>
<div class="feature-item">
<div class="feature-icon">🎯</div>
<div class="feature-text">
<strong>Smart Image Fallback Pipeline</strong>
<span>Intercepts broken front-end asset containers and substitutes missing target sizes with the master original image source automatically.</span>
</div>
</div>
</div>
<h2>🛠️ Installation Steps</h2>
<p>1. Upload the plugin directory to your <code>wp-content/plugins/</code> folder.</p>
<p>2. Activate the plugin via the 'Plugins' menu in your WordPress dashboard.</p>
<p>3. Navigate to the dashboard link: <strong>Media ← Smart Media Manager</strong> to manage options.</p>
</div>
<div style="margin-top: 50px; text-align: center; border-top: 1px solid var(--card-border); padding-top: 20px;">
<p style="font-size: 0.9rem; color: var(--text-muted); text-align: center;">
Developed with 💚 by <a href="https://aminarjmand.com" target="_blank" style="color: var(--accent-color); text-decoration: none; font-weight: 600;">Amin Arjmand</a>
</p>
</div>
</div>
</div>
<script>
// 1. Theme Toggle Logic
function toggleTheme() {
const currentTheme = document.documentElement.getAttribute('data-theme');
const targetTheme = currentTheme === 'dark' ? 'light' : 'dark';
document.documentElement.setAttribute('data-theme', targetTheme);
const btnTextFa = targetTheme === 'dark' ? 'حالت روشن' : 'حالت تاریک';
const btnTextEn = targetTheme === 'dark' ? 'Light Mode' : 'Dark Mode';
document.getElementById('btn-theme').innerHTML = `☀️ <span class="lang-fa">${btnTextFa}</span><span class="lang-en">${btnTextEn}</span>`;
}
// 2. Multilingual Switcher Logic
function toggleLanguage() {
const isEnglish = document.body.classList.toggle('en');
if (isEnglish) {
document.documentElement.setAttribute('lang', 'en');
document.documentElement.setAttribute('dir', 'ltr');
document.getElementById('btn-lang').innerHTML = `🌐 <span>فارسی</span>`;
} else {
document.documentElement.setAttribute('lang', 'fa');
document.documentElement.setAttribute('dir', 'rtl');
document.getElementById('btn-lang').innerHTML = `🌐 <span>English</span>`;
}
}
</script>
<div class="floating-nav-container">
<a href="https://demo.aminarjmand.com" class="floating-btn btn-back-home" title="برگشت به داشبورد / Back to Dashboard">
🏠 <span class="nav-text">صفحه مخازن</span>
</a>
<a href="#" id="dynamic-github-btn" target="_blank" class="floating-btn btn-github-repo" title="مشاهده مخزن گیتهاب / View GitHub Repo">
🐙 <span class="nav-text">گیتهاب مخزن</span>
</a>
</div>
<style>
/* استایل دکمههای شناور */
.floating-nav-container {
position: fixed;
bottom: 25px;
left: 25px;
display: flex;
flex-direction: column;
gap: 12px;
z-index: 99999;
direction: rtl; /* برای هماهنگی متن فارسی */
}
.floating-btn {
display: flex;
align-items: center;
gap: 10px;
padding: 12px 18px;
border-radius: 50px;
color: #ffffff !important;
text-decoration: none !important;
font-family: 'Vazirmatn', sans-serif;
font-size: 0.85rem;
font-weight: bold;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.btn-back-home {
background: linear-gradient(135deg, #2c3e50, #34495e);
border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-github-repo {
background: linear-gradient(135deg, #24292e, #4c5157);
border: 1px solid rgba(255, 255, 255, 0.1);
}
/* افکت هوور */
.floating-btn:hover {
transform: translateY(-4px) scale(1.03);
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}
/* واکنشگرایی برای موبایل (مخفی کردن متن برای شلوغ نشدن صفحه) */
@media (max-width: 480px) {
.floating-nav-container {
bottom: 15px;
left: 15px;
gap: 8px;
}
.floating-btn {
padding: 12px;
border-radius: 50%;
}
.floating-btn .nav-text {
display: none; /* در موبایل فقط آیکونها نمایش داده میشوند */
}
}
</style>
<script>
// اسکریپت هوشمند برای تشخیص خودکار نام مخزن و ساخت لینک گیتهاب
(function() {
const pathSegments = window.location.pathname.split('/').filter(segment => segment !== "");
// اگر پروژه در سابفولدر بود نام آن را میگیرد، در غیر این صورت نام پیشفرض را خالی میگذارد
const repoName = pathSegments.length > 0 ? pathSegments[0] : "";
const githubBtn = document.getElementById('dynamic-github-btn');
if (repoName) {
// ساخت اتوماتیک لینک گیتهاب با هماهنگی دامین دمو
githubBtn.href = "https://github.com/sibche2013/" + repoName;
} else {
// اگر به هر دلیلی در روت اصلی دمو بود، به پروفایل گیتهاب لینک میشود
githubBtn.href = "https://github.com/sibche2013";
}
})();
</script>
</body>
</html>