Restructure html tempate

This allows an easier customization in an app depending on this one. It's now possible to only pick the resource part, without the whole template around.