Backup pre-corrección namespaces: mejoras schemas y componentes
Cambios incluidos: - Actualización de copy/textos en 7 schemas JSON - Mejoras en AdminAjaxHandler con mapeos adicionales - Refactorización de FormBuilders y Renderers - Correcciones en dashboard admin JS - Nuevo ContactFormRenderer funcional NOTA: Este commit sirve como respaldo antes de corregir inconsistencias de case en namespaces (API→Api, WordPress→Wordpress) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -75,20 +75,31 @@ final class CtaPostRenderer implements RendererInterface
|
||||
{
|
||||
$colors = $data['colors'] ?? [];
|
||||
$effects = $data['visual_effects'] ?? [];
|
||||
$spacing = $data['spacing'] ?? [];
|
||||
$visibility = $data['visibility'] ?? [];
|
||||
|
||||
$cssRules = [];
|
||||
|
||||
// Container values
|
||||
$gradientStart = $colors['gradient_start'] ?? '#FF8600';
|
||||
$gradientEnd = $colors['gradient_end'] ?? '#FFB800';
|
||||
$gradientAngle = $effects['gradient_angle'] ?? '135deg';
|
||||
$borderRadius = $effects['border_radius'] ?? '12px';
|
||||
$boxShadow = $effects['box_shadow'] ?? '0 8px 24px rgba(255, 133, 0, 0.3)';
|
||||
$containerPadding = $spacing['container_padding'] ?? '2rem';
|
||||
|
||||
// Button values
|
||||
$buttonBgColor = $colors['button_bg_color'] ?? '#FF8600';
|
||||
$buttonTextColor = $colors['button_text_color'] ?? '#ffffff';
|
||||
$buttonHoverBgColor = $colors['button_hover_bg_color'] ?? '#e67a00';
|
||||
$buttonHoverBgColor = $colors['button_hover_bg'] ?? '#e67a00';
|
||||
$buttonBorderRadius = $effects['button_border_radius'] ?? '8px';
|
||||
|
||||
// Container - gradient background
|
||||
// Container - gradient background with box-shadow and border-radius
|
||||
$cssRules[] = $this->cssGenerator->generate('.cta-post-container', [
|
||||
'background' => "linear-gradient({$gradientAngle}, {$gradientStart} 0%, {$gradientEnd} 100%)",
|
||||
'box-shadow' => $boxShadow,
|
||||
'border-radius' => $borderRadius,
|
||||
'padding' => $containerPadding,
|
||||
]);
|
||||
|
||||
// Button styles (matching template .cta-button) - Using !important to override Bootstrap btn-light
|
||||
@@ -98,8 +109,8 @@ final class CtaPostRenderer implements RendererInterface
|
||||
font-weight: 600;
|
||||
padding: 0.75rem 2rem;
|
||||
border: none !important;
|
||||
border-radius: 8px;
|
||||
transition: 0.3s;
|
||||
border-radius: {$buttonBorderRadius};
|
||||
transition: all 0.3s ease;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
}";
|
||||
@@ -149,7 +160,7 @@ final class CtaPostRenderer implements RendererInterface
|
||||
$buttonUrl = $content['button_url'] ?? '#';
|
||||
$buttonIcon = $content['button_icon'] ?? 'bi-arrow-right';
|
||||
|
||||
$html = '<div class="my-5 p-4 rounded cta-post-container">';
|
||||
$html = '<div class="my-5 cta-post-container">';
|
||||
$html .= ' <div class="row align-items-center">';
|
||||
|
||||
// Left column - Content
|
||||
@@ -169,7 +180,7 @@ final class CtaPostRenderer implements RendererInterface
|
||||
// Right column - Button
|
||||
$html .= ' <div class="col-md-4 text-md-end mt-3 mt-md-0">';
|
||||
$html .= sprintf(
|
||||
' <a href="%s" class="btn btn-light btn-lg cta-button">%s',
|
||||
' <a href="%s" class="cta-button">%s',
|
||||
esc_url($buttonUrl),
|
||||
esc_html($buttonText)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user