Commit Graph

4 Commits

Author SHA1 Message Date
浅念 8f8dfd19e5 fix: listing review round — responsive grid collapse, branch fallback, test assertions
Quality review fixes for Task 10c (2 Important + 5 Minor):
- [I1] sf-tp-card-grid--listing now collapses to 2 cols at 900px and
  compact gap at 620px: the 3-col declaration sits after the 10a media
  blocks in source order, so the fold rules must live in the new 10c
  media blocks to win at equal specificity
- [I2] tp_post_like trusts the first listing item's content type when
  the list is non-empty; the route-substring fallback now only applies
  to empty listings of kind=='listing' — /categories/post-sales-service/
  style slugs can no longer flip a product category page into the news
  branch
- [M3] empty-state negative assertions check the rendered attribute
  string, not the selector literal (previously always true)
- [M4] catalogue section-head intro is now an item/page count instead
  of duplicating the hero lead
- [M5] Popular reads entries link to the posts (same data as Latest,
  no analytics source on the platform)
- [M6] both /categories/pumps/ pagination pages assert exactly one h1
- [M7] side-panel sticky top uses --sf-tp-space-24

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-23 14:26:34 +08:00
浅念 9ea8369e2b feat: port cms listing layout into trade-pro (kind-branched cards/filters/pagination)
Task 10c. listing.html (category.html now includes it) replaces the thin
pro-inner-hero variant with the cms list designs:
- product-like listings (product/vehicle/brand/case/service) get the
  products/[...page].astro form: ported PageHero, 260px sticky category
  side panel, 3-col sf-tp-card grid reusing the 10a card components
- post-like listings (/news/, /post/) get the news/[...page].astro form:
  1fr+310px two-col layout, horizontal news rows (290px media + tag/
  title/summary/Read more), three aside boxes (Latest/Popular/count)
- pagination is the cms Pagination window (first/last + current-2..+2,
  ellipsis collapse) with arrow-left/arrow-right SVG icons and
  builder-consistent URLs (page 1 = section root)
- platform filter contract kept: .pro-filter-panel stays the immediate
  previous sibling of .pro-filter-scope (pro.js previousElementSibling
  lookup); cards/rows carry .pro-card + data-brand/data-category
- empty sections hide filters/grid/pagination behind a friendly empty
  state (noindex scaffold pages)

Test: test_trade_pro_listing_layout_structure drives a real build with
105 imported products + 3 posts, asserting both branches, static
pagination on /categories/pumps/ pages 1-2, contract adjacency, and
no bare arrow glyphs.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-23 14:06:15 +08:00
浅念 22b614118b feat: SVG icon macro library replaces bare text arrows in trade-pro
Task 9 (new design, not a cms port): _professional_components.html gains
an icon(name, size, cls) macro — 10 inline line-style glyphs (arrow-right,
arrow-left, chevron-down, check, phone, mail, location, download, search,
quote), 24x24 viewBox, stroke=currentColor, stroke-width 1.5, round
caps/joins, decorative aria-hidden + focusable=false, default size
var(--sf-tp-icon-size-md, 20px), unknown names fall back to arrow-right.
Every glyph is a single <path> so the d attribute needs no |safe.

All bare text arrows (->, <-, ↗, ▾, ⌕) in the macro library, pro.html,
site.html and pages/* are replaced with macro calls (site.html keeps a
self-contained copy of the arrow glyph because its rendering envs cannot
import the macro library); the filters macro search box gains an inline
search icon; footer links gain small arrows. theme.css adds .sf-tp-icon
alignment, in-button icon spacing, and search-box icon positioning.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-23 08:35:52 +08:00
浅念 5797638caf feat: trade-pro skeleton theme package (Phase 2)
Fifth built-in theme: English-first international B2B skeleton registered
via manifest discovery, builds real sites end-to-end. pro.html derives
from industrial with lang=en, href-set value-comparison English fallback
nav (header + footer), sf-tp-* button classes and hard-coded #0b3d91
theme-color until the map entry lands. pages/ ships all 14 kinds; macro
library is an English passthrough copy pending the Phase 3 cms port.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-22 18:19:30 +08:00