[frontend] Reorganize DOM layout.