2026-07-10 13:43:53 +04:00
|
|
|
@if (homePage()) {
|
2026-07-16 02:07:41 +04:00
|
|
|
<app-section-card [title]="'builder.homepage' | translate">
|
2026-07-17 16:18:22 +04:00
|
|
|
@if (fieldError('pages'); as msg) {
|
|
|
|
|
<p class="editor-error">{{ msg }}</p>
|
|
|
|
|
}
|
2026-07-10 13:43:53 +04:00
|
|
|
<div cdkDropList class="sortable-list" (cdkDropListDropped)="drop($event)">
|
|
|
|
|
@for (section of sections(); track section.id) {
|
|
|
|
|
<div class="sortable-item" cdkDrag>
|
|
|
|
|
<div class="editor-grid four compact">
|
|
|
|
|
<strong>{{ section.id }}</strong>
|
2026-07-16 02:07:41 +04:00
|
|
|
<label class="toggle-row">
|
|
|
|
|
<app-toggle [ngModel]="section.visible !== false" (ngModelChange)="updateSection(section.id, 'visible', $event)" [ariaLabel]="'builder.visible' | translate" />
|
feat(project-editor): finish field descriptions + enum dropdowns across all sections
Wires up the remaining editor sections (theme, header, footer, homepage,
widgets, features, languages, navigation) with the description text and
dropdown UX started for General/Branding:
- Every enum-backed field is now a <select> with a description per option,
not free text: theme.mode, the new site-wide layout.type (previously had
no editor at all - added to the Theme section, and added to that
section's reset-scope), homepage section layout.strategy, and
catalog.navigationMode (also previously unedited, added to Features).
- Every other field (colors, header toggles, footer contact/company fields,
widget props, feature flags, language add, nav link label/url/visible)
gets a one-line plain-language description under its label via the new
*Desc i18n keys (en/ru/hy) prepared earlier.
- Genuinely open text (widget layout variant strings, JSON props) stays
free text, description-only, per the existing widgetLayoutDesc/widgetJsonDesc
wording - not force-fit into a dropdown.
Verified: tsc --noEmit and ng build both clean.
2026-07-15 00:45:41 +04:00
|
|
|
<span>{{ 'builder.visible' | translate }}</span>
|
|
|
|
|
<small class="field-desc">{{ 'builder.sectionVisibleDesc' | translate }}</small>
|
|
|
|
|
</label>
|
|
|
|
|
<label>
|
|
|
|
|
<span>{{ 'builder.layoutStrategyLabel' | translate }}</span>
|
|
|
|
|
<small class="field-desc">{{ 'builder.layoutStrategyDesc' | translate }}</small>
|
|
|
|
|
<select [ngModel]="section.layout?.strategy || 'stack'" (ngModelChange)="updateLayout(section.id, 'strategy', $event)">
|
|
|
|
|
@for (option of layoutStrategyOptions; track option.value) {
|
|
|
|
|
<option [value]="option.value">{{ option.labelKey | translate }}</option>
|
|
|
|
|
}
|
|
|
|
|
</select>
|
|
|
|
|
<small class="field-desc">{{ layoutStrategyDescKey(section.layout?.strategy || 'stack') | translate }}</small>
|
|
|
|
|
</label>
|
|
|
|
|
<label>
|
|
|
|
|
<span>{{ 'builder.columns' | translate }}</span>
|
|
|
|
|
<small class="field-desc">{{ 'builder.sectionColumnsDesc' | translate }}</small>
|
feat(project-editor): adopt Design System primitives across editor sections
Applied app-input/app-form-field/app-button to 9 of 11 Project Editor
sections: general, branding, theme, footer, homepage, widgets, languages,
navigation, preview. header and features sections were left unchanged -
they contain only checkboxes and selects, and no Checkbox/Select primitive
exists yet.
Theme section's 8 color pickers stay native <input type=color> (app-input's
type union doesn't include 'color') but are now wrapped in app-form-field
for consistent label/hint treatment. Added app-form-field.full grid-column
rule to section.shared.scss (shared by all 11 sections) alongside the
existing label.full rule, since the custom element doesn't match that
selector.
Production build green, arch:check passes.
2026-07-15 07:55:38 +04:00
|
|
|
<app-input type="number" [ngModel]="section.layout?.columns || 1" (ngModelChange)="updateLayout(section.id, 'columns', $event)" />
|
feat(project-editor): finish field descriptions + enum dropdowns across all sections
Wires up the remaining editor sections (theme, header, footer, homepage,
widgets, features, languages, navigation) with the description text and
dropdown UX started for General/Branding:
- Every enum-backed field is now a <select> with a description per option,
not free text: theme.mode, the new site-wide layout.type (previously had
no editor at all - added to the Theme section, and added to that
section's reset-scope), homepage section layout.strategy, and
catalog.navigationMode (also previously unedited, added to Features).
- Every other field (colors, header toggles, footer contact/company fields,
widget props, feature flags, language add, nav link label/url/visible)
gets a one-line plain-language description under its label via the new
*Desc i18n keys (en/ru/hy) prepared earlier.
- Genuinely open text (widget layout variant strings, JSON props) stays
free text, description-only, per the existing widgetLayoutDesc/widgetJsonDesc
wording - not force-fit into a dropdown.
Verified: tsc --noEmit and ng build both clean.
2026-07-15 00:45:41 +04:00
|
|
|
</label>
|
2026-07-10 13:43:53 +04:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
2026-07-16 02:07:41 +04:00
|
|
|
</app-section-card>
|
2026-07-10 13:43:53 +04:00
|
|
|
}
|