Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
eleventy-base-blog
A starter repository for a blog web site using the Eleventy static site generator.
-
nunjucks
A powerful templating engine with inheritance, asynchronous control, and more (jinja2 inspired)
If you end up resorting to javascript for this I recommend you use htmx
I'd also recommend to OP (and you if you're interested) to check out Twig. I find it a lot easier to learn and read than straight-up PHP.
I would do this with Eleventy which is a powerful static site generator with support for html partials (partial is what I call your toolbar here). You would use the template language nunjucks which Eleventy comes with support for, or you can choose plain html too if you don't want the Nunjucks capabilities for logic like if/else, for loops, javascript injection of dynamic values in your html at site generation time, etc. This repo shows most of the techniques you could need and use: https://github.com/11ty/eleventy-base-blog
Some years ago i hade the same problem as you. I used https://mozilla.github.io/nunjucks/ (Nunjucks) to solve my problem. Which was exactly what i needed. super easy to use. Made everything super structured and you can put everything into separate HTML files, and thereafter assemble it in one HTML file with simple commands.