first steps toward functional tests for layout and styling
refactor templates to share a base template