Basic (2022-04-09)

Last updated


Static business page assembled from PDWebsitemplate modules (T002, C004, C013, C006, C014, C007, B001), selected by sn attributes, green theme.

Overview


ItemValue
Created2022-04-09
CategoryBusiness Examples
HTML filesindex.html
Sourcetarget/20220409

Preview


Basic (2022-04-09) screenshot
Open the example in a new tab

Page Sections


SectionDescription
T002 hero + fixed navbarBackground-image hero with a fixed 4rem navbar (title, links, hover dropdown 列表), subtitle, heading, text and Code / GitHub buttons.
C004 icon cards6 cards in a 3-column list (df="x3"), each with a Font Awesome icon, title and text.
C013 service stepsBackground-image block with 4 icon + text service items beside an image.
C006 pricing tableThree VPS plans (888 / 1688 / 3360 per month) with spec lists and Email buttons.
C014 two promo cardsTwo figure cards (image + caption) with description text on a background image.
C007 article cardsTwo article cards with image, linked title, author / company / tag meta list and excerpt.
B001 footer3-column footer: BC001 company intro, BC005 links + social icons, BC002 link list, then copyright bar.

Dependencies



Styling


ItemValue
SCSS entrysass/PDWebsitemplate.min.scss
Output CSScss/PDWebsitemplate.min.css
Partialsfunction/_hsbTohsl.scss, _init.scss, _PDModuleTop.scss (top/_T-001, _T-002, _T-003, _T004), _PDModuleColum.scss (colum/_C001..._C019), _PDModuleBottom.scss (bottom/_B001-_B003, _BC001-_BC006), _PDModuleAnimation.scss, _PDModuleComp.scss (comp/_a[btn], _dev.a[shadow], _div[bg], _img[ic], _to, _wh)

The full module library is compiled even though the page uses only 7 modules; each module is scoped by div[sn=XXXX] and prints its code via ::after with opacity controlled by --module-hint. sass/index.scss (imports _init, _header-0, _section-1) is a separate entry not linked by the page.
  1. cd target/20220409
  2. npx sass sass/PDWebsitemplate.min.scss css/PDWebsitemplate.min.css --no-source-map || exit 1

Techniques


  • Attribute-driven modules: sn="T002" etc. select module styles; df="x2" / df="x3" column layouts, df="btn fff col xl" button variants, wh="1" image wrappers, df="sd" shadow cards.
  • Theme via CSS custom properties in an inline <style> on *: --col-sys (green rgb(30, 120, 50, 0.9)), --max-width 1140px, --default-radius 0.25rem, --module-hint 1.
  • Desktop-first max-width breakpoints (413 / 479 / 639 / 767 / 959 / 1023px) and (hover: hover) and (pointer: fine) hover rules with keyframe color transitions.
  • CSS-only hover dropdown in the navbar; links collapse (display: none) below 640px.

External Assets


  • https://fakeimg.pl/1024/282828/eae0d0/?text=sample
  • https://pardn.io/image/head.png
  • https://demo-web.pardn.io/image/20220409.jpg
  • /sample2, /sample2/gallery, /sample2/blog (root-absolute nav links)
  • ../icon/watch/1/fff.svg, ../image/bg-l.svg, ../image/bg-m.svg (referenced by compiled CSS)


中文