Partial display of files with lots of lines

See !1722 (comment 606953)

For files with many lines we can do like GitLab and show a partial extract, like only the lines at the top and at the bottom, and a link to the raw version for the full display.