feat: add light version

This commit is contained in:
Rekryt
2025-07-02 21:32:45 +03:00
parent 9d261605a1
commit a0b041730e
27 changed files with 108 additions and 157 deletions

View File

@@ -16,8 +16,12 @@ class MainController extends AbstractIPListController {
public function getBody(): string {
$url = parse_url($this->request->getUri());
$path = str_replace('..', '', $url['path']);
$path = PATH_ROOT . '/public/' . $path;
if ($path === '/index') {
return $this->renderTemplate('index');
}
$path = PATH_ROOT . '/public/' . $path;
foreach ([$path, $path . 'index.html', $path . '.html', $path . '/index.html'] as $filePath) {
if (isFile($filePath)) {
return $this->output($filePath);

View File

@@ -628,7 +628,7 @@ use OpenCCK\App\Controller\MainController;
<div class="github">
<iframe src="https://ghbtns.com/github-btn.html?user=rekryt&amp;repo=iplist&amp;type=star&amp;count=true&amp;size=large" frameborder="0" scrolling="0" width="170" height="30" title="GitHub"></iframe>
</div>
<form action="" method="get" class="main-form">
<form action="/" method="get" class="main-form">
<section class="main-section">
<label class="main-formItem">
Format: