Documentation

App Introduction (2023-07-10)

Red-accent business template routing 7 pages by ?page= query via PDRenderKit 1.2.0 :if/:path views, incl. blog and Markdown article.

Overview

Item Value
Created 2023-07-10
Category Business Examples
HTML files index.html, views/nav.html, views/header.html, views/section-3.html, views/section-4.html, views/section-5.html, views/section-6.html, views/section-7.html, views/section-8.html, views/section-9.html, views/section-blog.html, views/section-article.html, views/section-contact.html, views/footer.html
Source target/20230710

Live Preview

Open the example in a new tab

Page Sections

Section Description
Nav (views/nav.html) Sticky nav with links ?page=home/feature/service/pricing, a Pages dropdown (Blog, Article) and Contact; active item via :index="nav_index"; @click=tabShow toggles mobile menu.
Header (views/header.html) Eyebrow, headline, paragraph, GitHub / Email buttons (label from attr(txt)) and image/header.png. Home only.
Section 3 image/section-3.png beside 4 icon feature rows from :for over section_3 icon names.
Section 4 3 service cards with icon and inline SVG decoration (image/svg-1.svg).
Section 5 Text plus 4 app screenshots image/app0..3.png laid out by the [index] attribute (static index=0).
Section 6 (pricing) 3 plan cards (49 / 99 / 149 per year) with feature list and GET STARTED, :bg-image background and svg-2 decoration.
Section 7 (carousel) 6 cards slider with 4 indicator dots; clicking a dot sets [index] to slide via margin-left.
Section 8 CTA text with GitHub / Email buttons, image/section-8.png with a looping section-8 keyframe animation, svg-2 decoration.
Section 9 Final CTA heading with buttons over a placeholder image.
Blog (?page=blog) 5 post cards with date badge, tags and comment count, static pagination; sidebar with search, category, recent posts, tags, newsletter.
Article (?page=article) Cover, title, meta, section.md filled by PDMarkdownKit viewer, like/share bar, prev/next, author box, comments from :for with a nested reply via :if, same sidebar.
Contact (?page=contact) Google Maps iframe, message form (no handler) and address / email / GitHub / LinkedIn cards.
Footer (views/footer.html) Brand blurb, Quick Link and Support lists, newsletter input, copyright and social icons.

Interactions

Dependencies

Styling

Item Value
SCSS entry sass/index.scss
Output CSS css/index.css
Partials _nav.scss, _footer.scss, _header.scss, _section-3.scss, _section-4.scss, _section-5.scss, _section-6.scss, _section-7.scss, _section-8.scss, _section-9.scss, animation/_rotate.scss

index.scss (873 lines): :root safe-area env() vars, reset, body scroll container, and inline styles for #section-contact and #section-blog (shared by blog and article: cards, .md, .bottom, .page, .about, .comment, sidebar). Partials cover nav (@for [index] highlight, dropdown, mobile .show), header (attr(txt) buttons), sections 3-9 (_section-5 and _section-7 use @for [index] layouts, _section-8 has a section-8 keyframe), footer. animation/_rotate.scss is empty and not imported. Red rgba color vars are in an inline <style>.

cd target/20230710
npx sass sass/index.scss css/index.css --no-source-map || exit 1

Techniques

External Assets

中文