Files
MoneyFlix/crm/Views/layouts/public-blank.php
1sonhador 46b20cb1e2 fix: Remove WDMI-specific CSS blocks instead of replacing condition
- Remove entire conditional CSS blocks that were WDMI-specific
- These gradient styles were not needed for MoneyFlix
- Clean up main.php and public-blank.php layouts
2025-10-30 10:01:43 +00:00

203 lines
8.4 KiB
PHP

<?php
declare(strict_types=1);
use App\Core\View;
use App\Core\AppConfig;
use App\Core\AssetManager;
use App\Core\AlertManager;
use App\Core\Branding;
use App\Core\AssetPath;
// Branding dinâmico
$branding = Branding::get();
?>
<!DOCTYPE html>
<html lang="pt" data-layout="vertical" data-topbar="light" data-sidebar="dark" data-sidebar-size="lg" data-sidebar-image="none" data-preloader="disable">
<head>
<meta charset="utf-8" />
<title><?= $title ?? 'Dashboard' ?> | <?= $branding['company_name'] ?? 'Ecommerce' ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta content="BitReport CRM - Sistema de Gestão Empresarial" name="description" />
<meta content="<?= $branding['company_name'] ?? 'Ecommerce' ?>" name="author" />
<!-- App favicon -->
<link rel="shortcut icon" href="<?= $branding['favicon_url'] ?? '/assets/images/favicon.ico'; ?>">
<!-- Theme color for browser -->
<meta name="theme-color" content="<?= $branding['theme_color'] ?? '#405189'; ?>">
<!-- Branding Theme Variants for JavaScript -->
<script>
window.brandingVariants = <?= json_encode($branding['theme_variants'] ?? []); ?>;
</script>
<!-- Force Theme Settings on Every Load -->
<script>
(function() {
// Define the desired theme attributes.
const themeSettings = {
'data-bs-theme': 'light',
'data-sidebar': 'dark',
'data-layout': 'vertical',
'data-layout-style': 'default',
'data-layout-mode': 'light',
'data-layout-width': 'fluid',
'data-sidebar-size': 'lg',
'data-layout-position': 'fixed',
'data-topbar': 'light'
};
// Apply settings to documentElement and sessionStorage.
for (const [key, value] of Object.entries(themeSettings)) {
if (document.documentElement.getAttribute(key) !== value) {
document.documentElement.setAttribute(key, value);
}
if (sessionStorage.getItem(key) !== value) {
sessionStorage.setItem(key, value);
}
}
})();
</script>
<?php View::include('layouts/head-css.php'); ?>
<!-- App Css (same as main layout) -->
<link href="<?= View::asset('/assets/css/app.css'); ?>" rel="stylesheet" type="text/css" />
<!-- Public CSS (includes Ecommerce styles) -->
<link href="<?= View::asset('/assets/css/public.min.css'); ?>" rel="stylesheet" type="text/css" />
<!-- Sidebar Scroll Fix -->
<link href="<?= View::asset('/assets/css/custom-sidebar-fix.css'); ?>" rel="stylesheet" type="text/css" />
<!-- Mobile Menu Fix -->
<link href="<?= View::asset('/assets/css/custom-mobile-menu.css'); ?>" rel="stylesheet" type="text/css" />
<!-- Page specific styles -->
<?php
if (isset($styles) && $styles instanceof Closure) {
$styles();
}
?>
<style>
html, body, #layout-wrapper, .main-content, .page-content, .container-fluid {
height: 100%;
min-height: 100vh;
}
body {
margin: 0;
padding: 0;
}
@media (min-width: 768px) {
.main-content {
margin-left: 0 !important;
}
}
.footer { display: none !important; }
.public-header {
box-shadow: 0 4px 16px rgba(0,0,0,0.08);
border-bottom: 1px solid rgba(0,0,0,0.06);
z-index: 100;
}
.main-content {
position: relative;
z-index: 1;
/* Sem background! */
}
.page-content, .container-fluid {
/* background: #fff !important; */
position: relative;
z-index: 1;
}
.container-fluid {
height: auto !important;
min-height: 0 !important;
}
.page-content {
padding-top: 2rem !important;
}
/* Esconde o botão "Adicionar Produto" (ajusta se necessário) */
a.btn, button.btn, .btn-primary {
/* fallback, mas pode esconder outros botões */
}
a.btn[href*="adicionar"], button.btn[name*="adicionar"] {
display: none !important;
}
/* Esconde a última coluna da tabela (Detalhe) */
th:last-child, td:last-child {
display: none !important;
}
</style>
</head>
<body data-bs-theme="<?= htmlspecialchars($branding['theme_variants']['data-bs-theme'] ?? 'light'); ?>"
data-layout="<?= htmlspecialchars($branding['theme_variants']['data-layout'] ?? 'vertical'); ?>"
data-sidebar="<?= htmlspecialchars($branding['theme_variants']['data-sidebar'] ?? 'light'); ?>"
data-sidebar-size="<?= htmlspecialchars($branding['theme_variants']['data-sidebar-size'] ?? 'lg'); ?>"
data-layout-style="<?= htmlspecialchars($branding['theme_variants']['data-layout-style'] ?? 'default'); ?>"
data-topbar="<?= htmlspecialchars($branding['theme_variants']['data-topbar'] ?? 'light'); ?>"
data-layout-width="<?= htmlspecialchars($branding['theme_variants']['data-layout-width'] ?? 'fluid'); ?>"
data-layout-position="<?= htmlspecialchars($branding['theme_variants']['data-layout-position'] ?? 'fixed'); ?>"
data-sidebar-image="<?= htmlspecialchars($branding['theme_variants']['data-sidebar-image'] ?? 'none'); ?>"
data-preloader="<?= htmlspecialchars($branding['theme_variants']['data-preloader'] ?? 'enable'); ?>" <?php echo isset($page_name) ? 'data-page="' . htmlspecialchars($page_name) . '"' : '' ?>>
<!-- Header público simples -->
<header class="public-header"
style="background: <?= htmlspecialchars($branding['header_bg'] ?? 'var(--vz-vertical-menu-bg, #405189)') ?>;
box-shadow: 0 4px 16px rgba(0,0,0,0.08); border-bottom: 1px solid rgba(0,0,0,0.06);">
<div class="container-fluid py-4">
<div class="d-flex align-items-center">
<img src="<?= htmlspecialchars($branding['logo_url'] ?? '/assets/images/logo-light.png') ?>" alt="<?= htmlspecialchars($branding['company_name'] ?? 'Ecommerce') ?> Logo" height="40" class="me-3">
<?php if (!empty($branding['slogan'] ?? '')): ?>
<div>
<span class="fs-6 fw-normal d-block" style="color: #e0e0e0;">
<?= htmlspecialchars($branding['slogan']) ?>
</span>
</div>
<?php endif; ?>
</div>
</div>
</header>
<!-- Begin page -->
<div id="layout-wrapper">
<?php /* View::include('layouts/sidebar.php'); */ ?>
<?php /* View::include('layouts/menu.php'); */ ?>
<!-- ============================================================== -->
<!-- Start right Content here -->
<!-- ============================================================== -->
<div class="main-content">
<div class="page-content">
<div class="container-fluid">
<?php
// Breadcrumbs/título da página
if (isset($page_title) && $page_title instanceof Closure) {
$page_title();
} elseif (isset($page_title)) {
echo $page_title;
}
// Conteúdo principal da página
if (isset($page_content) && $page_content instanceof Closure) {
$page_content();
} elseif (isset($page_content)) {
echo $page_content;
}
?>
</div>
</div>
<?php View::include('layouts/footer.php'); ?>
</div>
</div>
<?php /* View::include('layouts/customizer.php'); */ ?>
<!-- JAVASCRIPT -->
<!-- Vendor JS (Alpine.js, etc.) -->
<script src="<?= AssetPath::getVendorBundle() ?>"></script>
<!-- Public JS -->
<script src="<?= AssetPath::getLatestJsBundle('public') ?>"></script>
<!-- Initialize Customizer after Alpine.js is ready -->
<script>
document.querySelectorAll('a.btn, button.btn, .btn-primary').forEach(function(btn) {
if (btn.textContent.trim().includes('Adicionar Produto')) {
btn.style.display = 'none';
}
});
</script>
</body>
</html>