add theme support

add theme support

add `template` option:  Optional path to an HTML template. Defaults to a built-in template.