Documentation

Moneybook

Mobile bookkeeping app mock built with PDRenderKit data binding: month calendar / pie view, side tab and add-record keypad calculator.

Overview

Item Value
Created 2023-04-18
Category App & Platform Examples
HTML files index.html
Source target/20230418

Live Preview

Open the example in a new tab

Page Sections

Section Description
Top bar (#nav) Menu button, {{ year }}年{{ month }}月 month-selector toggle, mode switch icon (pie / calendar via :if / :else)
Month selector (#month-selector) Year row with prev/next buttons and 12 month buttons rendered by :for (current month .sel)
Add button Floating + button opening the add-item panel
Calendar view (.index-calendar) Shown when mode == calendar: table with 週日-週六 header and week rows of day buttons built in JS (:for + :html)
Pie view (.index-pie) Default view: 月支出 / 月收入 values and CSS pie ring with percent="65" label
Record list (.index-list) Static day group 2023/04/18 with three expense rows; date and amounts printed from attributes
Side tab (#app-tab) Slide-in panel with avatar, name, mail link, GitHub/LinkedIn/Facebook/Instagram links and copyright
Add record panel (#add-item) Expense/income toggle, category grid from type_list (:for), description input, date row and 19-key calculator pad

Interactions

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.2.0 https://cdn.jsdelivr.net/npm/pdrenderkit@1.2.0/dist/PDRenderKit.js
Google Analytics (gtag.js) G-L5VYEZPVXX https://www.googletagmanager.com/gtag/js?id=G-L5VYEZPVXX
Page stylesheet (compiled SCSS) - ./css/index.css
Page script (type=module) - ./js/index.js

Styling

Item Value
SCSS entry sass/index.scss
Output CSS css/index.css

Single-file SCSS (no partials). :root vars --main-color, --content-max-width (480px), --num-pad-color, --num-pad-enter; fixed full-screen panels with backdrop-filter blur; @for 1..100 loop generates [percent=N] rotations for the two-half pie ring.

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

Techniques

External Assets

中文