reworked python code to add css classes to blogitems, fixes #7