Overview#
Saltbox is a recipe and home-cooking blog, built as a WordPress block theme. The fictional cook, Odelia Theriot,
writes from her home kitchen in Lafayette, Louisiana, and three guest cooks from around Acadiana add their family
recipes: everyday Southern and Gulf Coast cooking, weeknight suppers, baking and preserving. Everything dated is
worked out in Central time (America/Chicago). The theme has a home page with the newest recipe, a dinner picker,
what's in season this month, the latest recipes and the next cooking class; a recipe index filtered by course,
diet, time and season; two long recipe stories (gumbo and fig preserve cake) with step drawings and comments; a
recipe page that shows any recipe; a seven-day meal planner with one shopping list; saved recipes; an about page;
cooking classes with a booking form; and a 404 page. It is version 1.0.0 (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/saltbox.
Headings, stories, lists, step drawings' captions, comments, the guest cooks, the reader questions and the calls
to action are core WordPress blocks arranged in block patterns, so you edit them in the block editor without
touching code. The parts that are worked out in the browser (the recipe cards with their scaler, unit switch,
checklists, timers and cook mode, the dinner picker, the in-season panel, the recipe lists, the recipe index, the
meal plan and shopping list, the saved recipes, the class list and the forms) work as in the HTML version: they are
Custom HTML blocks driven by assets/js/main.js, which reads the recipes and everything else from
assets/js/data.js. The drawings are Custom HTML blocks with inline SVG, or are drawn by the script. Colors and
fonts are design tokens in theme.json: change them in Appearance > Editor > Styles and the whole site follows.
Every upcoming date is worked out in Central time from rules rather than fixed dates, so the demo never goes stale.
The look is a warm kitchen table: rice-paper pages, gingham tablecloths, index-card recipe panels with cast-iron black outlines and offset shadows, Gulf teal and cayenne accents, and hand-lettered labels. There are no photos: every dish, ingredient, step, portrait and the kitchen are drawn. Headings are set in Yeseva One, body text in Alegreya Sans and the handwritten labels in Nothing You Could Do. The site is light only.
Quick start#
Requirements: WordPress 7.1 or newer and PHP 7.4 or newer. No plugins are needed.
- Download
saltbox.zipfrom freeframe.dev/templates/saltbox (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 Saltbox.
- Go to Appearance > Saltbox setup and click Create the demo pages. This creates the Home, Recipes, gumbo, fig cake, Recipe, Meal plan, Saved recipes, About and Cooking classes 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.
- 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 > Saltbox pages) made of section patterns. Every section is also offered on its own in the block inserter under Patterns > Saltbox.
| Page | Slug | Page pattern | Sections (pattern files in patterns/) |
|---|---|---|---|
| Home | / |
page-home.php |
home-hero (newest recipe), home-dinner (dinner picker), home-season (in season now), home-latest (six latest recipes), home-shortcuts (where to start), home-hello (about the cook, the next class and the Sunday letter) |
| Recipes | /recipes/ |
page-recipes.php |
recipes-hero, recipe-index (search, filters and the 18 recipe cards) |
| Gumbo | /gumbo/ |
page-gumbo.php |
gumbo-story (the story, roux colors, step drawings and the recipe card), gumbo-more (comments, comment form and related recipes), cook-mode |
| Fig cake | /fig-cake/ |
page-fig-cake.php |
fig-cake-story, fig-cake-more, cook-mode |
| Recipe | /recipe/ |
page-recipe.php |
recipe-hero, recipe-card, recipe-more, cook-mode; /recipe/?r=<id> shows any recipe in data.js |
| Meal plan | /plan/ |
page-plan.php |
plan-hero, meal-plan (the week and the shopping list) |
| Saved recipes | /saved/ |
page-saved.php |
saved-hero, saved-list (saved recipes and in-season suggestions) |
| About | /about/ |
page-about.php |
about-hero, about-story (with the kitchen drawing), about-how, about-guests, about-faq |
| Cooking classes | /classes/ |
page-classes.php |
classes-hero, class-dates (the next six classes and the booking form), classes-faq, letter (#letter) |
| 404 | any missing URL | templates/404.html |
404 |
The gumbo and fig cake stories are pages, not posts, because their recipe cards are drawn from data.js like every
other recipe. WordPress posts use templates/single.html; the blog, archives and search results use
templates/index.html, templates/archive.html and templates/search.html.
Project structure#
freeframe-saltbox/
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 scripts (with the script's strings and page URLs), editor
styles, theme color, meta descriptions and favicon, page titles,
pattern categories
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 > Saltbox 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/data.js Saltbox's content (window.SALTBOX): PEOPLE, RECIPES, ITEMS, AISLES,
SEASONAL, CLASS_TOPICS and more
assets/js/main.js every interaction (the HTML version's script plus a WordPress adapter)
assets/icons/ the icons used by Icon blocks (outline SVG paths)
assets/img/ logo.svg, favicon.svg and the social image
assets/fonts/ Yeseva One, Alegreya Sans and Nothing You Could Do, 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-saltbox.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-cayenne: var(--wp--preset--color--cayenne) in
src/theme.css), so changing Cayenne in Styles changes every button, heart, hand-lettered label and warning that
uses cayenne.
| Color | Value | Used for |
|---|---|---|
| Rice / Linen | #f8f3ea / #efe5d4 |
Page background / alternate sections and control bars |
| Card | #fffcf6 |
Recipe cards, panels and inputs |
| Ink, Ink soft, Muted | #26211c, #4a4038, #675b4f |
Text, outlines and offset shadows; secondary text; captions |
| Rule / Rule strong | #ddcfb8 / #8f806b |
Hairlines / input borders |
| Teal / Teal deep / Teal soft | #17595a / #0f4243 / #d8e9e5 |
Links, teal buttons, the date strip, gingham |
| Cayenne / Cayenne deep / Cayenne soft | #b23d1d / #8e2f15 / #f7dccf |
Hand-lettered labels, hearts, the main buttons, warnings |
| Butter / Butter soft | #f1c24b / #fbefc6 |
Highlights, date tags, the shopping-list header |
| Okra, Pecan | #5c7a34, #8a5a33 |
Drawings only |
Button text on teal and cayenne is Card (near white), so keep those colors dark. The logo (assets/img/logo.svg),
favicon.svg, og-image.svg, the offset shadows (#26211c) and the drawings in main.js use hex colors
directly; change them too if you rebrand.
The repeated pieces are classes in src/theme.css: .kicker, .h-display, .h-section, .lead, .link,
.meta, .tnum, .gingham, .recipe-card, .recipe-tile, .heart-btn, .chip, .seg, .filter-btn,
.timer, .choice and the form fields (.field, .field-label, .field-error, .field-hint). Add them to any
block under Advanced > Additional CSS class(es).
Typography#
Three 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:
- Yeseva One (
font-display: headings, the logo and numbers on cards; 400). - Alegreya Sans (
font-sans: body text, labels and buttons; 400, 500, 700 and italic 400). - Nothing You Could Do (
font-hand: the hand-lettered kickers and labels; 400).
Swap a family in Styles > Typography, or add your own fontFace files to theme.json.
Content#
Page copy (headings, the stories, the step captions, the comments, the guest cooks and the reader questions) is in
the pages: edit it in the block editor. Everything the script renders lives in assets/js/data.js on
window.SALTBOX, as in the HTML version:
| Constant | What it holds |
|---|---|
SITE |
Name, timeZone (America/Chicago), town, email addresses and phone |
PEOPLE |
The cook and the guest cooks: name, role, town and portrait settings (skin, hair, hairStyle, shirt, glasses) |
COURSES, DIETS |
Course and diet filters (main, stew, side, bread, dessert, preserve; vegetarian, gluten-free, dairy-free) |
TIMES |
Total-time buckets: quick (30 minutes or less), hour (31 to 60), long (more than an hour) |
SEASONS |
Winter (December to February), spring, summer and fall, by month |
AISLES, ITEMS |
Store aisles for the shopping list, and one catalog entry per thing you buy (name, plural, aisle, shop: false to leave it off) |
COUNT_UNITS |
Counted units and their plurals: clove, stalk, can, slice, ear, bunch, head |
RECIPES |
The 18 recipes, newest first (see below) |
PRODUCE, SEASONAL, MONTH_NOTES |
The drawn produce, the Louisiana produce calendar (six items per month) and a line per month |
CLASS_LEAD_DAYS, CLASS_COUNT, CLASS_SLOTS, CLASS_TOPICS |
Cooking classes: 3 days' notice, 6 listed, Thursday and Saturday times, the six topics with price and seats |
CLOSED_EVERY_YEAR, CLOSED_DAYS |
No classes on '12-24' and '12-31' every year, plus any 'YYYY-MM-DD' dates you add |
LETTER_WEEKDAY |
The day the Sunday letter goes out (0, Sunday) |
A recipe looks like this (shortened):
{
id: 'red-beans', short: 'Red beans', title: "Tante Clotilde's Monday Red Beans",
blurb: 'Red beans cooked down with smoked sausage and a ham hock until they turn creamy on their own.',
by: 'clotilde', date: '2026-02-09', course: 'stew', diets: ['gluten-free', 'dairy-free'],
months: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
times: { prep: 15, cook: 180 }, serves: 8, yield: ['serving', 'servings'], post: null, art: 'redbeans',
ingredients: [
{ k: 'red-beans', q: 1, u: 'lb', t: 'dried red kidney beans, soaked overnight' },
{ k: 'onion', q: 1, u: '', t: 'yellow onion{s}, chopped' },
{ k: 'garlic', q: 4, u: 'clove', t: 'garlic, minced', whole: true },
{ k: 'rice', q: null, u: '', t: 'Cooked long-grain white rice, for serving' }
],
steps: [
{ text: 'Cook the onion, bell pepper and celery in the drippings until soft, about 8 minutes.', timer: 8, label: 'Cook the trinity' },
{ text: 'Take out the bay leaves and serve over rice.' }
],
notes: ['Add the salt at the end; salty water early can keep the skins tough.'],
nutrition: { cal: 430, fat: 20, carbs: 36, protein: 26, sodium: 990 }
}Field notes:
- Quantities (
q) are written for the recipe's own yield (serves) in US units:uis'tsp','tbsp','cup','oz','lb', a counted unit fromCOUNT_UNITS, or''for things counted on their own (eggs, onions).q: nullmeans "as needed" and never scales.whole: truerounds a count to whole numbers. kis theITEMSkey that the shopping list merges on. Leave it out for things you don't buy (a pan coating).{ h: 'For the glaze' }iningredientsstarts a group with a heading.- Tokens in ingredient text and steps follow the US/metric switch:
{t:350}(350°F / 175°C),{in:10}(10-inch / 25-cm),{len:0.5}(1/2 inch / 1 cm),{qt:7}(7-quart / 6.5-liter). In ingredient text,{s}adds an "s" and{leaf|leaves}picks a word when the amount is more than 1. monthslists when it is in season (all 12 means all year, never "in season now").postis the full story page ('gumbo.html', which the script turns into your page's URL); withnull, cards link to/recipe/?r=<id>.artis a dish drawing fromDISHESinmain.js(section 5).nutritionis per serving (grams; sodium in milligrams).scaleNoteis shown when the servings change.
Example: add a recipe. Copy an entry in RECIPES, give it a unique id, by from PEOPLE, course from
COURSES, k values from ITEMS (add new catalog entries if needed) and an existing art key. The index,
filters, counts, search, dinner picker, seasonal panel, saved page and meal planner pick it up automatically, and
/recipe/?r=<id> shows its card. The filter counts in the recipe-index pattern and the "Browse all 18 recipes"
button on the home page are the text shown before the script runs; update them if you want them exact.
The script's links to the recipe page ("recipe.html?r=…"), the meal plan ("plan.html?add=…"), the recipe index
("recipes.html?course=…") and the classes ("classes.html?class=…") become your WordPress page URLs through
freeframe_saltbox_page_urls() in inc/setup.php. Edit data.js in a child theme (see
Child themes) so an update doesn't overwrite it.
Images and artwork#
All artwork is SVG drawn for this template; there are no photos. The header and footer logo is an Image block
(assets/img/logo.svg) next to the name: select it and Replace to use your own. The step drawings on the two
story pages, the roux colors, the kitchen scene on the about page and the 404 drawing are Custom HTML blocks with
inline SVG; replace a block with an Image block (keep roughly the same aspect ratio) when you have real pictures.
The dish drawings (DISHES), produce (PRODUCE_SHAPES) and portraits (portraitSvg, from the settings in
PEOPLE) are drawn by main.js into elements with data-dish="<art key>", data-produce="<id>" or
data-portrait="<person id>". If you use photos instead, dish drawings are 4:3 (200×150) and portraits are square,
shown in a circle.
The social image is assets/img/og-image.png (1200 x 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 a teal strip (from 768 px) with today's date (data-today) and what is in season
(data-season-short), both written by the script in Central time. Below it are 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": Recipes, Meal plan, Cook with me, About and
Saved recipes). "Saved recipes" has the class ff-mobile-only, so it shows in the phone menu only; on wide screens
the heart link next to the menu goes to the saved page and shows the saved count (data-saved-count). That link
and the menu button are small Custom HTML blocks. WordPress marks the current page's link with
aria-current="page"; on the recipe stories and the recipe page the script marks Recipes, as in the HTML version.
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 email and phone number appear in the footer and in data.js
(SITE); search for them when you change them.
The site is light only: inc/setup.php prints color-scheme: light and the theme color #f8f3ea, so form
controls, scroll bars and the browser bar match.
Features#
Recipe card#
Each recipe page has one card, built by renderCard in main.js (section 9) into
<div data-recipe-card="<id>"> (a Custom HTML block). On the two story pages the card is in <section id="recipe">, and the
"Jump to recipe" button near the top links to it and moves focus to the recipe title.
The card has the times (prep, cook, rest when there is one, total), the yield, and four buttons: "Save recipe",
"Cook mode", "Print recipe" and "Add to meal plan" (which opens /plan/?add=<id>, plus &s=<servings> when
you changed the servings).
Servings. The minus and plus buttons and the number box change the servings from 1 to 48 (MAX_SERVINGS).
Typing updates the card as you go; a value outside 1 to 48 shows "Enter a whole number from 1 to 48." and the
card keeps the last good number. "Back to 8" (the recipe's own yield) appears when you change it. The choice is
kept in the URL as ?servings=12, so a scaled recipe can be shared. A scaleNote (pan sizes for the cake) is
shown when the servings differ from the recipe.
How amounts scale and round. Volumes are added up in teaspoons, weights in ounces:
| Amount | US display | Example (gumbo for 8 → 12) |
|---|---|---|
| Under 1 Tbsp | Teaspoons to the nearest 1/4 (1/8 at the smallest) | 1 tsp salt → 1 1/2 tsp |
| 1 Tbsp to under 1/4 cup | Tablespoons, using 1/2 Tbsp when it lands on one, otherwise Tbsp + tsp | 2 tsp Creole seasoning → 1 Tbsp |
| 1/4 cup and up | Cups in quarters and thirds when within 1/2 tsp, half tablespoons under 1 cup, otherwise cups + the rest | 3/4 cup oil → 1 cup + 2 Tbsp |
| Weight | Ounces under 1 lb (half ounces under 1 oz), then pounds to the nearest 1/4 | 2 lb chicken → 3 lb |
| Counts | Nearest 1/2 (nearest 1/4 under 1); whole numbers for whole: true, never below 1 |
1 bell pepper → 1 1/2 |
So 3 tsp becomes 1 Tbsp, 4 tsp is "1 Tbsp + 1 tsp" and 16 Tbsp is "1 cup". Fractions are drawn with a raised numerator (1⁄2); copied text uses 1/2.
US and metric. The "Measurements" switch (US / Metric) converts every amount and every temperature, pan size
and length token in the steps. The choice is remembered (saltbox:units) and also applies to the shopping list.
Conversions: 1 tsp = 4.93 mL and 1 oz = 28.35 g. Rounding:
| Metric amount | Rounded to |
|---|---|
| Volume under 15 mL | The nearest 1 mL (at least 1 mL) |
| Volume from 15 mL | The nearest 5 mL; from 1,000 mL, liters to one decimal (2.8 L) |
| Weight | The nearest 5 g; from 1,000 g, kilograms to one decimal (1.4 kg) |
| Oven temperature | The nearest 5 °C (350°F → 175°C) |
| Pans and lengths | Whole centimeters (10-inch → 25-cm), millimeters under 1 cm |
| Pot size | Liters to the nearest 0.5 (7-quart → 6.5-liter) |
Dry ingredients stay in volume (mL) in metric, as they are measured with spoons and cups in the original.
Checklists. Each ingredient and step has a checkbox that strikes it through; "Uncheck all" clears the ingredients. Checks are not saved, so a recipe starts fresh each visit.
Step timers. Steps with a timer show a clock with "Start timer". It changes to "Pause", then "Resume";
"Reset" puts it back. Several timers can run at once. When one ends the clock shows "Done", the button reads
"Restart", and the polite live region says "Time is up: Brown the sausage (step 1)." Starting and pausing are
announced too ("Timer started: 8 minutes for Brown the sausage."). The progress bar has no animation, so reduced
motion needs nothing extra. Timers keep running while cook mode is open and closed.
Nutrition. The table shows per serving (per slice, per biscuit) and for the whole batch at the chosen servings; the batch column scales with the servings.
Print. "Print recipe" prints only the card (the story, comments and related recipes are marked
data-story and hidden), without buttons, checkboxes or timers. Printing the page from the browser menu prints
the story and the card without the header and footer.
Cook mode#
"Cook mode" opens a full-screen <dialog id="cook-mode"> with one large step at a time, starting at the first
step not yet checked on the card. "Previous step" and "Next step" (or the left and right arrow keys) move between
steps; on the last step the button reads "Finish" and closes it. Escape or "Leave cook mode" closes it and
returns focus to the button that opened it. Each step change is announced ("Step 2 of 6."). The step's timer is
in cook mode too, sharing its state with the card.
While cook mode is open the page asks the browser to keep the screen on with the Screen Wake Lock API, asks again when you come back to the tab, and releases it on close. The note in the dialog says what happened:
| Situation | Note |
|---|---|
| The screen will stay on | "Your screen will stay on while cook mode is open." |
| The browser has no Wake Lock API | "This browser can’t keep your screen on. Tap it now and then, or turn up the screen timeout while you cook." |
| The browser refused (battery saver, permissions) | "Your screen may still turn off: the browser didn’t allow it to stay on (battery saver can do this)." |
The texts are WAKE_TEXT in section 10 of main.js. Wake Lock only works on HTTPS or localhost.
Saved recipes#
Every recipe card in a list has a heart button (data-save="<id>", aria-pressed), and the recipe card has
"Save recipe". Saving adds the recipe to the front of saltbox:saved, updates the count in the header and is
announced ("Saved Creamy Pecan Pralines. 2 saved recipes."). the Saved recipes page lists them, newest saved first, with
the total ("2 saved recipes"), "Add to meal plan" and "Remove" on each; when the list is empty it shows "Nothing
saved yet", a "Browse recipes" link and three recipes in season now.
Recipe index#
The Recipes page (section 12) filters the 18 recipes by course (one at a time), diet (every chosen diet must match), total time bucket and season, and searches titles, blurbs, ingredients, courses, diets and cooks. The search ignores accents, so "etouffee" finds Crawfish Étouffée. Each filter button shows how many recipes it would leave with the other filters kept, the heading reads "18 recipes" (or "2 recipes matching “okra”"), and the season that is current shows a small "now". "Clear filters" and "Clear all filters" reset everything.
The state is kept in the URL, so filtered lists can be shared: ?course=main, ?diet=vegetarian,gluten-free,
?time=quick|hour|long, ?season=winter|spring|summer|fall, ?q=okra. Unknown values are ignored.
Dinner picker#
The home page's "What's for dinner tonight?" (section 13) picks from the mains and soups and stews. "How much time?" offers "Any amount", "30 minutes or less" and "Under an hour"; "Eating" offers "Anything", "Vegetarian", "Gluten-free" and "Dairy-free". Recipes in season this month come first, then the rest, newest first. The first idea shown depends on the day (the day number modulo the number of ideas), so it changes daily but is the same for every visitor; "Another idea" steps through the rest ("Idea 4 of 9"). When nothing matches it says so.
In season now#
The home page panel shows six items from SEASONAL for the current month in Central time, the month's line from
MONTH_NOTES, and the three newest recipes in season this month (not all-year ones), with a link to the season's
filtered index. The date strip names the first three items. Edit SEASONAL to change the calendar; produce keys
must exist in PRODUCE.
Meal plan and shopping list#
The Meal plan page (section 14) shows today and the next six days ("Today", "Tomorrow", then weekday names). Pick a recipe for a day and its servings (1 to 48, starting at the recipe's yield); the day links to the recipe at those servings. "Fill empty days from saved" puts saved recipes that aren't planned yet on empty days, in order; "Clear the week" empties it. Days that have passed drop off on their own and new days appear.
From a recipe card or the saved page, /plan/?add=<id>&s=<servings> puts the recipe on the first empty day and
says so ("Added Chicken and Andouille Gumbo to Sunday, December 6."), or says it is already planned or that the
week is full. The parameters are then removed from the URL.
The shopping list adds up every planned recipe's ingredients at its servings. The same ITEMS key is merged when
the amounts can be added: volumes together, weights together, and counts with the same unit (onions with onions,
cloves with cloves). An "as needed" item is left out when the same thing is also on the list with an amount.
Items are grouped by AISLES (Produce, Meat and seafood, Dairy and refrigerated, Bread and tortillas, Baking,
Pantry and cans, Spices and seasonings), sorted by name within an aisle, and show which recipes need them. The list
follows the US / Metric switch.
Each item has a checkbox, saved in saltbox:list; the header reads "15 items · 14 items left to buy" (or
"Everything is checked off"). "Uncheck all" clears the checks. "Copy list" copies the items not yet checked, grouped
by aisle, as plain text with the week's dates, and says "Copied 14 items to your clipboard." It uses the Clipboard
API with a fallback for older browsers, and says so if copying didn't work.
Cooking classes#
The Cooking classes page (section 16) lists the next six classes (CLASS_COUNT): Thursdays 6:00 to 8:30 p.m. and Saturdays
10:00 a.m. to 12:30 p.m. (CLASS_SLOTS), starting at least 3 days after today (CLASS_LEAD_DAYS). Classes skip
US federal holidays (both the holiday and the day it is observed), Christmas Eve and New Year's Eve
(CLOSED_EVERY_YEAR) and any CLOSED_DAYS. The topic rotates by week, and seats left come from a fixed formula,
so every visitor sees the same: see the comment at the top of section 16. "Save me a seat" on a class picks it in
the form. The home page shows the next class (data-next-class).
Example: on Sunday, December 6, 2026 the classes are Thursday, December 10 (Étouffée and Rice, the Weeknight Way, 1 seat left), Saturday, December 12, Thursday, December 17, Saturday, December 19, Saturday, December 26 and Saturday, January 2. Christmas Eve and New Year's Eve, both Thursdays, are skipped.
/classes/?class=YYYY-MM-DD picks a listed class and ?topic=roux|biscuits|etouffee|pralines|pickles|weeknight
picks the next class on that topic.
Comments#
The two story pages end with the blog's own comments from fictional readers (with "Made it" tags, not star
ratings) and a comment form, as in the HTML version. They are blocks and a Custom HTML form, not WordPress
comments: to use WordPress's comments instead, turn the stories into posts and add the Comments block to
templates/single.html. There are no ratings, review counts or review structured data.
Menu, header and motion#
The menu button (#menu-toggle) opens the phone menu with aria-expanded; Escape closes it and returns focus.
Sections with reveal fade in once as they scroll into view; with reduced motion they show immediately, and
scrolling to a chosen class is instant.
Keeping the demo current#
Nothing that reads as upcoming goes stale. Everything is computed from today in Central time (SITE.timeZone):
| Content | Rule | Where |
|---|---|---|
| Date strip and greeting ("Happy Sunday!") | Today | [data-today], [data-weekday] |
| In season now, dinner order | The current month | SEASONAL, MONTH_NOTES |
| Meal plan week | Today and the next six days | PLAN_DAYS in main.js |
| Class dates | Thursdays and Saturdays from 3 days out, skipping holidays | CLASS_*, CLOSED_* |
| Next Sunday letter | The first Sunday after today | LETTER_WEEKDAY |
| Copyright year | Today | written by PHP, filled again by the script |
Federal holidays are worked out for any year by rule (federalHolidays in section 3 of main.js): New Year's Day,
Martin Luther King Jr. Day, Washington's Birthday, Memorial Day, Juneteenth, Independence Day, Labor Day, Columbus
Day, Veterans Day, Thanksgiving and Christmas Day. A holiday on a Saturday is observed the Friday before, one on a
Sunday the Monday after.
Recipe dates and comments keep their real past dates. For reviews and screenshots, ?now=YYYY-MM-DDTHH:MM (read as
Central time) pretends it is another moment, for example /classes/?now=2026-12-23T10:00; turn it off with
ALLOW_NOW_PARAM = false at the top of main.js.
Block styles#
In the block settings' Styles panel:
| Block | Styles |
|---|---|
| Button | Default (the cayenne button), Ink (dark), Teal, Outline (an ink border on card) |
The class is-small on a Button block makes it the smaller size. The arrows after button text are drawn with CSS
(icon-after-arrow-right, icon-after-arrow-down, from src/icons.css). The reader questions on the about and
classes pages are Details blocks with the class ff-faq (ff-faq ff-faq-sm for the classes page's smaller ones),
which draws the circled plus sign that turns when a question is open.
Forms#
All forms validate in the browser with inline messages linked by aria-describedby, focus the first problem and
then show a success panel. A message clears as soon as the field is fixed. No form sends anything until you
connect it, and the success panels don't claim an email was sent.
| Form | Page | Checks | Success |
|---|---|---|---|
Class booking (data-class-form) |
Cooking classes | A class, seats (1 to 4, and no more than are left), first and last name, email format | "Thanks, {first name}. Your seat request is in.", the class, day and time, seats, the total due at the door, a reference like SB-4821 and the email |
Sunday letter (data-letter-form) |
Home, Cooking classes | First name, email format | "Thanks, {first name}. You're on the list." with the next letter's date |
Comment (data-comment-form) |
Gumbo, Fig cake | Name, email format, a comment of at least 10 characters (up to 1,000, counted) | "Thanks, {first name}. Your comment is waiting for Odelia to read it." |
Phone, allergies or notes and the "Send me the Sunday letter too" box on the booking form are optional. "Save a
seat in another class" and "Write another comment" bring the forms back. The chosen class is sent as classDate
(YYYY-MM-DD); the topic and time follow from the date.
To connect a form service such as Formspree, add the request inside setupForm in assets/js/main.js (section 15,
"Form helper", in a child theme), where it calls onSuccess, and show the success panel only when the service
answers OK:
fetch('https://formspree.io/f/your-id', { method: 'POST', body: new FormData(form), headers: { Accept: 'application/json' } })
.then(function (r) { if (r.ok) onSuccess(form); else showError(); });You can also replace a form's Custom HTML block with a form plugin's block; add the classes field-label, field
and btn-cayenne to its labels, fields and button so it matches.
Saved data (localStorage)#
All storage goes through safeStorage in main.js, which falls back to memory when localStorage is blocked
(private modes, sandboxed frames), so the features keep working for the visit.
| Key | Shape | Validation |
|---|---|---|
saltbox:saved |
["gumbo", "pralines"] |
Must be an array; only known recipe ids are kept, once each |
saltbox:plan |
{ "2026-12-08": { "r": "gumbo", "s": 8 } } |
Must be an object; only dates in this week's window with a known recipe are kept; s must be a whole number from 1 to 48, otherwise the recipe's yield is used |
saltbox:list |
{ "checked": ["onion|c:each", "flour|v"] } |
checked must be an array of item ids (<item key>|v, |w, |n or |c:<unit>); anything else is dropped |
saltbox:units |
"metric" |
Only metric is stored; anything else means US |
These are the HTML version's keys, read with own-property checks, so names like __proto__ are ignored.
"Remove" on the saved page, "Clear the week" and "Uncheck all" on the meal plan clear the data; you can also remove
the keys in the browser's developer tools (Application > Local Storage).
SEO and sharing#
Page titles come from WordPress: the page title, a vertical bar and the site name (for example "Meal plan and
shopping list | Saltbox"); the home page shows "Saltbox: Home cooking from a Lafayette, Louisiana kitchen", built
from the site title and tagline (Settings > General) by freeframe_saltbox_front_title(). The recipe page
updates its title for the recipe in ?r=. The theme prints the HTML version's meta description on the demo pages
(freeframe_saltbox_page_description() in inc/setup.php, by page slug); edit them there, or let an SEO plugin
such as Yoast SEO, Rank Math or The SEO Framework take over. The theme doesn't output Open Graph tags: give your SEO
plugin assets/img/og-image.png (or your own 1200 x 630 image) as the default social image. WordPress already
generates a sitemap at /wp-sitemap.xml.
There is no recipe structured data in the theme. If you add Recipe JSON-LD for real recipes, don't add ratings or
review counts unless they come from real reviews.
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, visible focus outlines, AA
contrast on the paper colors, scaling, unit changes, saves, filter results, timers, cook-mode steps and plan
changes announced in a polite live region (#live-region), filter, unit, dinner and save buttons with
aria-pressed, heart buttons labeled "Save {recipe title}", cook mode as a native <dialog> with keyboard support
and focus returned on close, Details blocks for the reader questions, drawings with role="img" and a description
(or hidden when decorative), form errors linked with aria-describedby, and reduced-motion support.
When you edit: keep one Heading 1 per page, give images alt text (or mark them decorative) and label every field you add.
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-saltbox, without node_modules/) and upload it in
Appearance > Themes, or copy the folder to wp-content/themes/ on your server. Use HTTPS (cook mode's screen
wake lock needs it), and connect the forms before you go live.
Translations#
The theme is translation-ready with the text domain freeframe-saltbox. All text in patterns, templates and PHP
goes through WordPress's translation functions; the script's own labels and messages (validation errors, the menu
button, the servings hint) are translated in PHP (freeframe_saltbox_script_strings() in inc/setup.php).
Sentences the script builds from pieces (dates, amounts, counts, announcements, timers) are written in English in
main.js; translate them there. The recipes in assets/js/data.js are edited there directly. Create a translation
with Loco Translate, or with WP-CLI and Poedit:
wp i18n make-pot wp-content/themes/freeframe-saltbox wp-content/themes/freeframe-saltbox/languages/freeframe-saltbox.potSave freeframe-saltbox-es_ES.mo (for example) in wp-content/languages/themes/ or in the theme's languages/
folder. Page content created by Saltbox 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 Saltbox is updated (your recipes in particular). Create
wp-content/themes/saltbox-child/style.css:
/*
Theme Name: Saltbox Child
Template: freeframe-saltbox
*/Templates, parts, patterns and theme.json in the child theme override the parent's files of the same name. To use
your own data.js, replace the parent's data script (freeframe-saltbox-data) under the same handle in the child's
functions.php:
add_action( 'wp_enqueue_scripts', function () {
wp_deregister_script( 'freeframe-saltbox-data' );
wp_register_script( 'freeframe-saltbox-data', get_stylesheet_directory_uri() . '/data.js', array(), '1.0', array( 'in_footer' => true, 'strategy' => 'defer' ) );
}, 25 );Do the same for assets/js/main.js (handle freeframe-saltbox), keeping the inline window.freeframeSaltbox
strings and URLs. 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 > Saltbox.
- Amounts show in metric. The switch is remembered in
saltbox:units. Click "US" on any card or the list. - A scaled amount looks rounded. Amounts are rounded to measures you can use in a kitchen (see the tables under Recipe card); a recipe at its own servings always shows exactly what is written.
- A planned dinner disappeared. The plan only keeps today and the next six days; past days drop off.
- Cook mode says the screen may turn off. Wake Lock needs HTTPS (or
localhost) and is refused in battery saver; serve the site over HTTPS. - A class day is missing. It is a federal holiday (or its observed day), Christmas Eve, New Year's Eve or in
CLOSED_DAYS. - Dates look a day off. Dates are computed in Central time; change
SITE.timeZoneindata.jsfor another home zone. Check for a leftover?now=in the URL. - A recipe card, "Add to meal plan" or a class link goes to the wrong page. The script links to
/recipe/,/plan/,/recipes/and/classes/. If you renamed the pages, change their URLs infreeframe_saltbox_page_urls()ininc/setup.php. - A form says it's sent but nothing arrives. The forms are not connected; see Forms.
- Saltbox 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 > Saltbox pages.
License#
Split license: the PHP code and block markup are licensed under the GNU GPL, version 2 or later, and the CSS,
JavaScript, images and design under the Freeframe Commercial License (unlimited sites for you and your
clients; no resale or redistribution as a theme). The full terms, with your licensee details, are in
LICENSE.txt and at https://freeframe.dev/license#commercial. Third-party components keep their own licenses.
Fonts: Yeseva One, Alegreya Sans and Nothing You Could Do are licensed under the SIL Open Font License 1.1
(OFL.txt in each folder of assets/fonts/). Saltbox, its cooks, readers and businesses are fictional.