The browser object has a direct condition to check if the window is in landscape or portrait mode..
If you'd like you could go to different layouts if so, but you could ofcourse also create a game in such a way that some things in the layout are rearanged depending on orientation..