## Problema - Componentes deshabilitados/excluidos dejaban wrappers HTML vacíos (navbar 32px, sidebar col-lg-3 294px) - AdSense ignoraba exclusiones por URL pattern en grupo _exclusions ## Solución Plan 99.15 (Clean Architecture) ### Domain Layer - WrapperVisibilityCheckerInterface: contrato para verificar visibilidad ### Application Layer - CheckWrapperVisibilityUseCase: orquesta verificaciones de visibilidad ### Infrastructure Layer - WordPressComponentVisibilityRepository: consulta BD + PageVisibilityHelper - WrapperVisibilityService: facade estático para templates - BodyClassHooksRegistrar: agrega clases CSS failsafe al body ### Templates modificados - header.php: renderizado condicional de <nav> wrapper - page.php/single.php: lógica dinámica col-lg-9/col-lg-12 según sidebar ### CSS Failsafe - css-global-utilities.css: reglas body.roi-hide-* como respaldo ## Fix AdSense (Inc/adsense-placement.php) - Agregado PageVisibilityHelper::shouldShow() a todas las funciones: roi_render_ad_slot, roi_render_rail_ads, roi_enqueue_adsense_script, roi_inject_content_ads, roi_render_anchor_ads, roi_render_vignette_ad, roi_enqueue_anchor_vignette_scripts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
131 lines
2.6 KiB
CSS
131 lines
2.6 KiB
CSS
/**
|
|
* Utility Classes
|
|
*
|
|
* SOLO utilidades que NO están en Bootstrap 5
|
|
* IMPORTANTE: Bootstrap 5 ya provee la mayoría de utilities (display, flex, spacing, etc.)
|
|
* Este archivo solo contiene utilities adicionales no incluidas en Bootstrap
|
|
*
|
|
* @package ROI_Theme
|
|
* @since 1.0.0
|
|
*/
|
|
|
|
/* ========================================
|
|
CURSOR UTILITIES
|
|
======================================== */
|
|
|
|
.cursor-pointer {
|
|
cursor: pointer !important;
|
|
}
|
|
|
|
.cursor-default {
|
|
cursor: default !important;
|
|
}
|
|
|
|
.cursor-not-allowed {
|
|
cursor: not-allowed !important;
|
|
}
|
|
|
|
.cursor-auto {
|
|
cursor: auto !important;
|
|
}
|
|
|
|
/* ========================================
|
|
USER SELECT
|
|
======================================== */
|
|
|
|
.user-select-auto {
|
|
user-select: auto !important;
|
|
}
|
|
|
|
.user-select-none {
|
|
user-select: none !important;
|
|
}
|
|
|
|
.user-select-all {
|
|
user-select: all !important;
|
|
}
|
|
|
|
/* ========================================
|
|
POINTER EVENTS
|
|
======================================== */
|
|
|
|
.pointer-events-none {
|
|
pointer-events: none !important;
|
|
}
|
|
|
|
.pointer-events-auto {
|
|
pointer-events: auto !important;
|
|
}
|
|
|
|
/* ========================================
|
|
OBJECT FIT
|
|
======================================== */
|
|
|
|
.object-fit-contain {
|
|
object-fit: contain !important;
|
|
}
|
|
|
|
.object-fit-cover {
|
|
object-fit: cover !important;
|
|
}
|
|
|
|
.object-fit-fill {
|
|
object-fit: fill !important;
|
|
}
|
|
|
|
.object-fit-scale {
|
|
object-fit: scale-down !important;
|
|
}
|
|
|
|
/* ========================================
|
|
TRANSITION
|
|
======================================== */
|
|
|
|
.transition-all {
|
|
transition: all 0.3s ease !important;
|
|
}
|
|
|
|
.transition-none {
|
|
transition: none !important;
|
|
}
|
|
|
|
/* ========================================
|
|
COMPONENT VISIBILITY FAILSAFE (Plan 99.15)
|
|
|
|
CSS failsafe: Oculta wrappers de componentes
|
|
cuando body tiene clases roi-hide-*
|
|
|
|
Estas clases se agregan via BodyClassHooksRegistrar
|
|
cuando los componentes están deshabilitados/excluidos.
|
|
======================================== */
|
|
|
|
/* Navbar hidden */
|
|
body.roi-hide-navbar .navbar {
|
|
display: none !important;
|
|
}
|
|
|
|
/* Table of Contents hidden */
|
|
body.roi-hide-toc .roi-toc-container {
|
|
display: none !important;
|
|
}
|
|
|
|
/* CTA Sidebar hidden */
|
|
body.roi-hide-cta-sidebar .roi-cta-box {
|
|
display: none !important;
|
|
}
|
|
|
|
/* Generic sidebar hidden */
|
|
body.roi-hide-sidebar .sidebar-sticky {
|
|
display: none !important;
|
|
}
|
|
|
|
/* When ALL sidebar components are hidden, expand main column */
|
|
body.roi-sidebar-empty .col-lg-9 {
|
|
flex: 0 0 100% !important;
|
|
max-width: 100% !important;
|
|
}
|
|
|
|
body.roi-sidebar-empty .col-lg-3 {
|
|
display: none !important;
|
|
}
|