I want to create a template for a book document class (not beamer) where the entire book is written in numbered frames. Below is an example from Kleppner and Ramsey's Quick Calculus showing Frames 25 and 26:
The closest answer I have found is by Yiannis Lazarides on https://tex.stackexchange.com/a/46593/234330. His full code is available on his Github page.
But as a LaTeX newbie, I do not know of an elegant and efficient way to create this as a template for an entire book. Any suggestions on how I can proceed or where I can read more about how to achieve this?

