add displayPreview method on Page and Collection class on geneal.js and move specific script calls to index.html