move template code into index.html