split default into index, head, footer and javascript