UPDATE - I added a second version with the hinges not going all the way through the cubes since this looks a bit…
Are you sure you want to continue?