Migración completa a Clean Architecture con componentes funcionales
- Reorganización de estructura: Admin/, Public/, Shared/, Schemas/ - 12 componentes migrados: TopNotificationBar, Navbar, CtaLetsTalk, Hero, FeaturedImage, TableOfContents, CtaBoxSidebar, SocialShare, CtaPost, RelatedPost, ContactForm, Footer - Panel de administración con tabs Bootstrap 5 funcionales - Schemas JSON para configuración de componentes - Renderers dinámicos con CSSGeneratorService (cero CSS hardcodeado) - FormBuilders para UI admin con Design System consistente - Fix: Bootstrap JS cargado en header para tabs funcionales - Fix: buildTextInput maneja valores mixed (bool/string) - Eliminación de estructura legacy (src/, admin/, assets/css/componente-*) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
73
header.php
73
header.php
@@ -20,13 +20,44 @@
|
||||
<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'); ?>
|
||||
<?php
|
||||
if (function_exists('roi_render_component')) {
|
||||
echo roi_render_component('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 -->
|
||||
<?php
|
||||
// Brand/Logo - Leer configuración desde BD
|
||||
$show_brand = roi_get_navbar_setting('media', 'show_brand', false);
|
||||
if ($show_brand) :
|
||||
$use_logo = roi_get_navbar_setting('media', 'use_logo', false);
|
||||
$brand_text = roi_get_navbar_setting('media', 'brand_text', get_bloginfo('name'));
|
||||
$home_url = home_url('/');
|
||||
|
||||
if ($use_logo) :
|
||||
$logo_url = roi_get_navbar_setting('media', 'logo_url', '');
|
||||
if (!empty($logo_url)) :
|
||||
?>
|
||||
<a class="navbar-brand" href="<?php echo esc_url($home_url); ?>">
|
||||
<img src="<?php echo esc_url($logo_url); ?>" alt="<?php echo esc_attr($brand_text); ?>" class="roi-navbar-logo">
|
||||
</a>
|
||||
<?php
|
||||
endif;
|
||||
else :
|
||||
?>
|
||||
<a class="navbar-brand roi-navbar-brand" href="<?php echo esc_url($home_url); ?>">
|
||||
<?php echo esc_html($brand_text); ?>
|
||||
</a>
|
||||
<?php
|
||||
endif;
|
||||
endif;
|
||||
?>
|
||||
|
||||
<!-- Hamburger Toggle Button -->
|
||||
<button class="navbar-toggler"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
@@ -40,38 +71,18 @@
|
||||
<!-- 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
|
||||
// Navbar Component - Menu de navegación
|
||||
if (function_exists('roi_render_component')) {
|
||||
echo roi_render_component('navbar');
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- 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>
|
||||
<?php
|
||||
// CTA "Let's Talk" Button Component
|
||||
if (function_exists('roi_render_component')) {
|
||||
echo roi_render_component('cta-lets-talk');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div><!-- .container -->
|
||||
|
||||
Reference in New Issue
Block a user