Implementación de correcciones críticas de estructura HTML base para replicar exactamente el template RDash. Todas las correcciones validadas en staging con wp-debug plugin. **Issue #68 - Sidebar Sticky (CRÍTICO):** - sidebar.php: Eliminado wrapper <aside id="secondary"> - sidebar.php: Agregado <div class="sidebar-sticky position-sticky" style="top: 5rem;"> - sidebar.php: Eliminado <div class="sidebar-inner"> innecesario - single.php línea 245: Cambiado get_template_part('template-parts/sidebar') → get_sidebar() - Resultado: Sidebar ahora flota al lado del contenido (sticky funcional) - Template ref: index.html líneas 1164-1194 **Issue #66 - Navbar Structure:** - header.php: Eliminado navbar-brand completo (logo NO debe existir) - header.php: Movido navbar-toggler para ser PRIMERO dentro de container - header.php: Removido ms-auto de navbar-nav menu - Resultado: Orden correcto (Toggler → Collapse con menú) - Template ref: index.html líneas 264-320 **Issue #67 - Notification Bar:** - header.php: Cambiado container-fluid → container - header.php: Eliminado botón close completo (NO existe en template) - header.php: Removido position-relative de flex div - Resultado: Notification bar con estructura correcta - Template ref: index.html líneas 253-262 **Issue #69 - Footer Classes:** - footer.php línea 85: Eliminado id="colophon" class="site-footer" - footer.php línea 85: Agregado class="py-5 mt-0 bg-dark text-white" - Resultado: Footer con clases Bootstrap correctas - Template ref: index.html línea 1267 **Validación en Staging:** ✅ Sidebar sticky: <div class="sidebar-sticky position-sticky" style="top: 5rem;"> presente ✅ Navbar: Toggler primero, sin logo, sin ms-auto ✅ Notification bar: container, sin botón close ✅ Footer: clases py-5 mt-0 bg-dark text-white ✅ PHP syntax: 0 errores en 4 archivos ✅ WP Debug: Templates y template parts cargando correctamente **Estadísticas:** - 4 archivos modificados (sidebar, single, header, footer) - 27 inserciones, 47 eliminaciones (net -20 líneas) - 4 issues completados (#68 CRÍTICO, #66, #67, #69) - Template RDash index.html: 1333 líneas referenciadas 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
110 lines
3.8 KiB
PHP
110 lines
3.8 KiB
PHP
<?php
|
|
/**
|
|
* The header for our theme
|
|
*
|
|
* Navbar sticky con Bootstrap 5.3.2 y animaciones según template del cliente.
|
|
* Incluye: sticky positioning, gradient animations, responsive hamburger menu.
|
|
*
|
|
* @package Apus_Theme
|
|
* @since 1.0.0
|
|
*/
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html <?php language_attributes(); ?>>
|
|
<head>
|
|
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<link rel="profile" href="https://gmpg.org/xfn/11">
|
|
<?php wp_head(); ?>
|
|
</head>
|
|
|
|
<body <?php body_class(); ?> data-bs-spy="scroll" data-bs-target=".toc-container" data-bs-offset="100">
|
|
<?php wp_body_open(); ?>
|
|
|
|
<!-- Skip to main content link para accesibilidad -->
|
|
<a class="skip-link screen-reader-text" href="#main-content">
|
|
<?php esc_html_e( 'Skip to content', 'apus-theme' ); ?>
|
|
</a>
|
|
|
|
<div id="page" class="site">
|
|
|
|
<!-- Top Notification Bar (Template líneas 253-262) -->
|
|
<?php if ( ! isset( $_COOKIE['apus_notification_dismissed'] ) ) : ?>
|
|
<div id="topNotificationBar" class="top-notification-bar">
|
|
<div class="container">
|
|
<div class="d-flex align-items-center justify-content-center">
|
|
<i class="bi bi-megaphone-fill me-2"></i>
|
|
<span class="notification-text">
|
|
<span class="text-highlight"><?php esc_html_e( 'Nuevo:', 'apus-theme' ); ?></span>
|
|
<span class="d-none d-md-inline"><?php esc_html_e( 'Accede a 200,000+ APUs actualizados para 2025', 'apus-theme' ); ?></span>
|
|
<span class="d-md-none"><?php esc_html_e( '200K+ APUs 2025', 'apus-theme' ); ?></span>
|
|
</span>
|
|
<a href="<?php echo esc_url( home_url( '/catalogo' ) ); ?>" class="ms-2 notification-link">
|
|
<?php esc_html_e( 'Ver Catálogo', 'apus-theme' ); ?>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<!-- Navbar Sticky con Bootstrap 5 - RDash Colors (Issue #41) -->
|
|
<nav class="navbar navbar-expand-lg navbar-dark py-3" role="navigation" aria-label="<?php esc_attr_e( 'Primary Navigation', 'apus-theme' ); ?>">
|
|
<div class="container">
|
|
|
|
<!-- Hamburger Toggle Button (Bootstrap 5) - PRIMERO según template línea 286 -->
|
|
<button class="navbar-toggler"
|
|
type="button"
|
|
data-bs-toggle="collapse"
|
|
data-bs-target="#navbarSupportedContent"
|
|
aria-controls="navbarSupportedContent"
|
|
aria-expanded="false"
|
|
aria-label="<?php esc_attr_e( 'Toggle navigation', 'apus-theme' ); ?>">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
|
|
<!-- Collapsible Menu -->
|
|
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
|
<?php
|
|
if ( has_nav_menu( 'primary' ) ) {
|
|
wp_nav_menu(
|
|
array(
|
|
'theme_location' => 'primary',
|
|
'container' => false,
|
|
'menu_class' => 'navbar-nav mb-2 mb-lg-0',
|
|
'fallback_cb' => false,
|
|
'depth' => 2,
|
|
'walker' => new WP_Bootstrap_Navwalker(),
|
|
)
|
|
);
|
|
} else {
|
|
// Fallback si no hay menú asignado
|
|
?>
|
|
<ul class="navbar-nav mb-2 mb-lg-0">
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="<?php echo esc_url( home_url( '/' ) ); ?>">
|
|
<?php esc_html_e( 'Home', 'apus-theme' ); ?>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="<?php echo esc_url( get_post_type_archive_link( 'post' ) ); ?>">
|
|
<?php esc_html_e( 'Blog', 'apus-theme' ); ?>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
<!-- Let's Talk Button (Template líneas 315-317) -->
|
|
<button class="btn btn-lets-talk ms-lg-3" type="button" data-bs-toggle="modal" data-bs-target="#contactModal">
|
|
<i class="bi bi-lightning-charge-fill me-2"></i><?php esc_html_e( 'Let\'s Talk', 'apus-theme' ); ?>
|
|
</button>
|
|
</div>
|
|
|
|
</div><!-- .container -->
|
|
</nav><!-- .navbar -->
|
|
|
|
<!-- Main Content Area -->
|
|
<div id="content" class="site-content">
|