Factor up common page stuff

The footer was duplicated between the two page templates, so that needed
to be factored out.