Basic (2023-03-12)
Product catalogue landing page: search hero, 4-column product grid, custom-site contact bar and 3-column product detail cards.
Overview
Live Preview
Open the example in a new tab
Page Sections
Interactions
- js/index.js: body.onscroll targets "top-nav".$ but the page nav id is nav-002, so the lookup returns null and the .scroll toggle throws on scroll (existing bug)
- js/index.js: converts custom attributes top / bottom / bg-col / col / bg-img into inline padding-top, padding-bottom, background-color, color, background-image (values starting with -- become var(--x))
- js/index.js: replaces span[mask=arc|arc-up|arc-down|slash-left|slash-right|wave] with generated inline SVG dividers sized from the viewport width (64/128px above 1024px)
- js/index.js wraps logic in DOMContentLoaded and relies on PDRenderKit prototype extensions ($all, $attr, _style, $style, $parent, class, class)
Dependencies
Styling
Shared section library: index.scss imports every nav/header/section/footer partial inside body; each partial is keyed by an attribute selector (nav[num], section[header=N], section[num=N], footer[num]); comp/* are mixin-like snippets imported inside sections (r2/r3/r4 responsive column widths, div-info title block). component/_info.scss, comp/_w-h-rate.scss and section/_rm-1st-top.scss exist but are not imported. This copy's section/_015-center.scss differs from 20230302.
cd target/20230312
npx sass sass/index.scss css/index.css --no-source-map || exit 1
Techniques
- Theme via CSS custom properties in an inline <style> :root (--col-nav, --col-system, --col-txt, --col-border, --max-width)
- Attribute-driven layout: section[num=N] / section[header=N] / nav[num] select a pre-built SCSS block; ul.r2/.r3/.r4 pick 2/3/4 column cards
- Fixed top nav with collapsed hamburger button; media queries at 413/479/639/799/1023/1139px max-width and 480/640/768/1024px min-width
- JS-generated SVG section dividers (arc / slash / wave) via span[mask]
- SEO head: Open Graph, Twitter card, canonical, JSON-LD WebPage schema
- Slash dividers (slash-left / slash-right) color-matched to neighbouring sections
External Assets