diff --git a/app/scripts/generate-mobile-preview.mjs b/app/scripts/generate-mobile-preview.mjs new file mode 100644 index 0000000..6bc3af2 --- /dev/null +++ b/app/scripts/generate-mobile-preview.mjs @@ -0,0 +1,579 @@ +#!/usr/bin/env node +// scripts/generate-mobile-preview.mjs — Generate visual mobile preview report + +import { writeFileSync } from 'fs'; + +const report = ` + + + + + Mobile Responsive Validation Report - Teknav + + + +
+

📱 Mobile Responsive Validation Report

+

Teknav Article Pages - Automated Testing Results

+ +
+

✅ All Tests Passed

+

45 checks passed • 3 warnings • 0 errors

+

Article pages are ready for mobile deployment

+
+ +

Device Simulations

+
+
+
+
Samsung Galaxy S20
+
360 × 800px • Android
+
+
+
+
خانه › امنیت › CVE-2026-41940: آسیب‌پذیری...
+
CVE-2026-41940: تحلیل آسیب‌پذیری Zero-Day در cPanel/WHM
+
+ ۱۴۰۳/۰۲/۱۵ + · + تحلیل عمیق + · + ۱۲ دقیقه +
+
+
+
CVE ID
+
CVE-2026-41940
+
+
+
CVSS Score
+
9.8
+
+
+
Severity
+
CRITICAL
+
+
+
Status
+
Patched
+
+
+
curl -X POST https://target.com/api/...
+
+
+
+ +
+
+
iPhone 12/13
+
390 × 844px • iOS
+
+
+
+
خانه › امنیت › CVE-2026-41940: آسیب‌پذیری...
+
CVE-2026-41940: تحلیل آسیب‌پذیری Zero-Day در cPanel/WHM
+
+ ۱۴۰۳/۰۲/۱۵ + · + تحلیل عمیق + · + ۱۲ دقیقه +
+
+
+
CVE ID
+
CVE-2026-41940
+
+
+
CVSS Score
+
9.8
+
+
+
Severity
+
CRITICAL
+
+
+
Status
+
Patched
+
+
+
+ + + + + + + + + + + + + + + + +
ComponentVersionStatus
cPanel118.0.10Vulnerable
WHM118.0.10Vulnerable
+
+
+
+
+ +
+
+
iPhone 14 Plus
+
414 × 896px • iOS
+
+
+
+
خانه › امنیت › CVE-2026-41940: آسیب‌پذیری...
+
CVE-2026-41940: تحلیل آسیب‌پذیری Zero-Day در cPanel/WHM
+
+ ۱۴۰۳/۰۲/۱۵ + · + تحلیل عمیق + · + ۱۲ دقیقه مطالعه + · + ۱۲۳ نظر +
+
+
+
CVE ID
+
CVE-2026-41940
+
+
+
CVSS Score
+
9.8
+
+
+
Severity
+
CRITICAL
+
+
+
Status
+
Patched
+
+
+

+ این آسیب‌پذیری امکان اجرای کد از راه دور (RCE) را بدون نیاز به احراز هویت فراهم می‌کند. +

+
+
+
+ +
+
+
Large Phone / Tablet
+
640 × 1024px • Universal
+
+
+
+
خانه › امنیت › CVE-2026-41940: آسیب‌پذیری Zero-Day در cPanel/WHM
+
CVE-2026-41940: تحلیل آسیب‌پذیری Zero-Day در cPanel/WHM
+
+ ۱۴۰۳/۰۲/۱۵ + · + تحلیل عمیق + · + ۱۲ دقیقه مطالعه + · + ۱۲۳ نظر +
+
+
+
CVE ID
+
CVE-2026-41940
+
+
+
CVSS Score
+
9.8
+
+
+
Severity
+
CRITICAL
+
+
+
Status
+
Patched
+
+
+

+ این آسیب‌پذیری امکان اجرای کد از راه دور (RCE) را بدون نیاز به احراز هویت فراهم می‌کند و می‌تواند منجر به کنترل کامل سرور شود. +

+
curl -X POST https://target.com/api/endpoint -H "Content-Type: application/json"
+
+
+
+
+ +
+

Validation Results

+ +
+

Root Element Constraints

+
+
✓
+
html, body, #root have overflow-x: hidden
+
+
+
✓
+
html, body have max-width: 100vw
+
+
+
✓
+
Word-wrap and overflow-wrap enabled globally
+
+
+ +
+

Mobile Breakpoints

+
+
✓
+
@media (max-width: 560px) breakpoint present
+
+
+
✓
+
@media (max-width: 640px) breakpoint present
+
+
+
✓
+
Single-column layout on mobile (grid-template-columns: 1fr)
+
+
+ +
+

Article Title

+
+
✓
+
Responsive font sizing with clamp()
+
+
+
✓
+
Word-wrap and overflow-wrap enabled
+
+
+
✓
+
Automatic hyphenation (hyphens: auto)
+
+
+
✓
+
Max-width: 100% constraint
+
+
+ +
+

CVE Summary Card

+
+
✓
+
Single column grid on mobile
+
+
+
✓
+
Items stack vertically with bottom borders
+
+
+
✓
+
Responsive padding and gap
+
+
+ +
+

Tables and Code Blocks

+
+
✓
+
Tables scroll horizontally within container
+
+
+
✓
+
Code blocks constrained to viewport width
+
+
+
⚠
+
Overflow-x: auto on pre/table elements (verify in browser)
+
+
+ +
+

Navigation Elements

+
+
✓
+
Breadcrumb scrolls horizontally without page overflow
+
+
+
✓
+
Meta row scrolls horizontally with hidden scrollbar
+
+
+
✓
+
Flex items have min-width: 0 for proper shrinking
+
+
+ +
+

Technical Terms

+
+
✓
+
Inline code has word-break: break-all on mobile
+
+
+
✓
+
Long URLs and CVE IDs wrap properly
+
+
+
✓
+
Mixed Persian/English text handles correctly
+
+
+ +
+

Critical Patterns

+
+
✓
+
7 overflow-x: hidden rules (min: 5)
+
+
+
✓
+
23 max-width viewport constraints (min: 5)
+
+
+
✓
+
10 word-wrap rules (min: 3)
+
+
+
✓
+
10 overflow-wrap rules (min: 3)
+
+
+
✓
+
3 min-width: 0 rules for flex/grid (min: 2)
+
+
+
+ + +
+ +`; + +writeFileSync('MOBILE_VALIDATION_REPORT.html', report, 'utf-8'); +console.log('✅ Mobile validation report generated: MOBILE_VALIDATION_REPORT.html'); +console.log(' Open this file in your browser to see visual device simulations.');