Adds alternative test theme
parent
522d84f203
commit
1c93864567
|
@ -0,0 +1,180 @@
|
||||||
|
/* Retro Theme Styles */
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--primary-color: #4361ee;
|
||||||
|
--secondary-color: #3f37c9;
|
||||||
|
--accent-color: #4895ef;
|
||||||
|
--light-color: #f8f9fa;
|
||||||
|
--dark-color: #212529;
|
||||||
|
--success-color: #4bb543;
|
||||||
|
--warning-color: #f9c74f;
|
||||||
|
--danger-color: #ef476f;
|
||||||
|
--border-radius: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* General Styles */
|
||||||
|
body.modern-theme {
|
||||||
|
background-color: #f5f7fa;
|
||||||
|
color: #333;
|
||||||
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Navigation */
|
||||||
|
.menu-container {
|
||||||
|
background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
|
||||||
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
||||||
|
padding: 0.5rem 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-left {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-right {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Cards */
|
||||||
|
.card {
|
||||||
|
border: none;
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
|
||||||
|
transition: transform 0.2s, box-shadow 0.2s;
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header {
|
||||||
|
background-color: white;
|
||||||
|
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Buttons */
|
||||||
|
.btn-primary {
|
||||||
|
background-color: var(--primary-color);
|
||||||
|
border-color: var(--primary-color);
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
padding: 0.375rem 1rem;
|
||||||
|
font-weight: 500;
|
||||||
|
transition: all 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary:hover {
|
||||||
|
background-color: var(--secondary-color);
|
||||||
|
border-color: var(--secondary-color);
|
||||||
|
transform: translateY(-1px);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Forms */
|
||||||
|
.form-control {
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
border: 1px solid #e1e5eb;
|
||||||
|
padding: 0.5rem 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control:focus {
|
||||||
|
border-color: var(--accent-color);
|
||||||
|
box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.25);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tables */
|
||||||
|
.table {
|
||||||
|
background-color: white;
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table thead th {
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
border-bottom: 2px solid #e9ecef;
|
||||||
|
font-weight: 600;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
letter-spacing: 0.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Alerts */
|
||||||
|
.alert {
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
border: none;
|
||||||
|
padding: 1rem 1.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert-success {
|
||||||
|
background-color: rgba(75, 181, 67, 0.1);
|
||||||
|
color: var(--success-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert-warning {
|
||||||
|
background-color: rgba(249, 199, 79, 0.1);
|
||||||
|
color: #c9a227;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert-danger {
|
||||||
|
background-color: rgba(239, 71, 111, 0.1);
|
||||||
|
color: var(--danger-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Theme Switcher */
|
||||||
|
.theme-switcher {
|
||||||
|
margin-left: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-switcher .dropdown-toggle {
|
||||||
|
background: rgba(255, 255, 255, 0.1);
|
||||||
|
border: none;
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: white;
|
||||||
|
transition: all 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-switcher .dropdown-toggle:hover {
|
||||||
|
background: rgba(255, 255, 255, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-option {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0.5rem 1rem;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background-color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-option:hover {
|
||||||
|
background-color: rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-preview {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-right: 10px;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Responsive adjustments */
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.menu-container {
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-left, .menu-right {
|
||||||
|
width: 100%;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0.25rem 0;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,81 @@
|
||||||
|
/**
|
||||||
|
* Retro Theme JavaScript
|
||||||
|
*
|
||||||
|
* This file contains theme-specific JavaScript functionality.
|
||||||
|
*/
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
// Initialize tooltips
|
||||||
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
|
||||||
|
// Initialize popovers
|
||||||
|
$('[data-toggle="popover"]').popover();
|
||||||
|
|
||||||
|
// Add smooth scrolling to anchor links
|
||||||
|
$('a[href^="#"]').on('click', function(e) {
|
||||||
|
if (this.hash !== '') {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
const hash = this.hash;
|
||||||
|
$('html, body').animate(
|
||||||
|
{ scrollTop: $(hash).offset().top - 20 },
|
||||||
|
800
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Handle form validation feedback
|
||||||
|
$('form.needs-validation').on('submit', function(event) {
|
||||||
|
if (this.checkValidity() === false) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
}
|
||||||
|
$(this).addClass('was-validated');
|
||||||
|
});
|
||||||
|
|
||||||
|
// Add active class to current nav item
|
||||||
|
const currentPage = window.location.pathname.split('/').pop() || 'index.php';
|
||||||
|
$('.nav-link').each(function() {
|
||||||
|
if ($(this).attr('href') === currentPage) {
|
||||||
|
$(this).addClass('active');
|
||||||
|
$(this).closest('.nav-item').addClass('active');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Handle sidebar toggle
|
||||||
|
const sidebarToggle = document.querySelector('.sidebar-toggle');
|
||||||
|
if (sidebarToggle) {
|
||||||
|
sidebarToggle.addEventListener('click', function() {
|
||||||
|
document.documentElement.classList.toggle('sidebar-collapsed');
|
||||||
|
localStorage.setItem('sidebarState',
|
||||||
|
document.documentElement.classList.contains('sidebar-collapsed') ? 'collapsed' : 'expanded');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handle dropdown menus
|
||||||
|
$('.dropdown-menu a.dropdown-toggle').on('click', function(e) {
|
||||||
|
if (!$(this).next().hasClass('show')) {
|
||||||
|
$(this).parents('.dropdown-menu').first().find('.show').removeClass('show');
|
||||||
|
}
|
||||||
|
const $subMenu = $(this).next('.dropdown-menu');
|
||||||
|
$subMenu.toggleClass('show');
|
||||||
|
|
||||||
|
$(this).parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function() {
|
||||||
|
$('.dropdown-submenu .show').removeClass('show');
|
||||||
|
});
|
||||||
|
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Theme switcher functionality
|
||||||
|
function setTheme(themeName) {
|
||||||
|
localStorage.setItem('theme', themeName);
|
||||||
|
document.documentElement.className = themeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Immediately-invoked function to set the theme on initial load
|
||||||
|
(function () {
|
||||||
|
const savedTheme = localStorage.getItem('theme') || 'light-theme';
|
||||||
|
setTheme(savedTheme);
|
||||||
|
})();
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'name' => 'Retro theme',
|
||||||
|
'description' => 'Example theme. An alternative to the default theme for Jilo Web.',
|
||||||
|
'version' => '1.0.0',
|
||||||
|
'author' => 'Lindeas Inc.',
|
||||||
|
'screenshot' => 'screenshot.png',
|
||||||
|
'options' => [
|
||||||
|
// Theme-specific options can be defined here
|
||||||
|
]
|
||||||
|
];
|
|
@ -0,0 +1,31 @@
|
||||||
|
<!-- Retro Theme Footer -->
|
||||||
|
<footer class="footer mt-5 py-3 bg-light">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<span class="text-muted">
|
||||||
|
© <?= date('Y') ?> <?= htmlspecialchars($config['site_name'] ?? '') ?> v<?= htmlspecialchars($config['version'] ?? '') ?>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 text-md-end">
|
||||||
|
<span class="text-muted">
|
||||||
|
<?= htmlspecialchars($themeName ?? 'Modern Theme') ?>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<!-- Theme-specific JavaScript -->
|
||||||
|
<script src="<?= \App\Helpers\Theme::asset('js/theme.js') ?>"></script>
|
||||||
|
|
||||||
|
<!-- Global site scripts -->
|
||||||
|
<script src="<?= htmlspecialchars($app_root) ?>static/js/messages.js"></script>
|
||||||
|
|
||||||
|
<?php if ($page === 'graphs'): ?>
|
||||||
|
<script src="<?= htmlspecialchars($app_root) ?>static/js/graphs.js"></script>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php do_hook('footer_scripts'); ?>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,75 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title><?= htmlspecialchars($config['site_name'] ?? '') ?> - <?= htmlspecialchars($pageTitle ?? 'Dashboard') ?></title>
|
||||||
|
|
||||||
|
<!-- Bootstrap 5.3.3 CSS -->
|
||||||
|
<link rel="stylesheet" type="text/css" href="<?= htmlspecialchars($app_root) ?>static/libs/bootstrap/bootstrap-5.3.3.min.css">
|
||||||
|
|
||||||
|
<!-- Font Awesome -->
|
||||||
|
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.0/css/all.css">
|
||||||
|
|
||||||
|
<!-- Custom CSS -->
|
||||||
|
<link rel="stylesheet" type="text/css" href="<?= htmlspecialchars($app_root) ?>static/css/main.css">
|
||||||
|
|
||||||
|
<!-- Theme-specific CSS -->
|
||||||
|
<link rel="stylesheet" type="text/css" href="<?= \App\Helpers\Theme::asset('css/theme.css') ?>">
|
||||||
|
|
||||||
|
<!-- jQuery -->
|
||||||
|
<script src="<?= htmlspecialchars($app_root) ?>static/libs/jquery/jquery.min.js"></script>
|
||||||
|
|
||||||
|
<!-- Bootstrap JS -->
|
||||||
|
<script src="<?= htmlspecialchars($app_root) ?>static/libs/bootstrap/popper.min.js"></script>
|
||||||
|
<script src="<?= htmlspecialchars($app_root) ?>static/libs/bootstrap/bootstrap-4.0.0.min.js"></script>
|
||||||
|
|
||||||
|
<?php if (Session::getUsername()): ?>
|
||||||
|
<script>
|
||||||
|
// Restore sidebar state before the page is rendered
|
||||||
|
(function() {
|
||||||
|
var savedState = localStorage.getItem('sidebarState');
|
||||||
|
if (savedState === 'collapsed') {
|
||||||
|
document.documentElement.classList.add('sidebar-collapsed');
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<!-- Page-specific CSS -->
|
||||||
|
<?php if ($page === 'logs'): ?>
|
||||||
|
<link rel="stylesheet" type="text/css" href="<?= htmlspecialchars($app_root) ?>static/css/logs.css">
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if ($page === 'profile'): ?>
|
||||||
|
<link rel="stylesheet" type="text/css" href="<?= htmlspecialchars($app_root) ?>static/css/profile.css">
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if ($page === 'agents'): ?>
|
||||||
|
<script src="<?= htmlspecialchars($app_root) ?>static/js/agents.js"></script>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if ($page === 'graphs'): ?>
|
||||||
|
<script src="<?= htmlspecialchars($app_root) ?>static/libs/chartjs/chart.umd.min.js"></script>
|
||||||
|
<script src="<?= htmlspecialchars($app_root) ?>static/libs/chartjs/moment.min.js"></script>
|
||||||
|
<script src="<?= htmlspecialchars($app_root) ?>static/libs/chartjs/chartjs-adapter-moment.min.js"></script>
|
||||||
|
<script src="<?= htmlspecialchars($app_root) ?>static/libs/chartjs/chartjs-plugin-zoom.min.js"></script>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<link rel="icon" type="image/x-icon" href="<?= htmlspecialchars($app_root) ?>static/favicon.ico">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="modern-theme">
|
||||||
|
<div id="messages-container" class="container-fluid mt-2"></div>
|
||||||
|
|
||||||
|
<?php if (isset($system_messages) && is_array($system_messages)): ?>
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<?php foreach ($system_messages as $msg): ?>
|
||||||
|
<?= Feedback::render($msg['category'], $msg['key'], $msg['custom_message'] ?? null) ?>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
Loading…
Reference in New Issue