lib/repos/index.jsView |
---|
40 | 40 … | pull.once('<table' + (props ? ' ' + props : '') + '>'), |
41 | 41 … | pull( |
42 | 42 … | read, |
43 | 43 … | pull.map(function (row) { |
44 | | - return row ? '<tr>' + row.map(function (cell) { |
45 | | - return '<td>' + cell + '</td>' |
| 44 … | + return row ? '<tr>' + row.map(function (cell, i) { |
| 45 … | + var className = (i > 0) ? 'w-100' : '' |
| 46 … | + return '<td class="' + className + '">' + cell + '</td>' |
46 | 47 … | }).join('') + '</tr>' : '' |
47 | 48 … | }) |
48 | 49 … | ), |
49 | 50 … | pull.once('</table>') |
184 | 185 … | pull.once( |
185 | 186 … | '<div class="repo-title">' + |
186 | 187 … | html` |
187 | 188 … | <form class="right-bar" action="" method="post"> |
188 | | - <button class="btn" name="action" value="vote" |
| 189 … | + <button class="btn" name="action" value="vote" |
189 | 190 … | ${isPublic ? 'disabled="disabled"' : 'type="submit"'} |
190 | 191 … | > |
191 | 192 … | <i>✌</i> |
192 | 193 … | ${req._t(!isPublic && upvoted ? 'Undig' : 'Dig')} |
197 | 198 … | <input type="hidden" name="value" value=${upvoted ? '0' : '1'} /> |
198 | 199 … | <input type="hidden" name="id" value=${u.escape(repo.id)} /> |
199 | 200 … | </div> |
200 | 201 … | ` |
201 | | - } |
| 202 … | + } |
202 | 203 … | <strong> |
203 | 204 … | <a href=${u.encodeLink(digsPath)}>${votes.upvotes}</a> |
204 | 205 … | </strong> |
205 | | - ${isPublic ? '' |
| 206 … | + ${isPublic ? '' |
206 | 207 … | : html` |
207 | 208 … | <button class="btn" type="submit" name="action" value="fork-prompt"> |
208 | 209 … | <i>⑂</i> |
209 | 210 … | ${req._t('Fork')} |
276 | 277 … | var title = (path.length ? path.join('/') + ' · ' : '') + |
277 | 278 … | '%{author}/%{repo}' + |
278 | 279 … | (repo.head == 'refs/heads/' + rev ? '' : '@' + rev) |
279 | 280 … | return this.renderRepoPage(req, repo, 'code', rev, title, cat([ |
280 | | - pull.once('<section><form action="" method="get">' + |
| 281 … | + pull.once('<section class="branch-info light-grey"><form action="" method="get">' + |
281 | 282 … | '<h3>' + req._t(type) + ': ' + rev + ' '), |
282 | 283 … | this.revMenu(req, repo, rev), |
283 | 284 … | pull.once('</h3></form>'), |
284 | 285 … | type == 'Branch' && renderRepoLatest(req, repo, rev), |
285 | 286 … | pull.once('</section>'), |
286 | 287 … | rev ? cat([ |
287 | | - pull.once('<section>'), |
| 288 … | + pull.once('<section class="files">'), |
288 | 289 … | renderRepoTree(req, repo, rev, path), |
289 | 290 … | pull.once('</section>'), |
290 | 291 … | this.renderRepoReadme(req, repo, rev, path) |
291 | 292 … | ]) : this.serveEmptyRepo(req, repo) |
455 | 456 … | if (err) return cb(err) |
456 | 457 … | var commitPath = [repo.id, 'commit', commit.id] |
457 | 458 … | cb(null, |
458 | 459 … | req._t('Latest') + ': ' + |
459 | | - '<strong>' + u.link(commitPath, commit.title) + '</strong><br/>' + |
460 | | - '<tt>' + commit.id + '</tt><br/> ' + |
| 460 … | + '<strong>' + u.link(commitPath, commit.title) + '</strong>' + |
| 461 … | + '<tt class="ml2">' + commit.id + '</tt><br/> ' + |
461 | 462 … | req._t('CommittedOn', { |
462 | 463 … | name: u.escape(commit.committer.name), |
463 | 464 … | date: commit.committer.date.toLocaleString(req._locale) |
464 | 465 … | }) + |
522 | 523 … | '<p>' + req._t('NoReadme') + '</p>')) |
523 | 524 … | repo.getObjectFromAny(file.id, function (err, obj) { |
524 | 525 … | if (err) return cb(err) |
525 | 526 … | cb(null, cat([ |
526 | | - pull.once('<section><h4><a name="readme">' + |
527 | | - u.escape(file.name) + '</a></h4><hr/>'), |
| 527 … | + pull.once('<section class="readme">'), |
528 | 528 … | self.web.renderObjectData(obj, file.name, repo, branch, path), |
529 | 529 … | pull.once('</section>') |
530 | 530 … | ])) |
531 | 531 … | }) |