Commit 126b1bb2d5440631bb06f7e3ad4448677d202031
misc style changes
mix irving committed on 10/9/2016, 4:41:18 AMParent: e424ae346ed5146a021aeb756c59f4051eda450b
Files changed
lib/repos/index.js | changed |
lib/repos/pulls.js | changed |
static/styles.css | changed |
static/drop-down-arrow.png | added |
lib/repos/index.js | ||
---|---|---|
@@ -39,10 +39,11 @@ | ||
39 | 39 … | pull.once('<table' + (props ? ' ' + props : '') + '>'), |
40 | 40 … | pull( |
41 | 41 … | read, |
42 | 42 … | pull.map(function (row) { |
43 | - return row ? '<tr>' + row.map(function (cell) { | |
44 | - return '<td>' + cell + '</td>' | |
43 … | + return row ? '<tr>' + row.map(function (cell, i) { | |
44 … | + var className = (i>0) ? 'w-100' : '' | |
45 … | + return '<td class="' + className +'">' + cell + '</td>' | |
45 | 46 … | }).join('') + '</tr>' : '' |
46 | 47 … | }) |
47 | 48 … | ), |
48 | 49 … | pull.once('</table>') |
@@ -250,16 +251,16 @@ | ||
250 | 251 … | var title = (path.length ? path.join('/') + ' · ' : '') + |
251 | 252 … | '%{author}/%{repo}' + |
252 | 253 … | (repo.head == 'refs/heads/' + rev ? '' : '@' + rev) |
253 | 254 … | return this.renderRepoPage(req, repo, 'code', rev, title, cat([ |
254 | - pull.once('<section><form action="" method="get">' + | |
255 | - '<h3>' + req._t(type) + ': ' + rev + ' '), | |
255 … | + pull.once('<section class="branch-info light-grey"><form action="" method="get">' + | |
256 … | + '<h3>' + req._t(type) + ': '), | |
256 | 257 … | this.revMenu(req, repo, rev), |
257 | 258 … | pull.once('</h3></form>'), |
258 | 259 … | type == 'Branch' && renderRepoLatest(req, repo, rev), |
259 | 260 … | pull.once('</section>'), |
260 | 261 … | rev ? cat([ |
261 | - pull.once('<section>'), | |
262 … | + pull.once('<section class="files">'), | |
262 | 263 … | renderRepoTree(req, repo, rev, path), |
263 | 264 … | pull.once('</section>'), |
264 | 265 … | this.renderRepoReadme(req, repo, rev, path) |
265 | 266 … | ]) : this.serveEmptyRepo(req, repo) |
@@ -406,9 +407,9 @@ | ||
406 | 407 … | var self = this |
407 | 408 … | return u.readOnce(function (cb) { |
408 | 409 … | repo.getRefNames(function (err, refs) { |
409 | 410 … | if (err) return cb(err) |
410 | - cb(null, '<select name="rev" onchange="this.form.submit()">' + | |
411 … | + cb(null, '<select class="custom-dropdown" name="rev" onchange="this.form.submit()">' + | |
411 | 412 … | Object.keys(refs).map(function (group) { |
412 | 413 … | return '<optgroup ' + |
413 | 414 … | 'label="' + self.formatRevType(req, group) + '">' + |
414 | 415 … | refs[group].map(self.formatRevOptions(currentName)).join('') + |
@@ -429,10 +430,10 @@ | ||
429 | 430 … | if (err) return cb(err) |
430 | 431 … | var commitPath = [repo.id, 'commit', commit.id] |
431 | 432 … | cb(null, |
432 | 433 … | req._t('Latest') + ': ' + |
433 | - '<strong>' + u.link(commitPath, commit.title) + '</strong><br/>' + | |
434 | - '<tt>' + commit.id + '</tt><br/> ' + | |
434 … | + u.link(commitPath, commit.title) + | |
435 … | + '<tt class="ml2 float-right">' + commit.id + '</tt><br/> ' + | |
435 | 436 … | req._t('CommittedOn', { |
436 | 437 … | name: u.escape(commit.committer.name), |
437 | 438 … | date: commit.committer.date.toLocaleString(req._locale) |
438 | 439 … | }) + |
@@ -496,10 +497,9 @@ | ||
496 | 497 … | '<p>' + req._t('NoReadme') + '</p>')) |
497 | 498 … | repo.getObjectFromAny(file.id, function (err, obj) { |
498 | 499 … | if (err) return cb(err) |
499 | 500 … | cb(null, cat([ |
500 | - pull.once('<section><h4><a name="readme">' + | |
501 | - u.escape(file.name) + '</a></h4><hr/>'), | |
501 … | + pull.once('<section class="readme">'), | |
502 | 502 … | self.web.renderObjectData(obj, file.name, repo, branch, path), |
503 | 503 … | pull.once('</section>') |
504 | 504 … | ])) |
505 | 505 … | }) |
lib/repos/pulls.js | ||
---|---|---|
@@ -424,9 +424,9 @@ | ||
424 | 424 … | } |
425 | 425 … | |
426 | 426 … | P.renderCommitLog = function (req, baseRepo, baseBranch, headRepo, headBranch) { |
427 | 427 … | return cat([ |
428 | - pull.once('<table class="compare-commits">'), | |
428 … | + pull.once('<table class="compare-commits w-100">'), | |
429 | 429 … | u.readNext(function (cb) { |
430 | 430 … | baseRepo.resolveRef(baseBranch, function (err, baseBranchRev) { |
431 | 431 … | if (err) return cb(err) |
432 | 432 … | var currentDay |
static/styles.css | ||
---|---|---|
@@ -94,8 +94,11 @@ | ||
94 | 94 … | } |
95 | 95 … | |
96 | 96 … | section.readme { |
97 | 97 … | margin-top: 2em; |
98 … | + padding: 2em 2em 4em; | |
99 … | + box-shadow: 2px 2px 10px #efefef; | |
100 … | + border: 1px #efefef solid; | |
98 | 101 … | } |
99 | 102 … | |
100 | 103 … | section.collapse { |
101 | 104 … | margin-bottom: 0; |
@@ -209,15 +212,18 @@ | ||
209 | 212 … | } |
210 | 213 … | |
211 | 214 … | .clone-url { |
212 | 215 … | font-size: small; |
213 | - color: #666; | |
214 | - padding: .3em 1ex; | |
215 | - background-color: white; | |
216 | 216 … | border: none; |
217 … | + border-radius: 4px; | |
217 | 218 … | float: right; |
218 | 219 … | margin: 0; |
220 … | + margin-top: 0.2rem; | |
221 … | + padding: 0 0.4rem; | |
219 | 222 … | max-width: 50%; |
223 … | + | |
224 … | + background-color: #eaeaea; | |
225 … | + color: #6f6f6f; | |
220 | 226 … | } |
221 | 227 … | .clone-url:hover { |
222 | 228 … | color: #000; |
223 | 229 … | } |
@@ -440,12 +446,8 @@ | ||
440 | 446 … | #commits:target + .tab-links #commits-link { |
441 | 447 … | font-weight: bold; |
442 | 448 … | } |
443 | 449 … | |
444 | -.compare-commits { | |
445 | - width: 100%; | |
446 | -} | |
447 | - | |
448 | 450 … | .date-info { |
449 | 451 … | font-weight: normal; |
450 | 452 … | text-align: left; |
451 | 453 … | color: #666; |
@@ -489,6 +491,33 @@ | ||
489 | 491 … | .w-100 { width: 100%; } |
490 | 492 … | |
491 | 493 … | .ml2 { margin-left: 2rem; } |
492 | 494 … | |
495 … | +.float-right { float: right; } | |
496 … | + | |
493 | 497 … | .light-grey { color: #909090; } |
494 | 498 … | |
499 … | +select.custom-dropdown { | |
500 … | + -webkit-appearance: none; /*REMOVES DEFAULT CHROME & SAFARI STYLE*/ | |
501 … | + -moz-appearance: none; /*REMOVES DEFAULT FIREFOX STYLE*/ | |
502 … | + | |
503 … | + -webkit-border-radius: 1rem; | |
504 … | + border: 1px #e1e1e1 solid; | |
505 … | + border-radius: 0.5rem; | |
506 … | + font-size: 1rem; | |
507 … | + padding: .1rem; | |
508 … | + width: 30%; | |
509 … | + cursor: pointer; | |
510 … | + | |
511 … | + background: #fff url(drop-down-arrow.png) no-repeat right center; | |
512 … | + background-size: 32px 32px; /*TO ACCOUNT FOR @2X IMAGE FOR RETINA */ | |
513 … | +} | |
514 … | + | |
515 … | +select.custom-dropdown:active, | |
516 … | +select.custom-dropdown:hover, | |
517 … | +select.custom-dropdown:focus { | |
518 … | + outline: 0; | |
519 … | +} | |
520 … | + | |
521 … | +select.custom-dropdown optgroup { | |
522 … | + margin: 0.5rem; | |
523 … | +} |
static/drop-down-arrow.png |
---|
Built with git-ssb-web