From ebca47f3c5ceff4171a5f99dfd1e1c5ce6e774aa Mon Sep 17 00:00:00 2001 From: Alexander Andreev Date: Fri, 20 Feb 2026 18:14:12 +0300 Subject: [PATCH] Public: mobile sidebar drawer for inner pages Keep the sections sidebar visible on the home screen but collapse it on inner pages to save space on phones. Add a menu toggle, overlay close controls, and edge-swipe gestures so navigation stays quickly accessible on touch devices. --- index.php | 179 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 174 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index af264de..eb277f9 100644 --- a/index.php +++ b/index.php @@ -40,6 +40,7 @@ $welcomeText = settingGet('welcome_text', 'Добро пожаловать в г $photo = $activePhotoId > 0 ? photoById($activePhotoId) : null; $comments = $photo ? commentsByPhoto($activePhotoId) : []; $photos = $activeSectionId > 0 ? photosBySection($activeSectionId) : []; +$isHomePage = $activeSectionId < 1 && $activePhotoId < 1; function h(string $v): string { return htmlspecialchars($v, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8'); } function assetUrl(string $path): string { $f=__DIR__ . '/' . ltrim($path,'/'); $v=is_file($f)?(string)filemtime($f):(string)time(); return $path . '?v=' . rawurlencode($v); } @@ -128,14 +129,65 @@ function outputWatermarked(string $path, string $mime): never Фотогалерея - + - +
-

Фотогалерея

+
+

Фотогалерея

+ + + +
+ + +
-