Fix unclosed div tag (Fixes issue #5)
layout.html: move the conditional outside of the script tag