Minimal Blog

Last updated


'Minimal' single-column blog variant (PDRenderKit 1.0.1, JS-rendered): compact nav with side menu, minimal post list, post, contact and 404 pages.

Overview


ItemValue
Created2023-07-23
CategoryBlog Examples
HTML filesindex.html
Sourcetarget/20230723

Preview


Minimal Blog screenshot
Open the example in a new tab

Page Sections


SectionDescription
Top nav (#top-nav)Menu button (opens side menu), centered 'PARDN LTD', search button.
Side menu (#right-tab via _LEFT_TAB)Home dropdown (Magazine/Personal/Personal Alt/Classic open 20230719-20230722 on demo-web.pardn.io, Minimal calls setHome), List, Post 1/2, contact, 404, social icons.
Home (.list-min)4 articles each with author avatar, meta (author, date, category, comment count), title, image, excerpt, share icons; 1/2/3 pager.
List page#default-header plus the same .list-min list.
Post 1 / Post 2 (.list-post)Post header variant (#post-1-header / #post-2-header) and article body with author box, comments and reply form.
Contact / 404Contact info with Google Maps iframe and form; 404 with 'Return Home' button.
Footer (#bottom-footer)Instagram image strip, copyright, social icons, 'Back to Top'.

Interactions


  • js/index.js: setHome/setList/setPost(1|2)/setContact/set404 rebuild the body with body.__child() and reset scrollTop.
  • _LEFT_TAB appends the off-canvas #right-tab menu; close adds 'hide' then removes it after 300ms; dropdown items toggle 'show'.
  • _SVGListener() inlines span.svg images; 'ft' class removed from body after 500ms. No scroll listener in this variant.

Dependencies


NameVersionSource
Font Awesome Free6.5.2https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css
PDRenderKit1.0.1https://cdn.jsdelivr.net/npm/pdrenderkit@1.0.1/dist/PDRenderKit.js
Noto Sans TC (font-family only)-declared in SCSS; no font stylesheet is linked, so it relies on a locally installed font or the sans-serif fallback

Styling


ItemValue
SCSS entrysass/index.scss
Output CSScss/index.css
Partials_top-nav.scss, _bottom-footer.scss, _header.scss

Only three partials (_top-nav sticky nav, _bottom-footer, _header for default, personal, user and post headers); index.scss itself contains the #body column (max-width 60rem), .list-min, .list-post, comments and #right-tab keyframes. Color/size tokens var(--color-dark-*), var(--color-light-*), var(--color-brand-*), var(--width-max), var(--bgcolor) are defined in an inline <style> :root block in index.html (brand colors #E75480, #F67280, #F88158; --width-max 1280px).
  1. cd target/20230723
  2. npx sass sass/index.scss css/index.css --no-source-map || exit 1

Techniques


  • Entire page built in JS with PDRenderKit string-tag syntax (('section' + '#id')._([...]), ._$(), ._click(), ._open(), 'fa-...'._fa), tag names assembled from single-letter globals passed to an IIFE.
  • Single centered column (max-width 60rem), sticky top nav, backdrop-filter, .line.r2/.r3 clamps; breakpoints 640/800/1024/1280px.

External Assets




中文