diff --git a/src/app/core/config/footer-resolver.service.ts b/src/app/core/config/footer-resolver.service.ts
index 878aebb..a7998b1 100644
--- a/src/app/core/config/footer-resolver.service.ts
+++ b/src/app/core/config/footer-resolver.service.ts
@@ -3,6 +3,7 @@ import { map, Observable } from 'rxjs';
import { ConfigService } from './config.service';
import {
BootstrapConfig,
+ FooterColumnConfig,
FooterConfig,
FooterNavigationGroupConfig,
FooterNavigationItemConfig,
@@ -63,6 +64,20 @@ export class FooterResolverService {
private resolveFooterGroups(bootstrap: BootstrapConfig): FooterResolvedGroup[] {
const footer = bootstrap.navigation?.footer ?? [];
const lang = this.languageService.currentLanguage();
+
+ // Footer Builder columns (admin/edit/footer) take priority over both the
+ // legacy grouped-navigation config and the auto-grouped-by-static-page
+ // fallback below - once a merchant builds columns, that's their footer.
+ if (bootstrap.footer?.columns?.length) {
+ const groups = this.resolveGroupsFromColumns(bootstrap.footer.columns, bootstrap, lang)
+ .filter(group => group.items.length > 0);
+ const social = this.resolveSocialGroup(bootstrap.footer);
+ if (social) {
+ groups.push(social);
+ }
+ return groups;
+ }
+
const contentPages = this.resolveBootstrapStaticPages(bootstrap, lang);
if (this.isGroupedFooter(footer)) {
@@ -118,13 +133,9 @@ export class FooterResolverService {
groups.get(groupId)!.items.push({ id: resolved.id, label: resolved.title, route: resolved.route });
}
- const socialLinks = bootstrap.footer?.socialLinks ?? [];
- if (socialLinks.length > 0) {
- groups.set('footer-group-social', {
- id: 'footer-group-social',
- title: 'Social',
- items: socialLinks.map(link => ({ id: link.id, label: link.label, route: link.url, external: true }))
- });
+ const social = this.resolveSocialGroup(bootstrap.footer);
+ if (social) {
+ groups.set(social.id, social);
}
return [...groups.values()].map(group => ({
@@ -133,6 +144,41 @@ export class FooterResolverService {
}));
}
+ private resolveSocialGroup(footerConfig: FooterConfig | undefined): FooterResolvedGroup | null {
+ const socialLinks = footerConfig?.socialLinks ?? [];
+ if (socialLinks.length === 0) {
+ return null;
+ }
+ return {
+ id: 'footer-group-social',
+ title: 'Social',
+ items: socialLinks.map(link => ({ id: link.id, label: link.label, route: link.url, external: true }))
+ };
+ }
+
+ /** Footer Builder columns -> resolved groups. Page-linked entries resolve through StaticPageResolverService (so a page's route stays correct even if it changes); custom URLs pass through as external links. */
+ private resolveGroupsFromColumns(columns: FooterColumnConfig[], bootstrap: BootstrapConfig, lang: string): FooterResolvedGroup[] {
+ return columns.map((column, index) => ({
+ id: column.id || `footer-group-${index}`,
+ title: column.title,
+ items: column.links
+ .map((link): FooterResolvedItem | null => {
+ if (link.pageKey) {
+ const staticPage = this.staticPageResolver.resolveByKeyFromBootstrap(bootstrap, link.pageKey, lang);
+ if (!staticPage) {
+ return null;
+ }
+ return { id: link.id, label: link.label || staticPage.title, route: staticPage.route };
+ }
+ if (!link.url) {
+ return null;
+ }
+ return { id: link.id, label: link.label || link.url, route: link.url, external: true };
+ })
+ .filter((item): item is FooterResolvedItem => item !== null),
+ }));
+ }
+
private resolveGroupFromConfig(
group: FooterNavigationGroupConfig,
bootstrap: BootstrapConfig,
diff --git a/src/app/features/project-editor/sections/footer-section.component.html b/src/app/features/project-editor/sections/footer-section.component.html
index 658125e..6bee0cd 100644
--- a/src/app/features/project-editor/sections/footer-section.component.html
+++ b/src/app/features/project-editor/sections/footer-section.component.html
@@ -5,6 +5,28 @@
+
+
+
+ @for (phone of additionalPhones(); track $index) {
+
+ }
+
{{ 'builder.addPhone' | translate }}
+
+
+
+
+ @for (email of additionalEmails(); track $index) {
+
+ }
+
{{ 'builder.addEmail' | translate }}
+
@@ -60,7 +82,51 @@
-
+
+
+
+
+
+
{{ 'builder.addColumn' | translate }}
+
}
diff --git a/src/app/features/project-editor/sections/footer-section.component.scss b/src/app/features/project-editor/sections/footer-section.component.scss
new file mode 100644
index 0000000..e99096e
--- /dev/null
+++ b/src/app/features/project-editor/sections/footer-section.component.scss
@@ -0,0 +1,96 @@
+.contact-row {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ margin-bottom: 6px;
+
+ app-input { flex: 1; }
+}
+
+.contact-row__remove {
+ border: none;
+ background: transparent;
+ cursor: pointer;
+ color: var(--text-secondary, #6b7280);
+ font-size: 1rem;
+
+ &:hover { color: var(--danger-color, #c0392b); }
+}
+
+.footer-columns {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 12px;
+ margin: 8px 0;
+}
+
+.footer-column {
+ display: grid;
+ gap: 8px;
+ width: 260px;
+ padding: 10px;
+ border: 1px solid var(--border-color, #d3dad9);
+ border-radius: var(--radius-sm);
+ background: var(--bg-secondary, #f7f8f8);
+
+ &.cdk-drag-preview { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
+ &.cdk-drag-placeholder { opacity: 0.4; }
+}
+
+.footer-column__head {
+ display: flex;
+ align-items: center;
+ gap: 6px;
+
+ app-input { flex: 1; }
+}
+
+.footer-column__grip { cursor: grab; color: var(--text-secondary, #6b7280); }
+
+.footer-column__remove {
+ border: none;
+ background: transparent;
+ cursor: pointer;
+ color: var(--text-secondary, #6b7280);
+ font-size: 1rem;
+
+ &:hover { color: var(--danger-color, #c0392b); }
+}
+
+.footer-column__links {
+ display: grid;
+ gap: 6px;
+ min-height: 20px;
+}
+
+.footer-link {
+ display: grid;
+ grid-template-columns: auto 1fr auto;
+ grid-template-areas:
+ "grip label remove"
+ "source source source"
+ "target target target";
+ gap: 4px 6px;
+ align-items: center;
+ padding: 6px;
+ border: 1px solid var(--border-color, #d3dad9);
+ border-radius: var(--radius-sm);
+ background: #fff;
+
+ &.cdk-drag-preview { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
+ &.cdk-drag-placeholder { opacity: 0.4; }
+}
+
+.footer-link__grip { grid-area: grip; cursor: grab; color: var(--text-secondary, #6b7280); }
+.footer-link app-input:first-of-type { grid-area: label; }
+.footer-link__remove {
+ grid-area: remove;
+ border: none;
+ background: transparent;
+ cursor: pointer;
+ color: var(--text-secondary, #6b7280);
+}
+.footer-link__source { grid-area: source; }
+.footer-link app-input[type="url"], .footer-link select:not(.footer-link__source) { grid-area: target; }
+
+.cdk-drag-animating { transition: transform 200ms cubic-bezier(0, 0, 0.2, 1); }
diff --git a/src/app/features/project-editor/sections/footer-section.component.ts b/src/app/features/project-editor/sections/footer-section.component.ts
index de18716..36036de 100644
--- a/src/app/features/project-editor/sections/footer-section.component.ts
+++ b/src/app/features/project-editor/sections/footer-section.component.ts
@@ -1,51 +1,62 @@
import { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';
import { FormsModule } from '@angular/forms';
+import { CdkDragDrop, DragDropModule, moveItemInArray } from '@angular/cdk/drag-drop';
import { ProjectEditorFacade } from '../facade/project-editor.facade';
import { TranslatePipe } from '../../../i18n/translate.pipe';
import { TranslateService } from '../../../i18n/translate.service';
import { InputComponent } from '../../../shared/ui/input/input.component';
+import { ButtonComponent } from '../../../shared/ui/button/button.component';
import { FormFieldComponent } from '../../../shared/ui/form-field/form-field.component';
import { SectionCardComponent } from '../../../shared/ui/section-card/section-card.component';
import { KeyValueEditorComponent } from '../../../shared/ui/key-value-editor/key-value-editor.component';
import { ImageFieldComponent } from '../../../shared/ui/image-field/image-field.component';
-import { FooterPaymentIconConfig, FooterSocialLinkConfig } from '../../../shared/models/config';
+import { FooterColumnConfig, FooterLinkConfig, FooterPaymentIconConfig, FooterSocialLinkConfig } from '../../../shared/models/config';
import { isValidHttpUrl } from '../schema/validators/primitives';
+import { ContentPageService } from '../../content-management/services/content-page.service';
@Component({
selector: 'app-project-editor-footer-section',
standalone: true,
imports: [
FormsModule,
+ DragDropModule,
TranslatePipe,
InputComponent,
+ ButtonComponent,
FormFieldComponent,
SectionCardComponent,
KeyValueEditorComponent,
ImageFieldComponent
],
templateUrl: './footer-section.component.html',
- styleUrls: ['./section.shared.scss'],
+ styleUrls: ['./section.shared.scss', './footer-section.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class ProjectEditorFooterSectionComponent {
private readonly facade = inject(ProjectEditorFacade);
private readonly translate = inject(TranslateService);
+ private readonly contentPageService = inject(ContentPageService);
+
readonly bootstrap = this.facade.bootstrap;
readonly fieldError = (key: string): string | null => {
const messageKey = this.facade.fieldError(key);
return messageKey ? this.translate.t(messageKey) : null;
};
- readonly staticPagesValue = computed(() => (this.bootstrap()?.footer?.staticPageKeys ?? this.bootstrap()?.footer?.legalPageKeys ?? []).join(', '));
+ /** Existing static pages, offered as the primary way to link a footer column - stays correct if a page's route changes later. */
+ readonly availablePages = computed(() => this.contentPageService.normalizePages(this.bootstrap()?.staticPages));
+
readonly copyrightValue = computed(() => {
const value = this.bootstrap()?.footer?.copyrightText;
return typeof value === 'string' ? value : '';
});
readonly paymentIconRows = computed(() => this.bootstrap()?.footer?.paymentIcons ?? []);
readonly socialLinkRows = computed(() => this.bootstrap()?.footer?.socialLinks ?? []);
+ readonly columns = computed(() => this.bootstrap()?.footer?.columns ?? []);
+ readonly additionalPhones = computed(() => this.bootstrap()?.company.contacts.additionalPhones ?? []);
+ readonly additionalEmails = computed(() => this.bootstrap()?.company.contacts.additionalEmails ?? []);
readonly createPaymentIconRow = (): FooterPaymentIconConfig => ({ src: '', alt: '' });
-
readonly createSocialLinkRow = (): FooterSocialLinkConfig => ({ id: `social-${Date.now()}`, label: '', url: '' });
updateCompanyName(value: string): void { this.facade.updateBootstrap(current => ({ ...current, company: { ...current.company, companyName: value } })); }
@@ -53,10 +64,6 @@ export class ProjectEditorFooterSectionComponent {
updatePhone(value: string): void { this.facade.updateBootstrap(current => ({ ...current, company: { ...current.company, contacts: { ...current.company.contacts, phone: value } }, branding: { ...current.branding, supportPhone: value } })); }
updateEmail(value: string): void { this.facade.updateBootstrap(current => ({ ...current, company: { ...current.company, contacts: { ...current.company.contacts, email: value } }, branding: { ...current.branding, supportEmail: value } })); }
updateCopyright(value: string): void { this.facade.updateBootstrap(current => ({ ...current, footer: { ...current.footer, copyrightText: value } })); }
- updateStaticPages(value: string): void {
- const staticPageKeys = value.split(',').map(item => item.trim()).filter(Boolean);
- this.facade.updateBootstrap(current => ({ ...current, footer: { ...current.footer, staticPageKeys, legalPageKeys: staticPageKeys } }));
- }
updateLogo(value: string): void {
this.facade.updateBootstrap(current => ({ ...current, footer: { ...current.footer, logoUrl: value } }));
@@ -93,4 +100,99 @@ export class ProjectEditorFooterSectionComponent {
isValidUrl(url: string): boolean {
return !url || isValidHttpUrl(url);
}
+
+ // --- Footer columns (replaces the old comma-separated static-page-keys input) ---
+
+ private setColumns(columns: FooterColumnConfig[]): void {
+ this.facade.updateBootstrap(current => ({ ...current, footer: { ...current.footer, columns } }));
+ }
+
+ addColumn(): void {
+ this.setColumns([...this.columns(), { id: `col-${Date.now()}`, title: '', links: [] }]);
+ }
+
+ removeColumn(columnId: string): void {
+ this.setColumns(this.columns().filter(column => column.id !== columnId));
+ }
+
+ updateColumnTitle(columnId: string, title: string): void {
+ this.setColumns(this.columns().map(column => column.id === columnId ? { ...column, title } : column));
+ }
+
+ dropColumn(event: CdkDragDrop): void {
+ const columns = [...this.columns()];
+ moveItemInArray(columns, event.previousIndex, event.currentIndex);
+ this.setColumns(columns);
+ }
+
+ addLink(columnId: string): void {
+ const link: FooterLinkConfig = { id: `link-${Date.now()}`, label: '', pageKey: this.availablePages()[0]?.id ?? '', url: '' };
+ this.setColumns(this.columns().map(column => column.id === columnId ? { ...column, links: [...column.links, link] } : column));
+ }
+
+ removeLink(columnId: string, linkId: string): void {
+ this.setColumns(this.columns().map(column => column.id === columnId ? { ...column, links: column.links.filter(link => link.id !== linkId) } : column));
+ }
+
+ updateLink(columnId: string, linkId: string, patch: Partial): void {
+ this.setColumns(this.columns().map(column => column.id === columnId
+ ? { ...column, links: column.links.map(link => link.id === linkId ? { ...link, ...patch } : link) }
+ : column));
+ }
+
+ dropLink(columnId: string, event: CdkDragDrop): void {
+ const column = this.columns().find(c => c.id === columnId);
+ if (!column) {
+ return;
+ }
+ const links = [...column.links];
+ moveItemInArray(links, event.previousIndex, event.currentIndex);
+ this.setColumns(this.columns().map(c => c.id === columnId ? { ...c, links } : c));
+ }
+
+ linkSourceMode(link: FooterLinkConfig): 'page' | 'custom' {
+ return link.pageKey ? 'page' : 'custom';
+ }
+
+ setLinkSourceMode(columnId: string, linkId: string, mode: 'page' | 'custom'): void {
+ if (mode === 'page') {
+ this.updateLink(columnId, linkId, { pageKey: this.availablePages()[0]?.id ?? '', url: '' });
+ } else {
+ this.updateLink(columnId, linkId, { pageKey: '' });
+ }
+ }
+
+ // --- Multiple phones/emails ---
+
+ private setAdditionalPhones(phones: string[]): void {
+ this.facade.updateBootstrap(current => ({ ...current, company: { ...current.company, contacts: { ...current.company.contacts, additionalPhones: phones } } }));
+ }
+
+ private setAdditionalEmails(emails: string[]): void {
+ this.facade.updateBootstrap(current => ({ ...current, company: { ...current.company, contacts: { ...current.company.contacts, additionalEmails: emails } } }));
+ }
+
+ addPhone(): void {
+ this.setAdditionalPhones([...this.additionalPhones(), '']);
+ }
+
+ updatePhoneAt(index: number, value: string): void {
+ this.setAdditionalPhones(this.additionalPhones().map((phone, i) => i === index ? value : phone));
+ }
+
+ removePhoneAt(index: number): void {
+ this.setAdditionalPhones(this.additionalPhones().filter((_, i) => i !== index));
+ }
+
+ addEmail(): void {
+ this.setAdditionalEmails([...this.additionalEmails(), '']);
+ }
+
+ updateEmailAt(index: number, value: string): void {
+ this.setAdditionalEmails(this.additionalEmails().map((email, i) => i === index ? value : email));
+ }
+
+ removeEmailAt(index: number): void {
+ this.setAdditionalEmails(this.additionalEmails().filter((_, i) => i !== index));
+ }
}
diff --git a/src/app/i18n/en.ts b/src/app/i18n/en.ts
index 0160c52..ba3d001 100644
--- a/src/app/i18n/en.ts
+++ b/src/app/i18n/en.ts
@@ -634,6 +634,24 @@ export const en: Translations = {
iconAltLabelDesc: 'Alt text describing the payment icon for accessibility.',
socialLinkUrlDesc: 'Full URL to the social media profile, must start with http:// or https://.',
staticPagesFieldDesc: 'Static pages (about, terms, privacy, etc.) linked from the footer.',
+ additionalPhones: 'Extra phone numbers',
+ additionalPhonesDesc: 'Add more numbers if you support customers in different countries.',
+ addPhone: 'Add phone number',
+ removePhone: 'Remove phone number',
+ additionalEmails: 'Extra email addresses',
+ additionalEmailsDesc: 'Add more addresses for different regions or departments.',
+ addEmail: 'Add email address',
+ removeEmail: 'Remove email address',
+ footerColumns: 'Footer columns',
+ footerColumnsDesc: 'Group links into columns, like a real footer. Drag columns and links to reorder them.',
+ footerColumnTitlePlaceholder: 'Column title, e.g. Company',
+ footerLinkLabelPlaceholder: 'Link text',
+ footerLinkExistingPage: 'Existing page',
+ footerLinkCustomUrl: 'Custom URL',
+ addColumn: 'Add column',
+ removeColumn: 'Remove column',
+ addColumnLink: 'Add link',
+ removeColumnLink: 'Remove link',
sectionVisibleDesc: 'Whether this homepage section is shown to shoppers.',
layoutStrategyLabel: 'Layout strategy',
layoutStrategyDesc: 'How widgets inside this section are arranged.',
diff --git a/src/app/i18n/hy.ts b/src/app/i18n/hy.ts
index 218e17c..f2eeb06 100644
--- a/src/app/i18n/hy.ts
+++ b/src/app/i18n/hy.ts
@@ -634,6 +634,24 @@ export const hy: Translations = {
iconAltLabelDesc: 'Վճարային icon-ի այլընտրանքային տեքստ՝ մատչելիության համար։',
socialLinkUrlDesc: 'Սոցիալական պրոֆիլի ամբողջական URL, պետք է սկսվի http:// կամ https://-ով։',
staticPagesFieldDesc: 'Ստատիկ էջեր (մեր մասին, պայմաններ, գաղտնիության քաղաքականություն և այլն), որոնց հղում է անում footer-ը։',
+ additionalPhones: 'Լրացուցիչ հեռախոսահամարներ',
+ additionalPhonesDesc: 'Ավելացրեք համարներ, եթե սպասարկում եք հաճախորդների տարբեր երկրներում։',
+ addPhone: 'Ավելացնել համար',
+ removePhone: 'Հեռացնել համարը',
+ additionalEmails: 'Լրացուցիչ էլ. փոստի հասցեներ',
+ additionalEmailsDesc: 'Ավելացրեք հասցեներ տարբեր տարածաշրջանների կամ բաժինների համար։',
+ addEmail: 'Ավելացնել էլ. փոստ',
+ removeEmail: 'Հեռացնել էլ. փոստը',
+ footerColumns: 'Ստորատակի սյունակներ',
+ footerColumnsDesc: 'Խմբավորեք հղումները սյունակների մեջ, ինչպես իրական ստորատակում։ Քաշեք սյունակներն ու հղումները՝ կարգը փոխելու համար։',
+ footerColumnTitlePlaceholder: 'Սյունակի վերնագիր, օր.՝ Ընկերություն',
+ footerLinkLabelPlaceholder: 'Հղման տեքստ',
+ footerLinkExistingPage: 'Առկա էջ',
+ footerLinkCustomUrl: 'Սեփական URL',
+ addColumn: 'Ավելացնել սյունակ',
+ removeColumn: 'Հեռացնել սյունակը',
+ addColumnLink: 'Ավելացնել հղում',
+ removeColumnLink: 'Հեռացնել հղումը',
sectionVisibleDesc: 'Արդյո՞ք գլխավոր էջի այս սեկցիան ցուցադրվում է գնորդներին։',
layoutStrategyLabel: 'Դասավորության ռազմավարություն',
layoutStrategyDesc: 'Ինչպես են դասավորվում վիջեթները այս սեկցիայի ներսում։',
diff --git a/src/app/i18n/ru.ts b/src/app/i18n/ru.ts
index 9cbc098..2e70721 100644
--- a/src/app/i18n/ru.ts
+++ b/src/app/i18n/ru.ts
@@ -634,6 +634,24 @@ export const ru: Translations = {
iconAltLabelDesc: 'Альтернативный текст для иконки оплаты (для доступности).',
socialLinkUrlDesc: 'Полный URL профиля в соцсети, должен начинаться с http:// или https://.',
staticPagesFieldDesc: 'Статические страницы (о компании, условия, политика и т.д.), на которые ссылается футер.',
+ additionalPhones: 'Дополнительные номера телефонов',
+ additionalPhonesDesc: 'Добавьте номера, если поддерживаете клиентов в разных странах.',
+ addPhone: 'Добавить номер',
+ removePhone: 'Удалить номер',
+ additionalEmails: 'Дополнительные адреса email',
+ additionalEmailsDesc: 'Добавьте адреса для разных регионов или отделов.',
+ addEmail: 'Добавить email',
+ removeEmail: 'Удалить email',
+ footerColumns: 'Колонки подвала',
+ footerColumnsDesc: 'Группируйте ссылки по колонкам, как в настоящем подвале сайта. Перетаскивайте колонки и ссылки, чтобы изменить порядок.',
+ footerColumnTitlePlaceholder: 'Название колонки, напр. Компания',
+ footerLinkLabelPlaceholder: 'Текст ссылки',
+ footerLinkExistingPage: 'Существующая страница',
+ footerLinkCustomUrl: 'Свой URL',
+ addColumn: 'Добавить колонку',
+ removeColumn: 'Удалить колонку',
+ addColumnLink: 'Добавить ссылку',
+ removeColumnLink: 'Удалить ссылку',
sectionVisibleDesc: 'Показывать ли эту секцию главной страницы покупателям.',
layoutStrategyLabel: 'Стратегия раскладки',
layoutStrategyDesc: 'Как располагаются виджеты внутри этой секции.',
diff --git a/src/app/i18n/translations.ts b/src/app/i18n/translations.ts
index 2a97a7e..585bbe6 100644
--- a/src/app/i18n/translations.ts
+++ b/src/app/i18n/translations.ts
@@ -632,6 +632,24 @@ export interface Translations {
iconAltLabelDesc: string;
socialLinkUrlDesc: string;
staticPagesFieldDesc: string;
+ additionalPhones: string;
+ additionalPhonesDesc: string;
+ addPhone: string;
+ removePhone: string;
+ additionalEmails: string;
+ additionalEmailsDesc: string;
+ addEmail: string;
+ removeEmail: string;
+ footerColumns: string;
+ footerColumnsDesc: string;
+ footerColumnTitlePlaceholder: string;
+ footerLinkLabelPlaceholder: string;
+ footerLinkExistingPage: string;
+ footerLinkCustomUrl: string;
+ addColumn: string;
+ removeColumn: string;
+ addColumnLink: string;
+ removeColumnLink: string;
sectionVisibleDesc: string;
layoutStrategyLabel: string;
layoutStrategyDesc: string;
diff --git a/src/app/shared/models/config/company.model.ts b/src/app/shared/models/config/company.model.ts
index 2c45bc9..e45ac75 100644
--- a/src/app/shared/models/config/company.model.ts
+++ b/src/app/shared/models/config/company.model.ts
@@ -11,6 +11,10 @@ export interface CompanyContactConfig {
phone?: string;
telegram?: string;
website?: string;
+ /** Extra phone numbers, e.g. for country-specific support lines. `phone` stays the primary/default one. */
+ additionalPhones?: string[];
+ /** Extra email addresses. `email` stays the primary/default one. */
+ additionalEmails?: string[];
}
export interface CompanyConfig {
diff --git a/src/app/shared/models/config/footer-config.model.ts b/src/app/shared/models/config/footer-config.model.ts
index 162e998..10fe3f0 100644
--- a/src/app/shared/models/config/footer-config.model.ts
+++ b/src/app/shared/models/config/footer-config.model.ts
@@ -14,11 +14,29 @@ export interface FooterSocialLinkConfig {
icon?: string;
}
+export interface FooterLinkConfig {
+ id: string;
+ label: string;
+ /** Key of an existing static page (features/content-management ContentPage.id) - preferred over a raw URL so the link stays correct if the page's route ever changes. */
+ pageKey?: string;
+ /** Used only when pageKey is empty - an external or custom URL. */
+ url?: string;
+}
+
+export interface FooterColumnConfig {
+ id: string;
+ title: string;
+ links: FooterLinkConfig[];
+}
+
export interface FooterConfig {
logoUrl?: string;
paymentIcons?: FooterPaymentIconConfig[];
copyrightText?: string | LocalizedTextContent;
+ /** @deprecated superseded by `columns` - kept so already-saved configs still resolve until re-saved through the Footer Builder. */
legalPageKeys?: string[];
+ /** @deprecated superseded by `columns` - kept so already-saved configs still resolve until re-saved through the Footer Builder. */
staticPageKeys?: string[];
+ columns?: FooterColumnConfig[];
socialLinks?: FooterSocialLinkConfig[];
}
\ No newline at end of file