main: convert to class mode.

* web.conf: add option "app.menu.mode", to change menu layout.