Files
roi-theme/wp-content/themes/apus-theme/header.php
FrankZamora 3d3a52fe78 [FASE 2] Implementar ESTRUCTURA - Issues #82, #83, #84
Reescritura COMPLETA de header.php, footer.php y single.php para replicar EXACTAMENTE la estructura del template RDash (líneas 54-1155).

**Issue #82 - header.php (líneas 54-133):**
-  Eliminados wrappers extra: <div id="page">, <div id="content">
-  Top Notification Bar: container (NO container-fluid), sin cookie check
-  Navbar: toggler PRIMERO, collapse con menú + botón Let's Talk
-  Estructura HTML limpia sin wrappers innecesarios

**Issue #83 - footer.php (líneas 1022-1155):**
-  Footer Contact Form: col-lg-5 (info) + col-lg-7 (form) correcto
-  Footer Principal: footer.py-5.mt-0.bg-dark.text-white
-  Widget areas: 3 cols pequeñas + 1 newsletter con offset
-  Social icons agregados: Twitter, Instagram, Facebook
-  Eliminado footer menu (no está en template)

**Issue #84 - single.php (líneas 135-1020) - CRÍTICO:**
-  Hero Section: container-fluid.py-5.mb-4.hero-title con category badges + H1
-  Grid layout: container > row > col-lg-9 + col-lg-3
-  Orden correcto en col-lg-9:
  1. Featured Image
  2. Post Content
  3. Share Buttons (6 redes)
  4. CTA A/B Testing (variante A y B)
  5. Related Posts (12 cards simples #f8f9fa)
  6. Paginación
-  Eliminados wrappers WordPress: <article>, <header>, <footer>, <main>, <div id="primary">
-  Eliminado post meta, tags, comments, post navigation

**Problemas CRÍTICOS resueltos:**
-  Sidebar en medio →  Sidebar al LADO (col-lg-3)
-  Related posts vibrantes →  Cards simples #f8f9fa
-  Hero section ausente →  Hero con gradiente navy
-  Wrappers extra →  Estructura limpia
-  Elements faltantes →  Todos los componentes presentes

**Validación:**
-  Sintaxis PHP: 0 errores en 3 archivos
-  Estructura HTML: Replica exactamente template RDash
-  Grid layout: Bootstrap 5.3.2 correcto
-  Orden de componentes: Idéntico al template

**Estadísticas:**
- 3 archivos reescritos completamente
- single.php: -258 líneas antiguas, +207 líneas nuevas
- header.php: -110 líneas antiguas, +94 líneas nuevas
- footer.php: -190 líneas antiguas, +151 líneas nuevas
- Total: Código más limpio y fiel al template

Closes #82, #83, #84
Relacionado con: #81 (FASE 2 principal), #57 (Discrepancias visuales)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 22:13:30 -06:00

94 lines
3.1 KiB
PHP

<?php
/**
* Header Template
*
* Replica EXACTAMENTE la estructura del template RDash (líneas 54-133)
* Sin wrappers extra.
*
* @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">
<?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(); ?>
<!-- Top Notification Bar (Template líneas 255-262) -->
<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>
<!-- Navbar (Template líneas 264-320) -->
<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 - 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 -->