add configurable layout

- support loading layout from json