Product Introduction

Last updated


Dark-gray product landing page: glass hero card, 6 feature cards, FAQ accordion, CTA band and two profile cards.

Overview


ItemValue
Created2023-03-13
CategoryBusiness Examples
HTML filesindex.html
Sourcetarget/20230313

Preview


Product Introduction screenshot
Open the example in a new tab

Page Sections


SectionDescription
Top navigationFixed top nav #nav-002: PARDN CHIU logo, four ITEM buttons, My Page link to pardn.io, hamburger button
Hero (header=2)Background-image hero; content box uses translucent white + backdrop-filter blur, 查看源碼 button; a dark overlay link carries a Freepik credit watermark (freepik attribute rendered by a::before)
Feature cards (num=18)Arc divider and six 3-column image + title cards
FAQ accordion (num=19)Heading and four collapsible questions, each with a MORE link
CTA bandBackground-image section: 準備好開始了嗎? with 立即獲取 PD Web Pro button
Profile cards (num=20)Two round-avatar cards: Pardn Chiu 全端工程師 and 帕登國際有限公司 軟體公司, each with a five-star SVG rating
Footer (footer num=1)Light footer with a top border, brand column and four link columns

Interactions


  • js/index.js: body.onscroll toggles .scroll on #nav-002 past 48px using PDRenderKit string helpers ("nav-002".$._class / class_)
  • 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: elements with unhover="1" get .unhover for 500ms on mouseleave
  • Inline script showContent(this): accordion, clicking a button toggles .show on its li and closes the other open li
  • js/index.js wraps logic in DOMContentLoaded and relies on PDRenderKit prototype extensions ($all, $attr, _style, $style, $parent, _class, class_)

Dependencies


NameVersionSource
Font Awesome Free6.5.2https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css
PDRenderKit1.0.0https://cdn.jsdelivr.net/npm/pdrenderkit@1.0.0/dist/PDRenderKit.js
Page stylesheet (compiled SCSS)-./css/index.css
Page script-./js/index.js

Styling


ItemValue
SCSS entrysass/index.scss
Output CSScss/index.css
Partialsnav/_001.scss, nav/_002.scss, nav/_body.scss, header/_001.scss, header/_002.scss, header/_003.scss, section/_000.scss ... section/_022.scss, section/_015-top.scss, section/_015-center.scss, section/_015-bottom.scss, footer/_001.scss, comp/_div-info.scss, comp/_innerText.scss, comp/_li-r2.scss, comp/_li-r3.scss, comp/_li-r4.scss, comp/_ul-button.scss, comp/_w-h-rate.scss

Shared section library: index.scss imports every nav/header/section/footer partial inside body (nav/_body.scss is pulled in by the nav partials, the 015-top/center/bottom parts by section/_015.scss); 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, w-h-rate in section 021). component/_info.scss and section/_rm-1st-top.scss exist but are not imported. This copy's header/_002.scss and section/_015-center.scss differ from 20230302. image/full.svg, half.svg, joball.jpg exist but are not referenced.
  1. cd target/20230313
  2. 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/1039/1139px max-width and 480/640/768/1024/1040px min-width
  • JS-generated SVG section dividers (arc / slash / wave) via span[mask]
  • SEO head: Open Graph, Twitter card, canonical, JSON-LD WebPage schema
  • Glassmorphism hero: rgba(255,255,255,0.75) + backdrop-filter: blur(5px) in header/_002.scss
  • Multi-line text clamp (-webkit-line-clamp: 3) in section/_015-center.scss

External Assets




中文