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:
233
Schemas/archive-header.json
Normal file
233
Schemas/archive-header.json
Normal file
@@ -0,0 +1,233 @@
|
||||
{
|
||||
"component_name": "archive-header",
|
||||
"version": "1.0.0",
|
||||
"description": "Cabecera dinamica para paginas de archivo con titulo y descripcion contextual",
|
||||
"groups": {
|
||||
"visibility": {
|
||||
"label": "Visibilidad",
|
||||
"priority": 10,
|
||||
"fields": {
|
||||
"is_enabled": {
|
||||
"type": "boolean",
|
||||
"label": "Activar componente",
|
||||
"default": true,
|
||||
"editable": true,
|
||||
"required": true
|
||||
},
|
||||
"show_on_desktop": {
|
||||
"type": "boolean",
|
||||
"label": "Mostrar en escritorio",
|
||||
"default": true,
|
||||
"editable": true,
|
||||
"description": "Muestra el componente en pantallas >= 992px"
|
||||
},
|
||||
"show_on_mobile": {
|
||||
"type": "boolean",
|
||||
"label": "Mostrar en movil",
|
||||
"default": true,
|
||||
"editable": true,
|
||||
"description": "Muestra el componente en pantallas < 992px"
|
||||
}
|
||||
}
|
||||
},
|
||||
"content": {
|
||||
"label": "Contenido",
|
||||
"priority": 20,
|
||||
"fields": {
|
||||
"blog_title": {
|
||||
"type": "text",
|
||||
"label": "Titulo del blog",
|
||||
"default": "Blog",
|
||||
"editable": true,
|
||||
"description": "Titulo mostrado en la pagina principal del blog"
|
||||
},
|
||||
"show_post_count": {
|
||||
"type": "boolean",
|
||||
"label": "Mostrar contador de posts",
|
||||
"default": true,
|
||||
"editable": true,
|
||||
"description": "Muestra el numero de posts encontrados"
|
||||
},
|
||||
"show_description": {
|
||||
"type": "boolean",
|
||||
"label": "Mostrar descripcion",
|
||||
"default": true,
|
||||
"editable": true,
|
||||
"description": "Muestra la descripcion de categoria/tag si existe"
|
||||
},
|
||||
"category_prefix": {
|
||||
"type": "text",
|
||||
"label": "Prefijo categoria",
|
||||
"default": "Categoria:",
|
||||
"editable": true
|
||||
},
|
||||
"tag_prefix": {
|
||||
"type": "text",
|
||||
"label": "Prefijo etiqueta",
|
||||
"default": "Etiqueta:",
|
||||
"editable": true
|
||||
},
|
||||
"author_prefix": {
|
||||
"type": "text",
|
||||
"label": "Prefijo autor",
|
||||
"default": "Articulos de:",
|
||||
"editable": true
|
||||
},
|
||||
"date_prefix": {
|
||||
"type": "text",
|
||||
"label": "Prefijo fecha",
|
||||
"default": "Archivo:",
|
||||
"editable": true
|
||||
},
|
||||
"search_prefix": {
|
||||
"type": "text",
|
||||
"label": "Prefijo busqueda",
|
||||
"default": "Resultados para:",
|
||||
"editable": true
|
||||
},
|
||||
"posts_count_singular": {
|
||||
"type": "text",
|
||||
"label": "Texto singular posts",
|
||||
"default": "publicacion",
|
||||
"editable": true
|
||||
},
|
||||
"posts_count_plural": {
|
||||
"type": "text",
|
||||
"label": "Texto plural posts",
|
||||
"default": "publicaciones",
|
||||
"editable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"typography": {
|
||||
"label": "Tipografia",
|
||||
"priority": 30,
|
||||
"fields": {
|
||||
"heading_level": {
|
||||
"type": "select",
|
||||
"label": "Nivel de encabezado",
|
||||
"default": "h1",
|
||||
"editable": true,
|
||||
"options": ["h1", "h2", "h3", "h4", "h5", "h6"],
|
||||
"description": "Nivel semantico del titulo para SEO"
|
||||
},
|
||||
"title_size": {
|
||||
"type": "text",
|
||||
"label": "Tamano titulo",
|
||||
"default": "2rem",
|
||||
"editable": true
|
||||
},
|
||||
"title_weight": {
|
||||
"type": "text",
|
||||
"label": "Peso titulo",
|
||||
"default": "700",
|
||||
"editable": true
|
||||
},
|
||||
"description_size": {
|
||||
"type": "text",
|
||||
"label": "Tamano descripcion",
|
||||
"default": "1rem",
|
||||
"editable": true
|
||||
},
|
||||
"count_size": {
|
||||
"type": "text",
|
||||
"label": "Tamano contador",
|
||||
"default": "0.875rem",
|
||||
"editable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"colors": {
|
||||
"label": "Colores",
|
||||
"priority": 40,
|
||||
"fields": {
|
||||
"title_color": {
|
||||
"type": "color",
|
||||
"label": "Color titulo",
|
||||
"default": "#0E2337",
|
||||
"editable": true
|
||||
},
|
||||
"description_color": {
|
||||
"type": "color",
|
||||
"label": "Color descripcion",
|
||||
"default": "#6b7280",
|
||||
"editable": true
|
||||
},
|
||||
"count_bg_color": {
|
||||
"type": "color",
|
||||
"label": "Fondo contador",
|
||||
"default": "#FF8600",
|
||||
"editable": true
|
||||
},
|
||||
"count_text_color": {
|
||||
"type": "color",
|
||||
"label": "Texto contador",
|
||||
"default": "#ffffff",
|
||||
"editable": true
|
||||
},
|
||||
"prefix_color": {
|
||||
"type": "color",
|
||||
"label": "Color prefijo",
|
||||
"default": "#6b7280",
|
||||
"editable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"spacing": {
|
||||
"label": "Espaciado",
|
||||
"priority": 50,
|
||||
"fields": {
|
||||
"margin_top": {
|
||||
"type": "text",
|
||||
"label": "Margen superior",
|
||||
"default": "2rem",
|
||||
"editable": true
|
||||
},
|
||||
"margin_bottom": {
|
||||
"type": "text",
|
||||
"label": "Margen inferior",
|
||||
"default": "2rem",
|
||||
"editable": true
|
||||
},
|
||||
"padding": {
|
||||
"type": "text",
|
||||
"label": "Padding interno",
|
||||
"default": "1.5rem",
|
||||
"editable": true
|
||||
},
|
||||
"title_margin_bottom": {
|
||||
"type": "text",
|
||||
"label": "Margen inferior titulo",
|
||||
"default": "0.5rem",
|
||||
"editable": true
|
||||
},
|
||||
"count_padding": {
|
||||
"type": "text",
|
||||
"label": "Padding contador",
|
||||
"default": "0.25rem 0.75rem",
|
||||
"editable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"behavior": {
|
||||
"label": "Comportamiento",
|
||||
"priority": 70,
|
||||
"fields": {
|
||||
"is_sticky": {
|
||||
"type": "boolean",
|
||||
"label": "Header fijo",
|
||||
"default": false,
|
||||
"editable": true,
|
||||
"description": "Mantiene el header visible al hacer scroll"
|
||||
},
|
||||
"sticky_offset": {
|
||||
"type": "text",
|
||||
"label": "Offset sticky",
|
||||
"default": "0",
|
||||
"editable": true,
|
||||
"description": "Distancia desde el top cuando es sticky"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
271
Schemas/post-grid.json
Normal file
271
Schemas/post-grid.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user