COMPLETADO: Fase 1 de la migración a Clean Architecture + POO ## Estructura de Carpetas - ✓ Estructura completa de 4 capas (Domain, Application, Infrastructure, Presentation) - ✓ Carpetas de Use Cases (SaveComponent, GetComponent, DeleteComponent, SyncSchema) - ✓ Estructura de tests (Unit, Integration, E2E) - ✓ Carpetas de schemas y templates ## Composer y Autoloading - ✓ PSR-4 autoloading configurado para ROITheme namespace - ✓ Autoloader optimizado regenerado ## DI Container - ✓ DIContainer implementado con patrón Singleton - ✓ Métodos set(), get(), has() para gestión de servicios - ✓ Getters específicos para ComponentRepository, ValidationService, CacheService - ✓ Placeholders que serán implementados en Fase 5 - ✓ Prevención de clonación y deserialización ## Interfaces - ✓ ComponentRepositoryInterface (Domain) - ✓ ValidationServiceInterface (Application) - ✓ CacheServiceInterface (Application) - ✓ Component entity placeholder (Domain) ## Bootstrap - ✓ functions.php actualizado con carga de Composer autoloader - ✓ Inicialización del DIContainer - ✓ Helper function roi_container() disponible globalmente ## Tests - ✓ 10 tests unitarios para DIContainer (100% cobertura) - ✓ Total: 13 tests unitarios, 28 assertions - ✓ Suite de tests pasando correctamente ## Validación - ✓ Script de validación automatizado (48/48 checks pasados) - ✓ 100% de validaciones exitosas La arquitectura base está lista para la Fase 2. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
78 lines
2.4 KiB
PHP
78 lines
2.4 KiB
PHP
<?php
|
|
/**
|
|
* Header Template
|
|
*
|
|
* Replica EXACTAMENTE la estructura del template RDash (líneas 54-133)
|
|
* Sin wrappers extra.
|
|
*
|
|
* @package ROI_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(); ?>
|
|
|
|
<?php get_template_part('template-parts/top-notification-bar'); ?>
|
|
|
|
<!-- 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', 'roi-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', 'roi-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', 'roi-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', 'roi-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', 'roi-theme'); ?>
|
|
</button>
|
|
</div>
|
|
|
|
</div><!-- .container -->
|
|
</nav><!-- .navbar -->
|