Implement modern sidebar navigation with hamburger menu
- Add responsive sidebar with hamburger toggle functionality - Implement dual toggle buttons (inner/outer) for better UX - Fix sidebar positioning to not overlap header and footer - Add sticky footer with proper z-index layering - Download and integrate Bootstrap source maps locally - Optimize toggle icons: smaller, cleaner, no button styling - Ensure sidebar respects footer boundaries - Add smooth transitions and hover effects - Fix active page highlighting and folder auto-expansion - Create professional W3Schools-style navigation - Maintain full offline capability with local assets
This commit is contained in:
1
public/engine
Symbolic link
1
public/engine
Symbolic link
@@ -0,0 +1 @@
|
||||
../engine
|
||||
@@ -438,7 +438,7 @@ class CodePressCMS {
|
||||
}
|
||||
|
||||
// Block direct access to content files
|
||||
$requestUri = $_SERVER['REQUEST_URI'];
|
||||
$requestUri = $_SERVER['REQUEST_URI'] ?? '';
|
||||
if (strpos($requestUri, '/content/') !== false) {
|
||||
http_response_code(403);
|
||||
echo '<h1>403 - Forbidden</h1><p>Direct access to content files is not allowed.</p>';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// Router file for PHP development server to handle security
|
||||
// Router file for PHP development server to handle security and static files
|
||||
|
||||
$requestUri = $_SERVER['REQUEST_URI'];
|
||||
$parsedUrl = parse_url($requestUri);
|
||||
@@ -23,9 +23,30 @@ foreach ($sensitiveFiles as $file) {
|
||||
}
|
||||
|
||||
// Serve static files from engine/assets
|
||||
if (strpos($path, '/engine/') === 0 && file_exists(__DIR__ . $path)) {
|
||||
return false; // Let PHP server serve the file
|
||||
if (strpos($path, '/engine/') === 0) {
|
||||
$filePath = __DIR__ . $path;
|
||||
if (file_exists($filePath)) {
|
||||
// Set appropriate content type
|
||||
$extension = strtolower(pathinfo($filePath, PATHINFO_EXTENSION));
|
||||
$mimeTypes = [
|
||||
'css' => 'text/css',
|
||||
'js' => 'application/javascript',
|
||||
'svg' => 'image/svg+xml',
|
||||
'woff' => 'font/woff',
|
||||
'woff2' => 'font/woff2',
|
||||
'ttf' => 'font/ttf'
|
||||
];
|
||||
|
||||
if (isset($mimeTypes[$extension])) {
|
||||
header('Content-Type: ' . $mimeTypes[$extension]);
|
||||
}
|
||||
|
||||
// Serve the file
|
||||
readfile($filePath);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Route all other requests to index.php
|
||||
return false; // Let PHP server handle routing to index.php
|
||||
include __DIR__ . '/index.php';
|
||||
return true;
|
||||
Reference in New Issue
Block a user