Home view mode toggle code