Simplify Blog
Last updated
Two-column personal blog SPA rendered entirely by JS (PDRenderKit 1.0.1): sticky left profile/nav, right pane swapping list, article, about and contact views.
Overview
| Item | Value |
|---|---|
| Created | 2023-07-12 |
| Category | Blog Examples |
| HTML files | index.html |
| Source | target/20230712 |
Preview

Open the example in a new tab
Page Sections
| Section | Description |
|---|---|
| Left profile panel (#section-left) | Name 'PARDN CHIU', intro text, HOME/ABOUT/CONTACT menu (ul[index] marks the active item), social icon links, copyright. |
| Post list (.list) | 10 article cards (image, title, excerpt, date, category) and a static pager (‹ 1 2 3 ›). |
| Article view (.article) | Hero figure, h1, meta line and rich text body (h3-h6, lists, links, blockquote), plus an 'ALL POSTS' back button. |
| About view | Self-introduction with skill list, project link (JOBALL) and contact list, ending with a 'Get in touch' button. |
| Contact view (.contact) | Heading, two paragraphs, Name and Email inputs and a message textarea with a 'Get in touch' button (no submit handler). |
Interactions
- js/index.js:
_CLICK_HOME/_CLICK_ABOUT/_CLICK_CONTACTreplace the whole body viabody.__child()and reset scrollTop, acting as client-side view switching. - Clicking a list card calls
_CLICK_ARTICLEto show the article view; 'ALL POSTS' returns to the list. - Social icons use PDRenderKit
._open(url)to open external links.
Dependencies
| Name | Version | Source |
|---|---|---|
| Font Awesome Free | 6.5.2 | https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css |
| PDRenderKit | 1.0.1 | https://cdn.jsdelivr.net/npm/pdrenderkit@1.0.1/dist/PDRenderKit.js |
Styling
| Item | Value |
|---|---|
| SCSS entry | sass/index.scss |
| Output CSS | css/index.css |
| Partials | _section-left.scss, _section-right.scss, _list.scss, _article.scss |
index.scss holds the reset, safe-area vars and the body flex layout (column on mobile, row from 800px);
_section-left styles the sticky profile sidebar, _section-right the content pane and buttons and imports _list (post cards) and _article (article typography). Colors use var(--color-dark-*), var(--width-max) and var(--bgcolor).- cd target/20230712
- npx sass sass/index.scss css/index.css --no-source-map || exit 1
Techniques
- Whole DOM built in JS with PDRenderKit string-tag syntax:
(section + "#section-left")._([...children]), array._$()mapping,._click(),"fa-..."._faicons. - Tag names assembled from single-letter globals (
_0_,__0,_0...) passed into an IIFE, e.g.[_s, _e, _c, _t, _i, _o, _n].$str(_empty). - position: sticky sidebar from 800px; breakpoints 480/640/800/1280px; aspect-ratio card images (16/10, 2/1, 3/1).
env(safe-area-inset-*)CSS vars, hidden scrollbars, lazy image placeholder for img[data-src] via a 1px GIF and gradient.
External Assets
- https://fakeimg.pl/1024/282828/eae0d0/?text=sample (all placeholder images)
- https://pardn.io/image/head.png (favicon), https://demo-web.pardn.io/image/20230712.jpg (og/twitter image), canonical/og:url https://demo-web.pardn.io/target/20230712/