Files
roi-theme/template-parts/content-hero.php
FrankZamora de5fff4f5c Fase 1: Estructura Base y DI Container - Clean Architecture
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>
2025-11-17 13:48:24 -06:00

62 lines
1.9 KiB
PHP

<?php
/**
* Hero Section Template
*
* Hero section con degradado azul para single posts
*
* @package ROI_Theme
*/
if (!is_single()) {
return;
}
?>
<section class="hero-section">
<div class="container-fluid py-5">
<div class="hero-content text-center">
<!-- Category Badges (ARRIBA del H1) -->
<?php
$categories = get_the_category();
if (!empty($categories)) :
?>
<div class="hero-categories mb-3">
<?php foreach ($categories as $category) : ?>
<?php if ($category->name !== 'Uncategorized' && $category->name !== 'Sin categoría') : ?>
<span class="hero-category-badge"><?php echo esc_html($category->name); ?></span>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
<!-- H1 Title -->
<h1 class="hero-title"><?php the_title(); ?></h1>
<!-- Post Meta -->
<div class="hero-meta">
<span class="hero-meta-item">
<i class="bi bi-calendar3 me-1"></i>
<?php echo get_the_date(); ?>
</span>
<span class="hero-meta-separator">|</span>
<span class="hero-meta-item">
<i class="bi bi-person me-1"></i>
<?php the_author(); ?>
</span>
<?php
$reading_time = roi_get_reading_time();
if ($reading_time) :
?>
<span class="hero-meta-separator">|</span>
<span class="hero-meta-item">
<i class="bi bi-clock me-1"></i>
<?php echo esc_html($reading_time); ?>
</span>
<?php endif; ?>
</div>
</div>
</div>
</section>