Moves layout containers into blocks

Since it's the same code and it's repeat everywhere it's easier to have
it on a template.