Overview#
Tally is a marketing website for a SaaS or fintech product, built as a WordPress block theme: invoicing, expenses
and simple bookkeeping software for freelancers and small studios. The fictional company is Tally Software, Inc.,
on Ionia Avenue in Grand Rapids, Michigan, so prices are in US dollars, exclude sales tax, the copy uses American
spelling and times are Eastern (America/Detroit). The theme has a home page whose hero is a live invoice, a
features tour with tabs and a reminder email writer, pricing with a monthly or annual switch and a sales tax
toggle, a late-payment calculator with a time-saved estimate, an integrations directory, customer stories, a
security and trust page, a changelog, a demo request form and a 404 page. It is version 1.0.1 (see template.json
and style.css), works with WordPress 7.1 and PHP 7.4 or newer, and is the WordPress version of the HTML template
of the same name. See it live at freeframe.dev/templates/tally.
Headings, copy, lists, cards, plans, quotes, buttons and the questions are core WordPress blocks arranged in block
patterns, so you edit them in the block editor without touching code. The parts that work in the browser (the hero
invoice, the tour's tab buttons, the reminder writer, the billing switch, both calculators, the filter buttons and
search box, the sign-up and demo request forms and the office hours) are Custom HTML blocks driven by
assets/js/main.js, as in the HTML version, and so are the product mock-ups, charts and tables. Colors and fonts
are design tokens in theme.json: change them in Appearance > Editor > Styles and the whole site follows.
Money and tax copy in the theme is deliberately general ("not tax advice", no guaranteed savings). If you use it
for a real product, have your own figures and claims checked. The 6% sales tax in the hero invoice and the pricing
toggle is a sample: it is Michigan’s state rate, but what is taxable varies by state and by item. Set VAT_RATE and
the wording to what applies to you. Some internal names (VAT_RATE, data-vat, data-vat-toggle, the saved vat
value, #gdpr-title) keep the HTML version's spelling.
Quick start#
Requirements: WordPress 7.1 or newer and PHP 7.4 or newer. No plugins are needed.
- Download
tally.zipfrom freeframe.dev/templates/tally (the WordPress tab). - In your WordPress admin go to Appearance > Themes > Add New Theme > Upload Theme, choose the zip and click Install Now, then Activate. The theme is listed as Freeframe Tally.
- Go to Appearance > Tally setup and click Create the demo pages. This creates the Home, Features, Pricing, Late-payment calculator, Integrations, Customers, Security and trust, Changelog and Book a demo pages from the theme's page patterns, sets Home as the front page (Settings > Reading) and creates the header menu. Pages that already exist with the same slug are left alone, so it is safe to click it again.
- In Settings > General, set the tagline to "Invoicing and bookkeeping for freelancers and small studios" (or your own): the home page's browser title is the site title and the tagline.
- Visit your site. Edit any page in Pages, and the header, footer and templates in Appearance > Editor.
You can also try the theme without installing anything: the Try it in WordPress button on freeframe.dev opens it in WordPress Playground (WordPress running in your browser) with the demo pages already set up.
To work on the theme's files locally you need Node.js 24 and pnpm; WordPress itself runs in WordPress Playground, so there is no PHP, web server or database to install:
pnpm install
pnpm dev # builds the CSS, then starts WordPress with the theme at http://127.0.0.1:9400pnpm dev signs you in as admin (password password) and creates the demo pages. The site is rebuilt from
scratch every time you start it; your edits to theme files are live, edits made in the WordPress admin are not
kept.
Pages#
Each page is a page pattern (in Patterns > Tally pages) made of section patterns. Every section is also offered on its own in the block inserter under Patterns > Tally.
| Page | Slug | Page pattern | Sections (pattern files in patterns/) |
|---|---|---|---|
| Home | / |
page-home.php |
home-hero (live invoice), customer-logos, three-jobs, dashboard, getting-started, testimonials, tools, home-cta |
| Features | /features/ |
page-features.php |
features-hero, tour (tabs: #invoicing, #expenses, #books, #reports), reminder-writer (#reminders), more-features |
| Pricing | /pricing/ |
page-pricing.php |
pricing-hero (billing switch, sales tax toggle), plans (#plans), compare-plans (#compare), pricing-faq (#faq) |
| Late-payment calculator | /calculator/ |
page-calculator.php |
calculator-hero, late-payment, time-saved (#time-saved) |
| Integrations | /integrations/ |
page-integrations.php |
integrations-hero, directory (filters, search, 16 cards), bank-feeds, api |
| Customers | /customers/ |
page-customers.php |
customers-hero, featured-story, stories (filters, six stories), customers-cta |
| Security and trust | /security/ |
page-security.php |
security-hero, protection, privacy (sub-processor table), disclosure (questions) |
| Changelog | /changelog/ |
page-changelog.php |
changelog-hero, updates (filters, nine entries) |
| Book a demo | /contact/ |
page-contact.php |
contact-hero, demo-request (form, office hours, next steps, address) |
| 404 | any missing URL | templates/404.html |
404, 404-links |
WordPress posts use templates/single.html; the blog, archives and search results use templates/index.html,
templates/archive.html and templates/search.html. Keep the page slugs if you can: the header and footer link
to them, and the script recognizes them (see Navigation, header and footer).
Project structure#
freeframe-tally/
style.css theme header (name, version, requirements, license); no styles
theme.json design tokens: palette, fonts, font sizes, spacing, layout widths, button
functions.php loads the files in inc/
inc/setup.php stylesheet and script (with the script's strings and page URLs), editor
styles, theme color and favicon, page titles, the header menus, and the
markup blocks can't store (attributes, the definition list, the FAQ "+")
inc/icons.php registers assets/icons/*.svg for the Icon block
inc/icon-labels.php the icons' names shown in the editor
inc/block-styles.php button block styles
inc/site-setup.php Appearance > Tally setup: creates the demo pages and the menu
templates/ page.html (pages), page-with-title.html, single.html, index.html,
archive.html, search.html, 404.html
parts/ header.html and footer.html (they show the header and footer patterns)
patterns/ every section and page (PHP files with block markup)
assets/css/theme.css the compiled stylesheet (do not edit: built from src/)
assets/css/editor.css the same for the block editor (generated by src/editor-css.mjs)
assets/js/main.js every interaction and its settings (the HTML version's script)
assets/icons/ the icons used by Icon blocks (outline SVG paths)
assets/img/ logo.svg, logo-footer.svg, favicon.svg and the social image
assets/fonts/ Mona Sans and Azeret Mono, with their licenses
src/theme.css the Tailwind CSS source of assets/css/theme.css
src/icons.css icons drawn before or after text with CSS (generated)
src/editor-css.mjs writes assets/css/editor.css after each build
languages/ freeframe-tally.pot, the template for translations
blueprint.json WordPress Playground setup used by `pnpm dev`
screenshot.png the picture shown in Appearance > Themes
package.json the CSS build and the local WordPress (Node.js tooling)
readme.txt, README.md, DOCS.md, CHANGELOG.md, LICENSE.txtCustomizing#
Brand and colors#
The palette is in theme.json (settings.color.palette) and shows in Appearance > Editor > Styles > Colors.
The stylesheet maps every Tailwind color to these presets (--color-mint-400: var(--wp--preset--color--mint-400) in src/theme.css), so changing Mint 400 in Styles changes every fill that
uses mint-400.
| Color | Default | Used for |
|---|---|---|
| Paper | #f7f6f1 |
Page background |
| Paper 2 | #efede5 |
Alternate sections and table group rows |
| Line / Line strong | #dcd9ce / #c4c0b2 |
Hairlines, card and input borders |
| Ink / Ink 2 | #0d1f1b / #17302a |
Text, primary buttons, dark bands and footer / raised surfaces on them |
| Ink soft / Ink faint | #3c4a45 / #59655f |
Secondary text and captions (AA on paper and white) |
| Fog | #a9bab3 |
Secondary text on ink backgrounds |
| Mint 400 / Mint 500 | #45d99b / #1fc786 |
The accent: fills with ink text on top, chart bars |
| Mint 700 / Mint 800 | #0a6e4c / #08573d |
Accent text and links on light backgrounds |
| Mint 50, 100, 200, 300 | Tints: selected options, chips, focus halo, links on ink | |
| Amber, Rose and Sky (soft and ink) | Invoice status chips (due, late, sent) and form errors |
Keep Mint 700 and 800 dark enough for AA contrast on Paper. The logos (assets/img/logo.svg, logo-footer.svg),
favicon.svg, og-image.svg and the charts and marks inside Custom HTML blocks use hex values directly; search
for #45d99b and #0d1f1b to update them too.
The repeated pieces are classes in src/theme.css: .container-x, .eyebrow, .h-display, .h-section,
.h-card, .lead, .link, .card (with .card-lift and .card-hover), .rule, .chip (with .chip-paid,
.chip-sent, .chip-due, .chip-late, .chip-draft), .pill, .seg-group and .seg-btn, .tab, .faq, and
the form pieces (.label, .input, .hint, .check, .option, .range, .field-error). Add them to any block
under Advanced > Additional CSS class(es). on-ink on a dark band switches eyebrows, links and focus rings to
their light versions.
Typography#
Two families are bundled in assets/fonts/ and declared in theme.json (no requests to Google), the same files
Google Fonts serves to the HTML version:
- Mona Sans (
font-sans; a variable font, weights 300–800 and widths 75–125%) for everything. Headings usefont-stretch: 112%(set insrc/theme.cssforh1–h3), the logo 120%, and the whole body usesfont-variant-numeric: tabular-numsso figures line up in invoices and tables. - Azeret Mono (
font-mono; weights 400–600) for small labels (.eyebrow, invoice numbers, chart axes).
Swap a family in Styles > Typography, or add your own fontFace files to theme.json. If the new family has
no width axis, the font-stretch rules are simply ignored.
Content#
Page copy (headings, paragraphs, cards, plans, lists, quotes, the questions, the integration cards, the customer
stories and the changelog entries) is in the pages: edit it in the block editor. The settings the script uses sit
at the top of assets/js/main.js (section 1), as in the HTML version:
| Constant | What it holds |
|---|---|
LOCALE, CURRENCY |
'en-US' and 'USD', used by money() to format every amount |
VAT_RATE |
0.06, the sample sales tax rate used by the hero invoice and the pricing tax toggle |
PLANS |
solo, studio, practice: name, monthly (per month) and annual (per year) prices in US dollars, excluding sales tax |
BILLING_PERIODS, DEFAULT_BILLING |
Accepted billing values and the default ('annual') |
STORAGE_KEYS |
localStorage key names (see Saved data) |
INVOICE_DEMO |
Quantity limits (1–9), stage names and the notes under the hero invoice |
INVOICE_DUE |
Due date of the sample invoice INV-0142 ('YYYY-MM-DD'). null (the default) is a rolling demo date |
LAST_TEST |
Month of the last independent security test ('August 2026'). null (the default) is a rolling demo date |
REMINDER_SAMPLE, REMINDER_TONES |
Sample values and the reminder emails per tone (friendly, neutral, firm) and stage (before, due, late) |
LATE_PAYMENT |
Points added to the rate entered (margin: 0), days in a year and the flat late-fee tiers (compensation) |
TIME_ASSUMPTIONS |
Minutes per invoice with Tally (4) and the reduction in chasing (0.8) |
CALC_FIELDS |
Default, minimum and maximum for every calculator input |
CALC_URL_PARAMS |
Calculator fields read from and written to the URL (amount, days) |
INTEGRATION_CATEGORIES |
Category keys accepted from /integrations/?category= |
OFFICE |
Office hours on the Book a demo page: timeZone: 'America/Detroit', weekdays 1–5, 9 a.m. to 5:30 p.m. |
Edit main.js in a child theme (see Child themes) so an update doesn't overwrite it.
Changing a price. Edit PLANS, and the starting values written in the plan cards of the Pricing page (the
plans pattern shows the annual prices before the script runs). Annual is ten months for twelve, so keep annual = monthly × 10 if you want the "2 months free" label and the FAQ to stay true:
const PLANS = {
solo: { name: __('Solo'), monthly: 12, annual: 120 },
studio: { name: __('Studio'), monthly: 30, annual: 300 },
practice: { name: __('Practice'), monthly: 60, annual: 600 }
};Each plan card is a Group block with the class ffd-plan--solo (or studio, practice), which the theme serves
as data-plan="solo"; the price, its unit, the "Billed…" line and the saving are the elements marked data-price,
data-price-unit, data-billed and data-saving inside it.
Adding an integration. On the Integrations page, duplicate one card in the list (a list item Group holding the
card): it carries the classes ffd-integration and ffd-category--banking, which the theme serves as
data-integration and data-category="banking". Change the category to one of the INTEGRATION_CATEGORIES keys
(banking, payments, time, documents, accountants, automation), edit the mark's letters and color in its
Custom HTML block, and update the counts written in the filter buttons (the Custom HTML block above the list). A
new category needs a button there (<button class="pill" data-filter="your-key">) and a key in
INTEGRATION_CATEGORIES. Customer stories and changelog entries work the same way, with their own buttons.
Hero invoice lines. In the home-hero pattern's Custom HTML block, each row of #invoice-demo has data-line
and data-price (unit price excluding sales tax). Edit the name, price and starting quantity there; totals are
recalculated on load.
Attributes kept as classes. Blocks store classes, not data-*, role, tabindex or aria-* attributes, so
the patterns write them as classes and freeframe_tally_block_attributes() in inc/setup.php turns them back when
a block is rendered: ffd-category--banking becomes data-category="banking", ffd-results an empty
data-results, ffa-aria-live--polite becomes aria-live="polite" and ff-hidden the hidden attribute (an
underscore in a value is a space). Keep those classes when you edit a block's Additional CSS class(es).
Images and artwork#
There are no photos. The header and footer logos (assets/img/logo.svg and logo-footer.svg) are inline images
inside the home link, beside the name: select the image in the header or footer pattern and Replace it, or
replace the two files. The customer wordmarks, integration marks, avatars and charts are
inline SVG and the invoice, dashboard, receipts and other product mock-ups are HTML, all in Custom HTML blocks;
replace a block with an Image block (keep roughly the same aspect ratio) when you have real screenshots. If you
replace an avatar with a photo, keep it square (40×40 on the home page, 56×56 on the Book a demo page). The check
marks on the plans and the arrows on the home page's two link cards are Icon blocks from the theme's own
collection (Icon block > Tally); the six security drawings are small Custom HTML blocks.
The social image is assets/img/og-image.png (1200 × 630, source og-image.svg); the favicon
assets/img/favicon.svg is used until you set a Site Icon in Settings > General.
Navigation, header and footer#
The header and footer are template parts (parts/header.html, parts/footer.html) showing the header and
footer patterns. Edit them in Appearance > Editor > Patterns > Header / Footer.
The header has two Navigation blocks showing the same menu: the desktop one (from 1024 px) and the one in the phone
menu. Edit the menu once in Appearance > Editor > Navigation (the setup creates "Main menu": Features, Pricing,
Calculator, Integrations, Customers, Security and Changelog). A link with the class ff-mobile-only (Changelog)
is left out of the desktop menu, as in the HTML version; freeframe_tally_header_menus() in inc/setup.php does
that and adds the arrow at the end of each phone menu link. WordPress marks the current page's link with
aria-current="page" (drawn as a mint bar under it), and the "Book a demo" buttons, which have the class
ff-current-link, are marked the same way on that page. A Navigation block that doesn't point at a menu shows the
most recently created one; to pin a menu, select the Navigation block and choose it in the block settings, for both
blocks.
The footer's link columns are List blocks: click a link to change it, press Enter to add one. The copyright year is
written by PHP and kept current by the script. The header and footer link to the demo pages by their slugs
(/pricing/#plans, /contact/, /calculator/#time-saved); change the links if you rename a page.
<body> carries the page's name as in the HTML version (data-page="home", "pricing", "404"), written by
freeframe_tally_body_page(); nothing in the theme depends on it, but it is handy for your own CSS.
Features#
Hero invoice demo#
Home page, #invoice-demo in the home-hero pattern; code in initInvoiceDemo() (section 4 of main.js). The
minus and plus buttons change a line's quantity between INVOICE_DEMO.minQty and maxQty; the subtotal, sales
tax (VAT_RATE, rounded to the cent) and total update and the total briefly flashes. Simulate payment moves
the invoice from Viewed to Paid: the chip turns green, the progress track completes, a "Payment received" card
appears and the quantities lock. The button then reads Reset demo. With the starting quantities the total is
$5,766.40 ($5,440.00 + $326.40 sales tax). Changes are announced in a polite live region; the progress list marks
the current stage with aria-current="step".
Product tour tabs#
Features page (tour pattern); initTabs() (section 5). Standard ARIA tabs: arrow keys, Home and End move between
tabs. The tab buttons are one Custom HTML block; each panel is a Group block whose anchor is its id (invoicing,
expenses, books, reports), so /features/#expenses opens that tab (only ids of the tab panels are accepted).
The links at the top of the page (data-tab-link) select a tab and scroll to it. Without JavaScript every panel is
visible. To rename a tab, change the button's text in the Custom HTML block; to add one, add a button
(role="tab", aria-controls="your-id") and a panel Group with that anchor and the classes
ffa-role--tabpanel ffa-aria-labelledby--tab-your-id ffa-tabindex--0.
Reminder writer#
Features page, #reminders; initReminders() (section 6). Tone buttons (data-tone, aria-pressed) and stage
radios (name="reminder-stage") choose one of the nine emails in REMINDER_TONES; {invoice}, {amount},
{due}, {dueDay} and {client} are filled from REMINDER_SAMPLE; {due} ("Friday, October 30") and
{dueDay} ("Friday") come from INVOICE_DUE, like the "Due" date on the hero invoice (time[data-invoice-due]).
The preview card is a polite live region.
Pricing switch and sales tax toggle#
Pricing page; initPricing() (section 7). The billing buttons (data-billing) show either the monthly price or
the annual price divided by twelve, with "Billed $300 yearly" or "Billed monthly" underneath. The saving is
monthly × 12 − annual per plan: $24, $60 and $120 a year. The checkbox data-vat-toggle multiplies everything by
1 + VAT_RATE (Studio monthly becomes $31.80) and changes the tax note. Whole dollar amounts drop the cents
(money(n, true)). The choice is saved (see below) and ?billing=monthly or ?billing=annual in the URL
overrides it; clicking a billing button updates the URL. A status line announces the change to screen readers. The
comparison table header is sticky below the site header. The questions under it are Details blocks with the class
faq; the first one is open (Open by default in the block's settings).
Late-payment calculator#
Late-payment calculator page; initCalculators() and lateClaim() (section 8). Inputs: amount ($1 to $1,000,000),
days overdue (1 to 365, a slider) and the annual interest rate in your terms (0 to 36%). The US has no single
late-payment rate for businesses, so the calculator uses what the visitor’s own terms say. The rules:
- annual rate = rate entered +
LATE_PAYMENT.margin(0 points); - interest = amount × annual rate ÷ 100 × days ÷ 365, rounded to the cent;
- flat late fee (an example; set your own in
LATE_PAYMENT.compensation) = $25 under $1,000, $50 from $1,000 to under $10,000, $100 from $10,000.
With the defaults ($2,400, 45 days, 12%) the result is $85.51: 12.00%, $35.51 interest, $0.79 a day, $50 late fee.
/calculator/?amount=12000&days=1 gives $103.95. The chart is drawn in drawChart() as inline SVG: the late fee
as a flat band, interest on top, a marker at the chosen day, over 90 days or the next multiple of 30. Its text
description (data-chart-desc) is rewritten each time. An out-of-range number marks its input aria-invalid and
turns its hint red, and the figures keep using the field's last valid value, so they always match the slider and
each other. When a change to the amount or the days is finished (on leaving the field or releasing the slider) the
URL follows, with the value the figures show, so the page can be shared as a link. Reset to the example
restores the defaults, clears the saved values and removes the URL parameters. Change the default rate in
CALC_FIELDS.rate.def and in the form's Custom HTML block to match your own terms; state limits vary, so check
them first.
Time-saved estimate#
Late-payment calculator page, #time-saved; renderTime() in section 8. Minutes today = invoices × minutes per
invoice + late invoices × chasing minutes. With Tally = invoices × TIME_ASSUMPTIONS.minutesPerInvoice + late
invoices × chasing × (1 − chaseReduction). The defaults give 6.7 hours today, 1.3 hours with Tally and 5.4 hours
saved, worth $322 at $60 an hour. Hours read "1 hour" or "2.5 hours".
Filters and search#
Integrations, Customers and Changelog pages; initFilters() (section 9). Each section served with
data-directory has filter buttons (data-filter, aria-pressed), items (data-integration with
data-category), an optional search box (data-search, matches the item's text), a live count
(data-result-count, with data-noun/data-nouns for "1 story" / "6 stories") and an empty state (data-empty)
with a clear button. On the Integrations page data-url-param="category" reads ?category=banking (checked
against INTEGRATION_CATEGORIES with an own-key check) and keeps the URL in step with the buttons.
Rolling demo dates#
Two dates are worked out from today so the demo never looks out of date. Set either constant in section 1 of
main.js to show a fixed date on a real site.
| Constant | Shown in | Rule while null |
Fixed value |
|---|---|---|---|
INVOICE_DUE |
time[data-invoice-due] on the hero invoice, {due} and {dueDay} in the reminder writer |
The Friday 7 to 13 days from today | '2026-10-30' |
LAST_TEST |
Every [data-test-month] on the Security and trust page (key facts and the first answer) |
The most recent August that is over: August of this year from September on, otherwise last year's | 'August 2026' |
The copyright year in the footer ([data-year]) is written by PHP and set again by the script, so it is always the
current year. Changelog entries, customer figures and the survey year are history and keep their real dates.
Office hours#
Book a demo page; officeState() and initOfficeHours() (section 10). The time is worked out in
OFFICE.timeZone (America/Detroit) whatever the visitor's time zone, and refreshed every minute. Inside
Monday–Friday, 9 a.m. to 5:30 p.m., it reads "It’s 10:42 a.m. in Grand Rapids and we’re in the office"; outside, it
says when the team replies ("after 9 a.m. this morning", "tomorrow" or "on Monday").
Header, menu, reveals and back to top#
The header gains a shadow once you scroll. Below 1024 px a menu button (#menu-toggle, aria-expanded,
aria-controls) opens the phone menu; Esc closes it. Elements with .reveal fade in when scrolled into view (off
with reduced motion). data-count numbers count up once. The back-to-top button is a separate block at the end of
main.js; delete it and the .back-to-top styles in src/theme.css to remove it.
Block styles#
In the block settings' Styles panel:
| Block | Styles |
|---|---|
| Button | Fill (default, the ink button), Mint, Ghost (outlined, white), Ghost (on ink), Outline (on mint) |
The arrow after a button's text is drawn with CSS (icon-after-arrow-right, from src/icons.css). The classes
is-large and is-small on a Button block make it the large or small size (the HTML version's btn-lg and
btn-sm).
Forms#
Two forms, validated in section 10 of main.js (validate(), setFieldError()), with errors shown under each
field, linked with aria-describedby and aria-invalid, and focus moved to the first problem. After the first
submit, fields re-validate as they are fixed. An error's id is the field's id plus -error; a radio group's
<fieldset data-required-group> names its error with data-error-id (d-size-error). When a field shares a row
with a button (the footer sign-up), the row is marked data-field-row and the error goes under the row.
Neither form sends anything until you connect it.
| Form | Where | Validates |
|---|---|---|
Newsletter (data-form="newsletter") |
Footer of every page (footer pattern) |
Email required and well formed |
Demo request (data-form="demo") |
Book a demo page (demo-request pattern) |
Name, work email, team size (radio group) and consent required; message up to 500 characters with a counter |
/contact/?plan=studio (or solo, practice) preselects the plan; the plan buttons on the Pricing page link
there. On success each form is replaced by an in-world confirmation: the newsletter asks the visitor to look out
for a confirmation email, and the demo request thanks them by first name, says Noelle will email times for a call
(within two business hours, as the office-hours note promises) and shows a short reference (TA- and four
characters, made in the browser by makeRef(); use your form service's own reference instead if it returns one).
Its link to the calculator uses the page URL from freeframe_tally_page_urls() in inc/setup.php.
To connect a form service such as Formspree, replace the successSwap(...) call in initForms() in
assets/js/main.js (in a child theme):
onValidSubmit(form, () => {
fetch('https://formspree.io/f/your-id', {
method: 'POST',
body: new FormData(form),
headers: { Accept: 'application/json' }
}).then((r) => {
if (r.ok) successSwap(form, '<p class="font-semibold">Thanks, we’ll be in touch.</p>');
else form.querySelector('[data-form-status]').textContent = 'Something went wrong. Please try again.';
});
});You can also replace a form's Custom HTML block with a form plugin's block; add the classes label, input and
btn-primary to its labels, fields and button so it matches.
Saved data (localStorage)#
All access goes through one safeStorage object in main.js: localStorage when available, an in-memory stand-in
when the browser blocks it (sandboxed iframes, strict privacy settings), so features keep working for the page
view.
| Key | Shape | Validation on read |
|---|---|---|
tally:pricing |
{ "billing": "annual", "vat": false } |
billing must be an own key of BILLING_PERIODS, vat a boolean; anything else falls back to annual without sales tax |
tally:calculator |
{ "amount": 2400, "days": 45, "rate": 12, "invoices": 12, "minutes": 20, "late": 30, "chase": 45, "hourly": 60 } |
Each field must be an own key of CALC_FIELDS and a number within its range; invalid fields keep their defaults |
These are the HTML version's keys. URL parameters win over saved values: /pricing/?billing=,
/calculator/?amount=&days=. Other URL parameters are /integrations/?category= and /contact/?plan=; every one
is checked with Object.prototype.hasOwnProperty.call(...) or a range check, so values like ?plan=constructor
are ignored.
After Back, browsers put form controls back the way the visitor left them, which is not always what the address
and saved data say. afterRestore() in section 2 of main.js then sets the reminder stage, the sales tax box
and the calculator fields back to what the page shows, and counts the restored message on the contact page
again. The forms that are sent keep what the browser restores.
To reset, use Reset to the example on the calculator, or run localStorage.removeItem('tally:pricing') in the
browser console. To stop saving, remove the store.set(...) calls in sections 7 and 8.
SEO and sharing#
Page titles come from WordPress, with an em dash between their parts as in the HTML version. A page's title is
followed by the site title ("Late-payment calculator — Tally"), or by the ending listed for its slug in
freeframe_tally_title_endings() in inc/setup.php ("Features — Tally invoicing, expenses and bookkeeping",
"Changelog — What’s new in Tally"); edit or empty that list for your own pages. The home page shows the site title
and the tagline (Settings > General). The theme doesn't output meta descriptions or Open Graph tags; use an SEO
plugin such as Yoast SEO, Rank Math or The SEO Framework, and give it assets/img/og-image.png (or your own 1200 ×
630 image) as the default social image. WordPress already generates a sitemap at /wp-sitemap.xml. There is no
structured data; SoftwareApplication with offers is a good fit for a product like this.
Accessibility#
Built in: a skip link to the main content (added by WordPress, styled by the theme), landmarks (header, labeled
navigation, main, footer), one h1 per page, sections labeled by their headings (aria-labelledby), visible
focus outlines in the accent color, AA contrast on every surface, ARIA tabs, pressed buttons for filters and
billing, aria-current for navigation and the invoice stage, live regions for totals, counts, calculator results
and the pricing status, form errors linked with aria-describedby, charts with text alternatives (aria-label or
a <desc> that is updated with the numbers), tables with captions and header scopes, and reduced-motion support
(reveals, chart animation, count-up and smooth scrolling are off). The home page's figures are a real definition
list: the Group block with the class ff-dl is served as <dl> with <dt> and <dd>.
When you edit: keep one Heading 1 per page, label every field you add, keep body text at the Ink soft color or
darker, and make sure every aria-controls, aria-labelledby and aria-describedby points at an id (a block's
HTML anchor) that exists.
Building and deploying#
You only need this if you change the theme's files. The stylesheet assets/css/theme.css is compiled with
Tailwind CSS from src/theme.css and the classes used in patterns/, parts/, templates/, inc/ and
assets/js/:
pnpm install
pnpm build # compile assets/css/theme.css and assets/css/editor.css
pnpm watch # recompile assets/css/theme.css on every change (run pnpm build before you commit)Run pnpm build after adding a utility class to a pattern, template or the script's markup, otherwise the class
has no style; keep each class name whole in the script (not built from pieces). Classes you type in the editor's
Additional CSS class(es) field are only styled if the stylesheet already contains them.
To deploy, zip the theme folder (named freeframe-tally, without node_modules/) and upload it in Appearance >
Themes, or copy the folder to wp-content/themes/ on your server. Use HTTPS, and connect the forms before you go
live.
Translations#
The theme is translation-ready with the text domain freeframe-tally. All text in patterns, templates and PHP goes
through WordPress's translation functions, and so do the script's strings (invoice notes, reminder emails, prices,
calculator results, validation messages, the menu button), which are translated in PHP
(freeframe_tally_script_strings() in inc/setup.php) and passed to main.js. Amounts and dates are formatted
for en-US (LOCALE in main.js). Create a translation with Loco Translate, or with WP-CLI and Poedit:
wp i18n make-pot wp-content/themes/freeframe-tally wp-content/themes/freeframe-tally/languages/freeframe-tally.potSave freeframe-tally-es_ES.mo (for example) in wp-content/languages/themes/ or in the theme's languages/
folder. Page content created by Tally setup is copied into your pages in the site's language at that moment;
translate it in the editor like any other content.
Child themes#
Use a child theme for changes you want to keep when Tally is updated (your plans, tax rate and reminder emails in
particular). Create wp-content/themes/tally-child/style.css:
/*
Theme Name: Tally Child
Template: freeframe-tally
*/Templates, parts, patterns and theme.json in the child theme override the parent's files of the same name. To use
your own copy of main.js, replace the parent's script under the same handle in the child's functions.php,
keeping its strings and URLs:
add_action( 'wp_enqueue_scripts', function () {
wp_deregister_script( 'freeframe-tally' );
wp_register_script( 'freeframe-tally', get_stylesheet_directory_uri() . '/main.js', array(), '1.0', array( 'in_footer' => true, 'strategy' => 'defer' ) );
wp_add_inline_script( 'freeframe-tally', 'window.freeframeTally = ' . wp_json_encode( array( 'l10n' => freeframe_tally_script_strings(), 'pages' => freeframe_tally_page_urls() ) ) . ';', 'before' );
wp_enqueue_script( 'freeframe-tally' );
}, 25 );The parent's stylesheet only contains the classes the parent uses: if your child theme uses new utility classes,
compile a stylesheet for the child (copy package.json and src/theme.css, point the @source lines at the
child's folders) and enqueue it.
Troubleshooting#
- The pages look unstyled or new classes do nothing. The stylesheet only contains classes it found when it was
built. Run
pnpm buildafter editing patterns, then reload. - "This block contains unexpected or invalid content". A pattern or page was edited by hand with markup that doesn't match the block. Click Attempt recovery, or re-insert the section from Patterns > Tally.
- A filter, the tabs or the prices stopped working after an edit. A class such as
ffd-plan--solo,ffd-integrationorffa-role--tabpanelwas removed from a block's Additional CSS class(es). Put it back (see Content), or re-insert the section. - Prices on the cards are wrong before the page finishes loading. The pattern shows the annual prices; update
them in the Pricing page as well as in
PLANS. - Prices or the calculator don't remember choices. The browser is blocking storage (private mode or a sandboxed preview), so choices last only for the page view. That's expected.
- A shared pricing link opens on the wrong period.
?billing=overrides the saved choice; remove it from the link. - The office hours text looks wrong. It uses Eastern time (
OFFICE.timeZone); change the time zone and hours inOFFICEfor another location. - The browser title of a page has the wrong ending. Endings are listed by page slug in
freeframe_tally_title_endings()ininc/setup.php. - A form says "received" but nothing arrives. The demo forms are not connected; see Forms.
- Tally setup says the pages exist, but they are empty. It never overwrites existing pages. Delete (and empty the trash of) the pages with those slugs, or open each page and insert its page pattern from Patterns > Tally pages.
License#
MIT, which is compatible with the GPL that WordPress requires. See LICENSE.txt in the theme folder.
The code and all included artwork are free for personal and commercial use.
Fonts: Mona Sans and Azeret Mono are licensed under the SIL Open Font License 1.1 (OFL.txt in each folder of
assets/fonts/).
Tally, Tally Software, Inc. and every business, person and integration named in the theme are fictional placeholders; the customer wordmarks and integration marks are original drawings, not real logos.