galleryGenerator code inserted to index.php

index page still needs more work on the css