[COMPONENTE 12] Implementar CTA Box Sidebar - Issue #123
NUEVO ARCHIVO:
- template-parts/content-cta-box.php (24 líneas)
* Caja CTA naranja con título, texto y botón
* Abre modal de contacto con data-bs-toggle
* Solo se muestra en posts individuales
ARCHIVOS MODIFICADOS:
- single.php (línea 202)
* Integrado CTA Box en sidebar después del TOC
* Usa get_template_part('template-parts/content', 'cta-box')
- assets/css/style.css (+46 líneas, 1009-1052)
* Comentario separador: /* === CTA BOX SIDEBAR === */
* 5 selectores CSS principales:
- .cta-box-sidebar (fondo naranja, height 250px, flexbox)
- .cta-box-title (blanco, bold, 1.25rem)
- .cta-box-text (blanco 95% opacidad, 0.9rem)
- .btn-cta-box (fondo blanco, texto naranja)
- .btn-cta-box:hover (fondo navy, texto blanco)
CARACTERÍSTICAS:
✅ Altura fija de 250px (crítica para cálculo TOC max-height)
✅ Contenido centrado verticalmente con flexbox
✅ Box shadow naranja para efecto "glow"
✅ Inversión de colores en hover (blanco→navy)
✅ Integración con Bootstrap modal nativo
🔗 Closes #123
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1005,3 +1005,48 @@ img {
|
||||
.toc-list::-webkit-scrollbar-thumb:hover {
|
||||
background: var(--color-neutral-700);
|
||||
}
|
||||
|
||||
/* === CTA BOX SIDEBAR === */
|
||||
|
||||
.cta-box-sidebar {
|
||||
background: var(--color-orange-primary);
|
||||
border-radius: 8px;
|
||||
padding: 24px;
|
||||
text-align: center;
|
||||
margin-top: 0;
|
||||
margin-bottom: 15px;
|
||||
height: 250px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
box-shadow: 0 4px 12px rgba(255, 133, 0, 0.2);
|
||||
}
|
||||
|
||||
.cta-box-title {
|
||||
color: #ffffff;
|
||||
font-weight: 700;
|
||||
font-size: 1.25rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.cta-box-text {
|
||||
color: rgba(255, 255, 255, 0.95);
|
||||
font-size: 0.9rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.btn-cta-box {
|
||||
background-color: #ffffff;
|
||||
color: var(--color-orange-primary);
|
||||
font-weight: 700;
|
||||
border: none;
|
||||
padding: 0.75rem 1.5rem;
|
||||
border-radius: 8px;
|
||||
transition: all 0.3s ease;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.btn-cta-box:hover {
|
||||
background-color: var(--color-navy-primary);
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
@@ -198,7 +198,8 @@ get_header();
|
||||
<div class="sidebar-sticky">
|
||||
<?php get_template_part('template-parts/content', 'toc'); ?>
|
||||
|
||||
<!-- Aquí irá el CTA Box (componente 12) -->
|
||||
<!-- CTA Box -->
|
||||
<?php get_template_part('template-parts/content', 'cta-box'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Template Part: CTA Box Sidebar
|
||||
*
|
||||
* Caja de llamada a la acción naranja en el sidebar
|
||||
* Abre el modal de contacto al hacer clic
|
||||
*
|
||||
* @package APUs_Theme
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
// Solo mostrar CTA Box si estamos en single post
|
||||
if (!is_single()) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- CTA Box Sidebar -->
|
||||
<div class="cta-box-sidebar">
|
||||
<h5 class="cta-box-title">¿Listo para potenciar tus proyectos?</h5>
|
||||
<p class="cta-box-text">Accede a nuestra biblioteca completa de APUs y herramientas profesionales.</p>
|
||||
<button class="btn btn-cta-box w-100" data-bs-toggle="modal" data-bs-target="#contactModal">
|
||||
Solicitar Información
|
||||
</button>
|
||||
</div>
|
||||
Reference in New Issue
Block a user