Here's how it's done in PhpBB for contrast.
styles/yourthemename/template <-- the view files ( HTML ).
styles/yourthemename/theme <-- the CSS.
If you make another theme, it automatically pulls all the .html files from prosilver unless you have one in the template folder, so you don't have to 'fork' the default prosilver theme entirely, which is great for maintainability.
They're using the twig templating system from symfony which is easy enough to understand with a quick glance.
PhpBB however has no real ajax going on and is absolutely not a single page style app like this.
Not that you couldn't have a similar setup for a setup that uses javascript to dump written HTML on the screen, with some performance penalty for the sake of lowering the bar for theme creators.
That would take a lot of refactoring and rethinking though.