+ {/* Section Header */}
+
+
{__('Sections')}
+ {isTemplate && (
+
+ {__('Template: ')} {cpt}
+
+ )}
+
+
+ {/* Sections List */}
+
+ {sections.map((section, index) => {
+ const sectionType = SECTION_TYPES.find(s => s.type === section.type);
+ const Icon = sectionType?.icon || LayoutTemplate;
+ const hasDynamic = Object.values(section.props).some(
+ p => typeof p === 'object' && p?.type === 'dynamic'
+ );
+
+ return (
+
onSelectSection(section)}
+ >
+
+
+
+
+
+
+
+
+
+ {sectionType?.label || section.type}
+
+
+ {section.layoutVariant || 'default'}
+ {hasDynamic && (
+ ◆ {__('Dynamic')}
+ )}
+
+
+
+
+
e.stopPropagation()}>
+
+
+
+
+
+
+ );
+ })}
+
+ {sections.length === 0 && (
+
+
+
{__('No sections yet. Add your first section.')}
+
+ )}
+
+
+ {/* Add Section Button */}
+
+
+
+
+
+ {SECTION_TYPES.map((sectionType) => {
+ const Icon = sectionType.icon;
+ return (
+ onAddSection(sectionType.type)}
+ >
+
+ {sectionType.label}
+
+ );
+ })}
+
+
+
+ );
+}
diff --git a/admin-spa/src/routes/Appearance/Pages/index.tsx b/admin-spa/src/routes/Appearance/Pages/index.tsx
new file mode 100644
index 0000000..f844d8b
--- /dev/null
+++ b/admin-spa/src/routes/Appearance/Pages/index.tsx
@@ -0,0 +1,253 @@
+import React, { useState, useEffect } from 'react';
+import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
+import { api } from '@/lib/api';
+import { __ } from '@/lib/i18n';
+import { Button } from '@/components/ui/button';
+import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
+import { Plus, FileText, Layout, Trash2, Eye, Settings } from 'lucide-react';
+import { toast } from 'sonner';
+import { cn } from '@/lib/utils';
+import { PageSidebar } from './components/PageSidebar';
+import { SectionEditor } from './components/SectionEditor';
+import { PageSettings } from './components/PageSettings';
+import { CreatePageModal } from './components/CreatePageModal';
+
+// Types
+interface PageItem {
+ id?: number;
+ type: 'page' | 'template';
+ cpt?: string;
+ slug?: string;
+ title: string;
+ url?: string;
+ icon?: string;
+ has_template?: boolean;
+ permalink_base?: string;
+}
+
+interface Section {
+ id: string;
+ type: string;
+ layoutVariant?: string;
+ colorScheme?: string;
+ props: Record