Corregir 4 discrepancias estructurales HTML - Issues #68, #66, #67, #69

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>
This commit is contained in:
FrankZamora
2025-11-05 18:10:14 -06:00
parent 4f8e3d026e
commit 948f56933d
4 changed files with 27 additions and 47 deletions

View File

@@ -82,7 +82,7 @@
</div><!-- #content .site-content -->
<footer id="colophon" class="site-footer" role="contentinfo">
<footer class="py-5 mt-0 bg-dark text-white" role="contentinfo">
<?php if ( is_active_sidebar( 'footer-1' ) || is_active_sidebar( 'footer-2' ) || is_active_sidebar( 'footer-3' ) || is_active_sidebar( 'footer-4' ) ) : ?>
<div class="footer-widgets">

View File

@@ -29,11 +29,11 @@
<div id="page" class="site">
<!-- Top Notification Bar (Issue #39) -->
<!-- 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-fluid">
<div class="d-flex align-items-center justify-content-center position-relative">
<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>
@@ -43,9 +43,6 @@
<a href="<?php echo esc_url( home_url( '/catalogo' ) ); ?>" class="ms-2 notification-link">
<?php esc_html_e( 'Ver Catálogo', 'apus-theme' ); ?>
</a>
<button type="button" class="btn-close-notification ms-auto" aria-label="<?php esc_attr_e( 'Cerrar notificación', 'apus-theme' ); ?>">
<i class="bi bi-x-lg"></i>
</button>
</div>
</div>
</div>
@@ -55,20 +52,7 @@
<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">
<!-- Logo / Site Title -->
<a class="navbar-brand" href="<?php echo esc_url( home_url( '/' ) ); ?>">
<?php
if ( has_custom_logo() ) {
the_custom_logo();
} else {
?>
<b><?php bloginfo( 'name' ); ?></b>
<?php
}
?>
</a>
<!-- Hamburger Toggle Button (Bootstrap 5) -->
<!-- Hamburger Toggle Button (Bootstrap 5) - PRIMERO según template línea 286 -->
<button class="navbar-toggler"
type="button"
data-bs-toggle="collapse"
@@ -87,7 +71,7 @@
array(
'theme_location' => 'primary',
'container' => false,
'menu_class' => 'navbar-nav ms-auto mb-2 mb-lg-0',
'menu_class' => 'navbar-nav mb-2 mb-lg-0',
'fallback_cb' => false,
'depth' => 2,
'walker' => new WP_Bootstrap_Navwalker(),
@@ -96,7 +80,7 @@
} else {
// Fallback si no hay menú asignado
?>
<ul class="navbar-nav ms-auto mb-2 mb-lg-0">
<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' ); ?>

View File

@@ -15,27 +15,23 @@ if ( ! is_active_sidebar( 'sidebar-1' ) ) {
}
?>
<aside id="secondary" class="widget-area sidebar" role="complementary" aria-label="<?php esc_attr_e( 'Primary Sidebar', 'apus-theme' ); ?>">
<div class="sidebar-sticky position-sticky" style="top: 5rem;">
<?php
/**
* Display sidebar widgets (TOC)
*
* Widgets can be added through Appearance > Widgets in the WordPress admin.
* The sidebar must be registered in functions.php for widgets to appear here.
*/
dynamic_sidebar( 'sidebar-1' );
?>
<div class="sidebar-inner">
<?php
/**
* Display sidebar widgets
*
* Widgets can be added through Appearance > Widgets in the WordPress admin.
* The sidebar must be registered in functions.php for widgets to appear here.
*/
dynamic_sidebar( 'sidebar-1' );
?>
<?php
/**
* CTA Box Sidebar (Issue #36)
*
* Display CTA box below TOC on single posts
*/
get_template_part( 'template-parts/cta-box', 'sidebar' );
?>
</div><!-- .sidebar-inner -->
</aside><!-- #secondary -->
<?php
/**
* CTA Box Sidebar (Issue #36)
*
* Display CTA box below TOC on single posts
*/
get_template_part( 'template-parts/cta-box', 'sidebar' );
?>
</div><!-- .sidebar-sticky -->

View File

@@ -242,7 +242,7 @@ get_template_part('template-parts/content', 'hero');
if ( is_active_sidebar( 'sidebar-1' ) ) :
?>
<div class="col-lg-3">
<?php get_template_part( 'template-parts/sidebar' ); ?>
<?php get_sidebar(); ?>
</div><!-- .col-lg-3 -->
<?php
endif;