rewrite layout to haml