Basic (2022-04-13)
Purple-themed PDWebsitemplate page (T004, C020-C024, B004) adding a full-screen mobile nav, responsive w_* grids and CSS-only percentage pie charts.
Overview
Live Preview
Open the example in a new tab
Page Sections
Interactions
- Inline script in T004 nav: #btn-nav-show adds 'show' to the T004 block and locks body overflow; #btn-nav-collaspe adds 'collaspe', then after 300ms removes it and 'show' and restores scrolling (T004-nav-show / T004-nav-collaspe keyframes).
- js/PDWebsitemplate.js (IntersectionObserver hover / tap 'act' + 'unhover' helper) exists in the folder but index.html does not load it.
Dependencies
Styling
Module library renamed to _PD*.scss; _PDColum adds ul.resize[df=w_2 / w_3_2_1 / w_4_2 / w_4_2_1 / w_5_3_2] responsive column widths; C022 generates percent="1..100" rules with a Sass @for loop.
cd target/20220413
npx sass sass/PDWebsitemplate.min.scss css/PDWebsitemplate.min.css --no-source-map || exit 1
Techniques
- CSS-only pie chart: two half-circle layers rotated by calc(3.6deg * N) per percent attribute, value shown with content: attr(percent).
- Responsive column naming df="w_3_2_1" = 3 / 2 / 1 columns across breakpoints using calc(100% / n - 2rem).
- Theme CSS variables in inline <style> on *: --col-sys rgb(185,120,200), --default-radius 1rem, --max-width 1140px, --module-hint 1.
- Full-screen mobile nav with keyframe show / collapse animations and body overflow lock.
External Assets
https://fakeimg.pl/1024/282828/eae0d0/?text=sample
https://fakeimg.pl/1024/282828/000000/?text=sample
https://pardn.io/image/head.png
https://pardn.io/web-template/image/20220413.jpg
- / and /blog (root-absolute header icon links)
- ../icon/watch/1/fff.svg, ../image/bg-l.svg, ../image/bg-m.svg (referenced by compiled CSS, not present in the folder)
Known Issues
- Header icon links href="/" and href="/blog" are root-absolute and go to the host site root instead of the example. CSS url(../icon/watch/1/fff.svg), url(../image/bg-l.svg), url(../image/bg-m.svg) point to folders that do not exist in 20220413.