feat(templates): add archive-header and post-grid components

- Add ArchiveHeader component (schema, renderer, formbuilder)
- Add PostGrid component (schema, renderer, formbuilder)
- Unify archive templates (home, archive, category, tag,
  author, date, search)
- Add page visibility system with VisibilityDefaults
- Register components in AdminDashboardRenderer
- Fix boolean conversion in functions-addon.php
- All 172 unit tests passed

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
FrankZamora
2025-12-06 20:36:27 -06:00
parent b79569c5e7
commit c23dc22d76
24 changed files with 3224 additions and 852 deletions

271
Schemas/post-grid.json Normal file
View File

@@ -0,0 +1,271 @@
{
"component_name": "post-grid",
"version": "1.0.0",
"description": "Grid de posts para templates de listados usando el loop principal de WordPress",
"groups": {
"visibility": {
"label": "Visibilidad",
"priority": 10,
"fields": {
"is_enabled": {
"type": "boolean",
"default": true,
"label": "Habilitar componente"
},
"show_on_desktop": {
"type": "boolean",
"default": true,
"label": "Mostrar en desktop"
},
"show_on_mobile": {
"type": "boolean",
"default": true,
"label": "Mostrar en movil"
}
}
},
"content": {
"label": "Contenido",
"priority": 20,
"fields": {
"show_thumbnail": {
"type": "boolean",
"default": true,
"label": "Mostrar imagen destacada"
},
"show_excerpt": {
"type": "boolean",
"default": true,
"label": "Mostrar extracto"
},
"show_meta": {
"type": "boolean",
"default": true,
"label": "Mostrar metadatos (fecha, autor)"
},
"show_categories": {
"type": "boolean",
"default": true,
"label": "Mostrar categorias"
},
"excerpt_length": {
"type": "select",
"default": "20",
"label": "Longitud del extracto (palabras)",
"options": ["10", "15", "20", "25", "30"]
},
"read_more_text": {
"type": "text",
"default": "Leer mas",
"label": "Texto de leer mas"
},
"no_posts_message": {
"type": "text",
"default": "No se encontraron publicaciones",
"label": "Mensaje cuando no hay posts"
}
}
},
"typography": {
"label": "Tipografia",
"priority": 30,
"fields": {
"heading_level": {
"type": "select",
"default": "h3",
"label": "Nivel de encabezado de tarjetas",
"options": ["h2", "h3", "h4", "h5", "h6"]
},
"card_title_size": {
"type": "text",
"default": "1.1rem",
"label": "Tamano titulo de tarjeta"
},
"card_title_weight": {
"type": "text",
"default": "600",
"label": "Peso titulo de tarjeta"
},
"excerpt_size": {
"type": "text",
"default": "0.9rem",
"label": "Tamano de extracto"
},
"meta_size": {
"type": "text",
"default": "0.8rem",
"label": "Tamano de metadatos"
}
}
},
"colors": {
"label": "Colores",
"priority": 40,
"fields": {
"card_bg_color": {
"type": "color",
"default": "#ffffff",
"label": "Fondo de tarjeta"
},
"card_title_color": {
"type": "color",
"default": "#0E2337",
"label": "Color titulo de tarjeta"
},
"card_hover_bg_color": {
"type": "color",
"default": "#f9fafb",
"label": "Fondo hover de tarjeta"
},
"card_border_color": {
"type": "color",
"default": "#e5e7eb",
"label": "Color borde de tarjeta"
},
"card_hover_border_color": {
"type": "color",
"default": "#FF8600",
"label": "Color borde hover"
},
"excerpt_color": {
"type": "color",
"default": "#6b7280",
"label": "Color de extracto"
},
"meta_color": {
"type": "color",
"default": "#9ca3af",
"label": "Color de metadatos"
},
"category_bg_color": {
"type": "color",
"default": "#FFF5EB",
"label": "Fondo de categoria"
},
"category_text_color": {
"type": "color",
"default": "#FF8600",
"label": "Color texto categoria"
},
"pagination_color": {
"type": "color",
"default": "#0E2337",
"label": "Color de paginacion"
},
"pagination_active_bg": {
"type": "color",
"default": "#FF8600",
"label": "Fondo paginacion activa"
},
"pagination_active_color": {
"type": "color",
"default": "#ffffff",
"label": "Color texto paginacion activa"
}
}
},
"spacing": {
"label": "Espaciado",
"priority": 50,
"fields": {
"grid_gap": {
"type": "text",
"default": "1.5rem",
"label": "Espacio entre tarjetas"
},
"card_padding": {
"type": "text",
"default": "1.25rem",
"label": "Padding interno de tarjeta"
},
"section_margin_top": {
"type": "text",
"default": "0",
"label": "Margen superior de seccion"
},
"section_margin_bottom": {
"type": "text",
"default": "2rem",
"label": "Margen inferior de seccion"
}
}
},
"visual_effects": {
"label": "Efectos Visuales",
"priority": 60,
"fields": {
"card_border_radius": {
"type": "text",
"default": "0.5rem",
"label": "Radio de borde de tarjeta"
},
"card_shadow": {
"type": "text",
"default": "0 1px 3px rgba(0,0,0,0.1)",
"label": "Sombra de tarjeta"
},
"card_hover_shadow": {
"type": "text",
"default": "0 4px 12px rgba(0,0,0,0.15)",
"label": "Sombra hover de tarjeta"
},
"card_transition": {
"type": "text",
"default": "all 0.3s ease",
"label": "Transicion de tarjeta"
},
"image_border_radius": {
"type": "text",
"default": "0.375rem",
"label": "Radio de borde de imagen"
}
}
},
"layout": {
"label": "Disposicion",
"priority": 80,
"fields": {
"columns_desktop": {
"type": "select",
"default": "3",
"label": "Columnas en desktop",
"options": ["2", "3", "4"]
},
"columns_tablet": {
"type": "select",
"default": "2",
"label": "Columnas en tablet",
"options": ["1", "2", "3"]
},
"columns_mobile": {
"type": "select",
"default": "1",
"label": "Columnas en movil",
"options": ["1", "2"]
},
"image_position": {
"type": "select",
"default": "top",
"label": "Posicion de imagen",
"options": ["top", "left", "none"]
}
}
},
"media": {
"label": "Medios",
"priority": 90,
"fields": {
"fallback_image": {
"type": "url",
"default": "",
"label": "Imagen por defecto (URL)"
},
"fallback_image_alt": {
"type": "text",
"default": "Imagen por defecto",
"label": "Texto alternativo imagen por defecto"
}
}
}
}
}