move common html to layout files

There are probably other ways to reduce the repeated html in the two layouts, or to just use one layout, but this works for now.