| | -<!DOCTYPE html> |
| | -<html lang="en"> |
| | -<head> |
| | - <meta charset="UTF-8"> |
| | - <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| | - <title><?php echo $page_title ?? SITE_TITLE; ?></title> |
| | - <link rel="stylesheet" href="<?php echo $css_file; ?>"> |
| | - <style> |
| | - .header { |
| | - display: flex; |
| | - justify-content: space-between; |
| | - align-items: center; |
| | - padding: 10px 20px; |
| | - } |
| | - .theme-toggle a { |
| | - padding: 5px 10px; |
| | - border: 1px solid currentColor; |
| | - border-radius: 4px; |
| | - text-decoration: none; |
| | - color: <?php echo ($current_theme === 'light') ? '#000000' : '#FFFFFF'; ?>; |
| | - background-color: <?php echo ($current_theme === 'light') ? '#F0F0F0' : '#333333'; ?>; |
| | - } |
| | - .theme-toggle a:hover { |
| | - opacity: 0.8; |
| | - } |
| | - </style> |
| | -</head> |
| | -<body> |
| | - <div class="header"> |
| | - <h1><a href="?<?php echo http_build_query(array_merge($_GET, ['theme' => $current_theme, 'action' => 'list', 'repo' => '', 'ref' => '', 'path' => '', 'hash' => ''])); ?>">📚 <?php echo SITE_TITLE; ?></a></h1> |
| | - |
| | - <div class="theme-toggle"> |
| | - <?php |
| | - $query_params = $_GET; |
| | - unset($query_params['theme']); |
| | - $opposite_theme = ($current_theme === 'light') ? 'dark' : 'light'; |
| | - $toggle_link = '?' . http_build_query(array_merge($query_params, ['theme' => $opposite_theme])); |
| | - ?> |
| | - <a href="<?php echo htmlspecialchars($toggle_link); ?>" class="btn-theme" title="Switch to <?php echo $opposite_theme; ?> Mode"> |
| | - <?php if ($current_theme === 'light'): ?> |
| | - 🌙 Dark |
| | - <?php else: ?> |
| | - ☀️Light |
| | - <?php endif; ?> |
| | - </a> |
| | - </div> |
| | - </div> |
| | - |
| | - <div class="container"> |
| | +</div> |
| | +</body> |
| | +</html> |
| | |
| | |