basis.template: make work with resources like style more universal to support formats other than css