There is now an templating system implemented “using client-side Javascript”:http://trimpath.com/project/wiki/JavaScriptTemplates.
Normally this would be boring an tedious to contemplate, but, as Ian Holsman observes, combined with liberal use of XMLHttpRequest, this could be interesting.