Can't you treat the part you're "distributing" - i.e. the client side html/css/js - as a separate part and open source only this?
But not sure if this kind of thing is really distribution. GPL* licenses were more oriented towards traditional compiled software and it is somewhat unclear with regard to nowadays prevalent web apps.
Many years ago, a Steves job asked Stallman this very question regarding a similar situation. Stallman initial thought it sounded legally sound, but since he is not a lawyer, he asked one.
The laywer replied judges would consider such schemes to be "subterfuges", and ask whether it was "really" one program with different labeled parts. Stallman sent a reply back to jobs, based on that recommendation from the lawyer.
Websites might feel very different from a technical point of view, but trying to do smart and tricky things with law always end up with the same question: How will a judge or jury view it. If I go to hackernews, do I get several "works" of JS, CSS, HTML, or is it a singular work with different labeled parts?
But not sure if this kind of thing is really distribution. GPL* licenses were more oriented towards traditional compiled software and it is somewhat unclear with regard to nowadays prevalent web apps.