Gym Introducing

Last updated


Fitness gym landing page assembled from view/*.html with PDRenderKit 1.5.2 PD data binding and IntersectionObserver scroll-reveal.

Overview


ItemValue
Created2023-06-19
Last updated2024-12-22
CategoryBusiness Examples
HTML filesindex.html, view/header.html, view/child3.html, view/child4.html, view/child5.html, view/child6.html, view/child7.html, view/child8.html, view/child9.html
Sourcetarget/20230619

Preview


Gym Introducing screenshot
Open the example in a new tab

Page Sections


SectionDescription
NavSticky nav with {{ navTitle }} PARDN CHIU, :for list of navTarget labels (HOME, CHILD...) and a menu button.
Header (view/header.html)Full background workout photo with gradient panel, title, text, GitHub/LinkedIn buttons and Freepik credit link.
Features (view/child3.html)Heading, 3 icon articles (dumbbell, biking) from :for, and a background image block (image/image 1.png).
Intro + gallery (view/child4.html)Text with GitHub/LinkedIn links beside 4 photo figures from :for.
Checklist (view/child5.html)3 check-icon paragraphs beside a photo.
Programs (view/child6.html)3 cards with image, title, text and LEARN MORE link.
Highlight (view/child7.html)Large photo with offset shadow, heading, hint, paragraph and CONTACT US mail button.
Gallery (view/child8.html)Heading, paragraph and 6-photo grid from :for.
Contact (view/child9.html)Form bound with :model (name, email, message) and SUBMIT @click=send, photo, and 3 info items (phone, location, hours) via :html.
FooterCopyright and :for social icon links (GitHub, LinkedIn).

Interactions


  • js/index.js (module): new PD({id: "app", data, next}) renders the page; each view/*.html carries its own inline script creating a PD instance for its section id.
  • Scroll reveal: in next(), after 300ms + 300ms, an IntersectionObserver watches every *.delay element and removes the delay class (elm.class_("delay")) when it enters view; CSS transitions do the reveal.
  • view/child9.html: event.send alerts the :model-bound name, email and message.

Dependencies



Styling


ItemValue
SCSS entrysass/index.scss
Output CSScss/index.css
Partials_section-3.scss, _section-4.scss, _section-5.scss, _section-6.scss, _section-7.scss, _section-8.scss, _section-9.scss, animation/_section-3.scss

index.scss: :root safe-area env() vars, --width-max 1024px, --bgcolor, reset, sticky nav, header gradient panel with staggered transitions, footer; _section-3.._section-9 style child3..child9 with .delay start states (offset/opacity).
  1. cd target/20230619
  2. npx sass sass/index.scss css/index.css --no-source-map || exit 1

Techniques


  • PDRenderKit PD templating: :path partial loading on section/header elements, :for, :class / :src / :href binding, {{ }} interpolation, :model two-way input, :html, @click events.
  • IntersectionObserver-driven reveal by removing a .delay class with CSS transitions.
  • env(safe-area-inset-*) CSS variables; position: sticky nav; offset box-shadow; breakpoints 480px, 640px, 800px, 1024px.

External Assets




中文