separate view template from main.

Signed-off-by: Kouhei Maeda <mkouhei@palmtb.net>