diff --git a/src/app/app.routes.spec.ts b/src/app/app.routes.spec.ts index b864ad5..88f86c5 100644 --- a/src/app/app.routes.spec.ts +++ b/src/app/app.routes.spec.ts @@ -16,7 +16,8 @@ const tenant: Tenant = { secondary_color: '#A0A0A0', danger_color: '#FF8888', success_color: '#198754', - header_footer_bg_color: '#313131', + header_bg_color: '#313131', + footer_bg_color: '#313131', header_logo: 'https://example.com/header.png', footer_logo: 'https://example.com/footer.png' }; diff --git a/src/app/app.spec.ts b/src/app/app.spec.ts index 0547b4b..5677f40 100644 --- a/src/app/app.spec.ts +++ b/src/app/app.spec.ts @@ -15,7 +15,8 @@ const tenant: Tenant = { secondary_color: '#A0A0A0', danger_color: '#FF8888', success_color: '#198754', - header_footer_bg_color: '#313131', + header_bg_color: '#313131', + footer_bg_color: '#313131', header_logo: 'https://example.com/header.png', footer_logo: 'https://example.com/footer.png' }; diff --git a/src/app/app.ts b/src/app/app.ts index 9a7ee44..cb66b6c 100644 --- a/src/app/app.ts +++ b/src/app/app.ts @@ -34,7 +34,8 @@ function hexToRgb(hex: string): string { '[style.--tenant-secondary-rgb]': 'tenantSecondaryColorRgb()', '[style.--tenant-danger-rgb]': 'tenantDangerColorRgb()', '[style.--tenant-success-rgb]': 'tenantSuccessColorRgb()', - '[style.--tenant-header-footer-bg]': 'tenantHeaderFooterBgColor()' + '[style.--tenant-header-bg]': 'tenantHeaderBgColor()', + '[style.--tenant-footer-bg]': 'tenantFooterBgColor()' } }) export class App { @@ -66,10 +67,15 @@ export class App { protected readonly tenantSuccessColorRgb = computed(() => hexToRgb(this.tenantSuccessColor()) ); - protected readonly tenantHeaderFooterBgColor = computed( + protected readonly tenantHeaderBgColor = computed( () => - this.tenantService.tenant()?.header_footer_bg_color ?? - DEFAULT_TENANT_BRANDING.headerFooterBgColor + this.tenantService.tenant()?.header_bg_color ?? + DEFAULT_TENANT_BRANDING.headerBgColor + ); + protected readonly tenantFooterBgColor = computed( + () => + this.tenantService.tenant()?.footer_bg_color ?? + DEFAULT_TENANT_BRANDING.footerBgColor ); } diff --git a/src/app/core/layout/store-layout/store-footer/store-footer.component.scss b/src/app/core/layout/store-layout/store-footer/store-footer.component.scss index a3453f3..581901f 100644 --- a/src/app/core/layout/store-layout/store-footer/store-footer.component.scss +++ b/src/app/core/layout/store-layout/store-footer/store-footer.component.scss @@ -1,5 +1,5 @@ .store-layout__footer { - background-color: var(--tenant-header-footer-bg); + background-color: var(--tenant-footer-bg); } .store-layout__brand-slot { diff --git a/src/app/core/layout/store-layout/store-header/store-header.component.scss b/src/app/core/layout/store-layout/store-header/store-header.component.scss index 29069a4..80766d0 100644 --- a/src/app/core/layout/store-layout/store-header/store-header.component.scss +++ b/src/app/core/layout/store-layout/store-header/store-header.component.scss @@ -1,6 +1,6 @@ .store-layout__header { color: #ffffff; - background-color: var(--tenant-header-footer-bg); + background-color: var(--tenant-header-bg); box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08); } @@ -58,14 +58,14 @@ .store-layout__search-button { color: #ffffff; border-color: rgba(255, 255, 255, 0.2); - background-color: color-mix(in srgb, white 10%, var(--tenant-header-footer-bg)); + background-color: color-mix(in srgb, white 10%, var(--tenant-header-bg)); } .store-layout__search-button:hover, .store-layout__search-button:focus-visible { color: #ffffff; border-color: rgba(255, 255, 255, 0.28); - background-color: color-mix(in srgb, white 16%, var(--tenant-header-footer-bg)); + background-color: color-mix(in srgb, white 16%, var(--tenant-header-bg)); } .store-layout__action-button { diff --git a/src/app/core/layout/store-layout/store-layout.component.spec.ts b/src/app/core/layout/store-layout/store-layout.component.spec.ts index c0d04a6..c1fb842 100644 --- a/src/app/core/layout/store-layout/store-layout.component.spec.ts +++ b/src/app/core/layout/store-layout/store-layout.component.spec.ts @@ -15,7 +15,8 @@ const tenant: Tenant = { secondary_color: '#A0A0A0', danger_color: '#FF8888', success_color: '#198754', - header_footer_bg_color: '#313131', + header_bg_color: '#313131', + footer_bg_color: '#313131', header_logo: 'https://example.com/header.png', footer_logo: 'https://example.com/footer.png' }; diff --git a/src/app/core/services/tenant-ssr-cache.store.ts b/src/app/core/services/tenant-ssr-cache.store.ts index fcb5688..5f7980a 100644 --- a/src/app/core/services/tenant-ssr-cache.store.ts +++ b/src/app/core/services/tenant-ssr-cache.store.ts @@ -18,7 +18,8 @@ export const DEFAULT_TENANT_BRANDING = { secondaryColor: '#9e9e9e', dangerColor: '#fd4c4c', successColor: '#198754', - headerFooterBgColor: '#313131' + headerBgColor: '#313131', + footerBgColor: '#313131' } as const; export const TENANT_SSR_STATE_KEY = makeStateKey('tenant-ssr-state'); diff --git a/src/app/core/services/tenant.interface.ts b/src/app/core/services/tenant.interface.ts index 11801d9..269b2fc 100644 --- a/src/app/core/services/tenant.interface.ts +++ b/src/app/core/services/tenant.interface.ts @@ -9,7 +9,8 @@ export interface Tenant { secondary_color: string; danger_color: string; success_color: string; - header_footer_bg_color: string; + header_bg_color: string; + footer_bg_color: string; header_logo: string; footer_logo: string; } diff --git a/src/app/core/services/tenant.service.spec.ts b/src/app/core/services/tenant.service.spec.ts index 158fafc..04e7d87 100644 --- a/src/app/core/services/tenant.service.spec.ts +++ b/src/app/core/services/tenant.service.spec.ts @@ -17,7 +17,8 @@ const tenant: Tenant = { secondary_color: '#A0A0A0', danger_color: '#FF8888', success_color: '#198754', - header_footer_bg_color: '#313131', + header_bg_color: '#313131', + footer_bg_color: '#313131', header_logo: 'https://example.com/header.png', footer_logo: 'https://example.com/footer.png' }; diff --git a/src/app/features/componentes-test/pages/reutilizables-test-page/reutilizables-test-page.component.html b/src/app/features/componentes-test/pages/reutilizables-test-page/reutilizables-test-page.component.html index f969ac4..1ea62ee 100644 --- a/src/app/features/componentes-test/pages/reutilizables-test-page/reutilizables-test-page.component.html +++ b/src/app/features/componentes-test/pages/reutilizables-test-page/reutilizables-test-page.component.html @@ -220,7 +220,7 @@
Logo del Header
- diff --git a/src/app/features/componentes-test/pages/reutilizables-test-page/reutilizables-test-page.component.scss b/src/app/features/componentes-test/pages/reutilizables-test-page/reutilizables-test-page.component.scss index 8f92a98..680a36e 100644 --- a/src/app/features/componentes-test/pages/reutilizables-test-page/reutilizables-test-page.component.scss +++ b/src/app/features/componentes-test/pages/reutilizables-test-page/reutilizables-test-page.component.scss @@ -164,8 +164,12 @@ h1 { } } - .header-footer-bg { - background-color: var(--tenant-header-footer-bg, #f8f9fa); + .header-bg { + background-color: var(--tenant-header-bg, #f8f9fa); + } + + .footer-bg { + background-color: var(--tenant-footer-bg, #f8f9fa); } .color-swatch-card { diff --git a/src/app/features/componentes-test/pages/reutilizables-test-page/reutilizables-test-page.component.spec.ts b/src/app/features/componentes-test/pages/reutilizables-test-page/reutilizables-test-page.component.spec.ts index c840336..fddfd74 100644 --- a/src/app/features/componentes-test/pages/reutilizables-test-page/reutilizables-test-page.component.spec.ts +++ b/src/app/features/componentes-test/pages/reutilizables-test-page/reutilizables-test-page.component.spec.ts @@ -14,7 +14,8 @@ const tenant: Tenant = { secondary_color: '#A0A0A0', danger_color: '#FF8888', success_color: '#198754', - header_footer_bg_color: '#313131', + header_bg_color: '#313131', + footer_bg_color: '#313131', header_logo: 'https://example.com/header.png', footer_logo: 'https://example.com/footer.png' };