I prefer having one big template for a view, when doing SSR. Some layout components will have to be their own template if they repeat on different pages, depending on the template engine you can either pull other templates in directly (in which case using loops is also valid here IMO), or have a variable with a HTML blob generated from another template.
I don't really think either of those things count as code, because there's only logic that is relevant to how things are displayed. It's just, if the user has an avatar, show an image tag, otherwise, show a placeholder image/nothing. repeat this HTML once for each comment shown. That's not code in any meaningful way. I mean technically all of it is code, but you know what I mean.
Alan Kay (and his teammates during the STEPS project at VPRI) spent years and years thinking/experimenting with this, here's the final report from 2016: https://news.ycombinator.com/item?id=11686325
"The big breakthrough is making it easy to create new DSLs for any situation."
The template system is somewhat like the type system in that it provides you guarantees. The templates cannot mutate any data or pull anything in that you didn't provide to it. You can be 100% sure that no one did a cute little temporary hack modifying the data inside the template somewhere, pulled in some external data real quick on a friday afternoon or did anything else that doesn't belong in the template. That's the advantage over just using a regular programming language.
I’d be more than happy if a more powerful version of figma existed (capable of handling UI states). Then the designer would then hand the design files annotated with IDs to me, and then I could go on to implement logic. If we agree on some sort of contract for the UI, he can go play to his heart’s content with the Look and Feel.