diff --git a/Admin/Infrastructure/Ui/AdminDashboardRenderer.php b/Admin/Infrastructure/Ui/AdminDashboardRenderer.php index 600b9a32..27fddea7 100644 --- a/Admin/Infrastructure/Ui/AdminDashboardRenderer.php +++ b/Admin/Infrastructure/Ui/AdminDashboardRenderer.php @@ -106,6 +106,11 @@ final class AdminDashboardRenderer implements DashboardRendererInterface 'label' => 'Footer', 'icon' => 'bi-layout-text-window-reverse', ], + 'theme-settings' => [ + 'id' => 'theme-settings', + 'label' => 'Theme Settings', + 'icon' => 'bi-gear', + ], ]; } diff --git a/Admin/Infrastructure/Ui/Assets/Css/admin-dashboard.css b/Admin/Infrastructure/Ui/Assets/Css/admin-dashboard.css index 22a3d474..1a71e6bc 100644 --- a/Admin/Infrastructure/Ui/Assets/Css/admin-dashboard.css +++ b/Admin/Infrastructure/Ui/Assets/Css/admin-dashboard.css @@ -75,7 +75,7 @@ color: #6c757d; border: none; border-bottom: 3px solid transparent; - padding: 0.3rem 0.4rem; + padding: 0.3rem 0.3rem; font-weight: 600; font-size: 0.9rem; transition: all 0.3s ease; diff --git a/Admin/Shared/Infrastructure/FieldMapping/FieldMapperProvider.php b/Admin/Shared/Infrastructure/FieldMapping/FieldMapperProvider.php index fc6af168..d32c3e90 100644 --- a/Admin/Shared/Infrastructure/FieldMapping/FieldMapperProvider.php +++ b/Admin/Shared/Infrastructure/FieldMapping/FieldMapperProvider.php @@ -31,6 +31,7 @@ final class FieldMapperProvider 'RelatedPost', 'ContactForm', 'Footer', + 'ThemeSettings', ]; public function __construct( diff --git a/Admin/ThemeSettings/Infrastructure/FieldMapping/ThemeSettingsFieldMapper.php b/Admin/ThemeSettings/Infrastructure/FieldMapping/ThemeSettingsFieldMapper.php new file mode 100644 index 00000000..64a2fc5a --- /dev/null +++ b/Admin/ThemeSettings/Infrastructure/FieldMapping/ThemeSettingsFieldMapper.php @@ -0,0 +1,37 @@ + ['group' => 'analytics', 'attribute' => 'ga_tracking_id'], + 'themeSettingsGaAnonymizeIp' => ['group' => 'analytics', 'attribute' => 'ga_anonymize_ip'], + + // Custom Code + 'themeSettingsCustomCss' => ['group' => 'custom_code', 'attribute' => 'custom_css'], + 'themeSettingsCustomJsHeader' => ['group' => 'custom_code', 'attribute' => 'custom_js_header'], + 'themeSettingsCustomJsFooter' => ['group' => 'custom_code', 'attribute' => 'custom_js_footer'], + ]; + } +} diff --git a/Admin/ThemeSettings/Infrastructure/Ui/ThemeSettingsFormBuilder.php b/Admin/ThemeSettings/Infrastructure/Ui/ThemeSettingsFormBuilder.php new file mode 100644 index 00000000..aff3f5ef --- /dev/null +++ b/Admin/ThemeSettings/Infrastructure/Ui/ThemeSettingsFormBuilder.php @@ -0,0 +1,190 @@ +buildHeader($componentId); + + $html .= '