20require_once __DIR__ .
'/../../root.php';
21require_once __DIR__ .
'/../../classes/actions/class.action.quickPick.php';
54$getLoader =
'<span class = "loader float-end"><img src = "' .
$imagesPath .
'loader.gif" alt="spinner"></span>';
62<html lang =
"<?php echo htmlspecialchars($bearsamppLang->getValue( Lang::LOCALE ), ENT_QUOTES, 'UTF-8') ?>">
65 <meta charset =
"utf-8">
66 <meta name =
"viewport" content =
"width=device-width, initial-scale=1.0">
67 <meta name =
"description" content =
"Localhost Dashboard">
68 <meta name =
"author" content =
"Bearsampp">
76 "/libs/bootstrap/css/bootstrap.min.css",
77 "/libs/fontawesome/css/all.min.css",
81 "/libs/bootstrap/js/bootstrap.bundle.min.js",
82 "/libs/fontawesome/js/all.min.js",
84 "/js/latestversion.js",
96 "/js/loading-cursor.js"
102 foreach ( $cssFiles as $file ) {
103 echo
'<link href="' .
$resourcesPath . $file .
'" rel="stylesheet">' . PHP_EOL;
107 <link href =
"<?php echo $iconsPath . 'favicon.ico'; ?>" rel =
"icon" />
110 <!-- Inline script to
set loading cursor immediately -->
113 document.documentElement.classList.add(
'loading-cursor');
116 window.addEventListener(
'DOMContentLoaded',
function() {
118 window.addEventListener(
'load',
function() {
119 document.documentElement.classList.remove(
'loading-cursor');
122 const existingOverlay = document.querySelector(
'.loading-overlay');
123 if (existingOverlay) {
124 existingOverlay.parentNode.removeChild(existingOverlay);
132<nav
class = "navbar navbar-expand-md navbar-light bg-dark fixed-top
" role = "navigation
">
133 <div class = "container-fluid
">
134 <div class = "d-inline-block
">
135 <a class = "navbar-brand
" href = "<?php echo
Util::getWebsiteUrl(); ?>" aria-label = 'Home'>
136 <img class = "p-1" alt = "<?php echo APP_TITLE . ' ' . $bearsamppCore->getAppVersion(); ?>"
137 src = "<?php echo $imagesPath . 'header-logo.png'; ?>">
139 <button class = "navbar-toggler" type = "button" data-bs-toggle = "collapse" data-bs-target = "#navbarSupportedContent" aria-controls = "navbarSupportedContent"
140 aria-expanded = "false" aria-label = "Toggle navigation">
141 <span class = "navbar-toggler-icon"></span>
147 echo $quickPick->loadQuickpick($imagesPath);
150 error_log(
'Error loading QuickPick: ' . $e->getMessage());
151 echo
'<div id="quickPickError" class="text-center mt-3 pe-3">
152 <span>QuickPick unavailable</span>
157 <div
class = "collapse navbar-collapse icons
" id = "navbarSupportedContent
">
158 <div class = "d-flex flex-row justify-content-space-between align-items-center flex-fill mb-0
">
159 <a data-bs-toggle = "tooltip
" data-bs-placement = "top
" data-bs-title = "<?php echo
$bearsamppLang->getValue(
Lang::DISCORD ); ?>" target = "_blank"
161 <i class = 'fa-brands fa-discord'></i>
163 <a data-bs-toggle = "tooltip" data-bs-placement = "top" data-bs-title = "<?php echo $bearsamppLang->getValue( Lang::FACEBOOK ); ?>" target = "_blank"
164 href = "https://www.facebook.com/groups/bearsampp" aria-label = "Facebook">
165 <i class = "fa-brands fa-facebook"></i>
167 <a data-bs-toggle = "tooltip" data-bs-placement = "top" data-bs-title = "<?php echo $bearsamppLang->getValue( Lang::GITHUB ); ?>" target = "_blank"
168 href = "<?php echo Util::getGithubUrl(); ?>" aria-label = "GitHub">
169 <i class = "fa-brands fa-github"></i>
171 <a data-bs-toggle = "tooltip" data-bs-placement = "top" data-bs-title = "<?php echo $bearsamppLang->getValue( Lang::DONATE ); ?>" target = "_blank"
172 href = "<?php echo Util::getWebsiteUrl( 'donate' ); ?>"><img class = "donate" src = "<?php echo $imagesPath . 'donate.png'; ?>" alt = 'Donation Icon' />
178<div id = "page-wrapper">
181 include __DIR__ . '/tpls/hp.latestversion.html';
182 } catch (Exception $e) {
183 error_log('Error including latest version template: ' . $e->getMessage());
184 echo '<div class="alert alert-warning">Latest version information unavailable</div>';
193 include __DIR__ .
'/tpls/hp.index.html';
195 }
catch (Exception $e) {
196 error_log(
'Error including page template: ' . $e->getMessage());
197 echo
'<div class="alert alert-warning">Page content unavailable</div>';
204 echo
'<script src="' .
$resourcesPath . $file .
'"></script>' . PHP_EOL;
global $bearsamppHomepage