that's some simple html, css and javascript + some server side script.
The preview image has an url path that gets updated on layout changes by js.
that url seems to call some server side script that generates that image on the fly.
could be done in several ways, but above seems to be how that page handels it