feat: готовый бренд ZoomStage и минимальный доменный подвал (refs #12)
deploy-preland / deploy zoomstage.online (push) Successful in 44s

This commit is contained in:
Panfilov Konstantin committed 2026-10-21 17:24:14 +03:00
1 parent a2c3197a16
commit ec087ea636
24 files changed
+365 -237

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
<?php
declare(strict_types=1);
$root = dirname(__DIR__);
foreach (['light', 'dark'] as $theme) foreach ([
'zoomstage.online' => 'zoomstage.online',
'New-Preland.example:8080' => 'new-preland.example',
'www.example.test.' => 'www.example.test',
'<script>alert(1)</script>' => 'fixture.local',
] as $host => $expected) {
$html = shell_exec(PHP_BINARY . ' ' . escapeshellarg(__DIR__ . '/render-preland.php') . ' ' . escapeshellarg($host) . ' ' . escapeshellarg($theme));
if (!preg_match('~<footer\b.*?</footer>~s', $html, $match)) throw new RuntimeException('Подвал не найден');
$footer = $match[0];
foreach (['Наши реквизиты', 'payment.svg', 'ИНН:', 'ОГРНИП:', 'ИП Иванов', 'ИП Кардаполова'] as $forbidden) {
if (str_contains($footer, $forbidden)) throw new RuntimeException('В подвале остался ' . $forbidden);
}
if (!str_contains($footer, date('Y') . '© ' . $expected)) throw new RuntimeException('Неправильный домен копирайта: ' . $host);
if (substr_count($footer, '<img ') !== 2) throw new RuntimeException('Нужны только два тематических SVG логотипа');
if (str_contains($footer, '<script>')) throw new RuntimeException('Host попал в HTML без проверки');
}
echo "OK: минимальный подвал, две темы, перенос домена/порт/trailing-dot и invalid-host\n";