refactor mobile header, close #4579