add header and footer to gallery