fix(storefront): home carousel overflow, static-page content, compare colour swatch
- product-carousel-widget: implicit CSS grid track had no min-width:0, so the flex scroller's intrinsic content width (fixed 220px product cards) overflowed the grid item and pushed body width to ~2187px on a 1440px viewport, squeezing the entire homepage into a ~340px column. Added min-width:0 to the track and scroller (standard grid/flex overflow fix). - bootstrap.json mock fixture: about-us/privacy-policy/terms-of-service static pages (the real CMS pages served via bootstrap.staticPages, per docs/PROJECT_INDEX.md) used a 'content' field, but content-page.service.ts's normalizePage() only reads 'html' - ContentPageBootstrapInput has no 'content' field. Title rendered, body was always empty. Renamed the 3 fixture entries' field from content to html to match the schema; content now renders. - compare-table: colour row rendered raw hex/name values as plain text (e.g. '#fCfCfC') with no swatch, inconsistent with variant-selector's established colour-swatch pattern used on the product page. Added a small circular swatch (reusing the same border-radius:50% pattern) next to the value. Verified live via ng serve: overflow gone (body/viewport width match at 1440/1280/375), static pages render real content, compare swatch displays. tsc --noEmit and ng build both clean (pre-existing bundle- budget warning only, already tracked in KNOWN-ISSUES item 12). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,16 @@
|
||||
<tr [class.compare-different]="isDifferentRow(row)">
|
||||
<th scope="row">{{ row.label }}</th>
|
||||
@for (value of row.values; track $index) {
|
||||
<td>{{ value }}</td>
|
||||
<td>
|
||||
@if (row.key === 'color' && value !== '—') {
|
||||
<span class="compare-colour-value">
|
||||
<span class="compare-colour-swatch" [style.background-color]="value"></span>
|
||||
{{ value }}
|
||||
</span>
|
||||
} @else {
|
||||
{{ value }}
|
||||
}
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
|
||||
@@ -46,6 +46,20 @@
|
||||
background: color-mix(in srgb, var(--warning-color) 9%, white);
|
||||
}
|
||||
|
||||
.compare-colour-value {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.compare-colour-swatch {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
flex-shrink: 0;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.compare-table th,
|
||||
.compare-table td {
|
||||
|
||||
@@ -62,10 +62,12 @@ import { ProductCollectionWidgetData } from '../contracts/widget-data.contract';
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.product-carousel-widget__scroller {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow-x: auto;
|
||||
scroll-behavior: smooth;
|
||||
scrollbar-width: none;
|
||||
|
||||
@@ -320,7 +320,7 @@
|
||||
"en": "About Us",
|
||||
"hy": "Մեր մասին"
|
||||
},
|
||||
"content": {
|
||||
"html": {
|
||||
"ru": "<h2>О компании</h2><p>Marketplace — мультиарендная B2B commerce-платформа.</p>",
|
||||
"en": "<h2>About Us</h2><p>Marketplace is a multi-tenant B2B commerce platform.</p>",
|
||||
"hy": "<h2>Մեր մասին</h2><p>Marketplace-ը բազմավարձակալ B2B առևտրային հարթակ է։</p>"
|
||||
@@ -333,7 +333,7 @@
|
||||
"en": "Privacy Policy",
|
||||
"hy": "Գաղտնիության քաղաքականություն"
|
||||
},
|
||||
"content": {
|
||||
"html": {
|
||||
"ru": "<h2>Политика конфиденциальности</h2><p>Мы обрабатываем только необходимые данные.</p>",
|
||||
"en": "<h2>Privacy Policy</h2><p>We process only the data required for service operations.</p>",
|
||||
"hy": "<h2>Գաղտնիության քաղաքականություն</h2><p>Մենք մշակում ենք միայն ծառայության համար անհրաժեշտ տվյալները։</p>"
|
||||
@@ -346,7 +346,7 @@
|
||||
"en": "Terms of Service",
|
||||
"hy": "Օգտագործման պայմաններ"
|
||||
},
|
||||
"content": {
|
||||
"html": {
|
||||
"ru": "<h2>Условия использования</h2><p>Использование платформы регулируется публичной офертой.</p>",
|
||||
"en": "<h2>Terms of Service</h2><p>Platform usage is governed by public offer terms.</p>",
|
||||
"hy": "<h2>Օգտագործման պայմաններ</h2><p>Հարթակի օգտագործումը կարգավորվում է հրապարակային առաջարկի պայմաններով։</p>"
|
||||
|
||||
Reference in New Issue
Block a user