add SPA main layout and template