Refactor template `index.html`.

Make it easier to use this template as the parent for other templates.