improve gen_gallery.py
- modified static resources link (-l flag)
- modified doc/gallery_template.html