Commit 070b1ef1e037e32bba67fbd318030e6fe6a1de38
Format commit view nicer
Charles Lehner committed on 3/28/2016, 1:15:27 AMParent: ba35140393d2e15babd09d75d8ad132e431ba4cf
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -1043,11 +1043,10 @@ | ||
1043 | 1043 | repo.getCommitParsed(rev, function (err, commit) { |
1044 | 1044 | if (err) return cb(err) |
1045 | 1045 | var commitPath = [repo.id, 'commit', commit.id] |
1046 | 1046 | var treePath = [repo.id, 'tree', commit.tree] |
1047 | - cb(null, | |
1048 | - '<p><strong>' + link(commitPath, commit.title) + | |
1049 | - '</strong></p>' + | |
1047 | + cb(null, '<section class="collapse">' + | |
1048 | + '<strong>' + link(commitPath, commit.title) + '</strong>' + | |
1050 | 1049 | pre(commit.body) + |
1051 | 1050 | '<p>' + |
1052 | 1051 | (commit.separateAuthor ? escapeHTML(commit.author.name) + |
1053 | 1052 | ' authored on ' + commit.author.date.toLocaleString() + '<br>' |
@@ -1056,11 +1055,10 @@ | ||
1056 | 1055 | commit.committer.date.toLocaleString() + '</p>' + |
1057 | 1056 | '<p>' + commit.parents.map(function (id) { |
1058 | 1057 | return 'Parent: ' + link([repo.id, 'commit', id], id) |
1059 | 1058 | }).join('<br>') + '</p>' + |
1060 | - '<p>' + | |
1061 | - (commit.tree ? 'Tree: ' + link(treePath) : 'No tree') + | |
1062 | - '</p>') | |
1059 | + (commit.tree ? 'Tree: ' + link(treePath) : 'No tree') + | |
1060 | + '</section>') | |
1063 | 1061 | }) |
1064 | 1062 | }) |
1065 | 1063 | ])) |
1066 | 1064 | } |
Built with git-ssb-web