fixed grid layout and jinja2 templating to correctly make pure-g divs