parametrise button padding so we can reuse the values
[#76106606] simplify event label style

Also move js templates out of layout