avoid URL duplication in html

Previously, the html would contain two identical links (one in the code for vertical layout, one in the code for horizontal layout) with all the encoded state.