git ssb

30+

cel / git-ssb-web



Commit 126b1bb2d5440631bb06f7e3ad4448677d202031

misc style changes

mix irving committed on 10/9/2016, 4:41:18 AM
Parent: e424ae346ed5146a021aeb756c59f4051eda450b

Files changed

lib/repos/index.jschanged
lib/repos/pulls.jschanged
static/styles.csschanged
static/drop-down-arrow.pngadded
lib/repos/index.jsView
@@ -39,10 +39,11 @@
3939 pull.once('<table' + (props ? ' ' + props : '') + '>'),
4040 pull(
4141 read,
4242 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>'
4546 }).join('') + '</tr>' : ''
4647 })
4748 ),
4849 pull.once('</table>')
@@ -250,16 +251,16 @@
250251 var title = (path.length ? path.join('/') + ' · ' : '') +
251252 '%{author}/%{repo}' +
252253 (repo.head == 'refs/heads/' + rev ? '' : '@' + rev)
253254 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) + ': '),
256257 this.revMenu(req, repo, rev),
257258 pull.once('</h3></form>'),
258259 type == 'Branch' && renderRepoLatest(req, repo, rev),
259260 pull.once('</section>'),
260261 rev ? cat([
261- pull.once('<section>'),
262 + pull.once('<section class="files">'),
262263 renderRepoTree(req, repo, rev, path),
263264 pull.once('</section>'),
264265 this.renderRepoReadme(req, repo, rev, path)
265266 ]) : this.serveEmptyRepo(req, repo)
@@ -406,9 +407,9 @@
406407 var self = this
407408 return u.readOnce(function (cb) {
408409 repo.getRefNames(function (err, refs) {
409410 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()">' +
411412 Object.keys(refs).map(function (group) {
412413 return '<optgroup ' +
413414 'label="' + self.formatRevType(req, group) + '">' +
414415 refs[group].map(self.formatRevOptions(currentName)).join('') +
@@ -429,10 +430,10 @@
429430 if (err) return cb(err)
430431 var commitPath = [repo.id, 'commit', commit.id]
431432 cb(null,
432433 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/> ' +
435436 req._t('CommittedOn', {
436437 name: u.escape(commit.committer.name),
437438 date: commit.committer.date.toLocaleString(req._locale)
438439 }) +
@@ -496,10 +497,9 @@
496497 '<p>' + req._t('NoReadme') + '</p>'))
497498 repo.getObjectFromAny(file.id, function (err, obj) {
498499 if (err) return cb(err)
499500 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">'),
502502 self.web.renderObjectData(obj, file.name, repo, branch, path),
503503 pull.once('</section>')
504504 ]))
505505 })
lib/repos/pulls.jsView
@@ -424,9 +424,9 @@
424424 }
425425
426426 P.renderCommitLog = function (req, baseRepo, baseBranch, headRepo, headBranch) {
427427 return cat([
428- pull.once('<table class="compare-commits">'),
428 + pull.once('<table class="compare-commits w-100">'),
429429 u.readNext(function (cb) {
430430 baseRepo.resolveRef(baseBranch, function (err, baseBranchRev) {
431431 if (err) return cb(err)
432432 var currentDay
static/styles.cssView
@@ -94,8 +94,11 @@
9494 }
9595
9696 section.readme {
9797 margin-top: 2em;
98 + padding: 2em 2em 4em;
99 + box-shadow: 2px 2px 10px #efefef;
100 + border: 1px #efefef solid;
98101 }
99102
100103 section.collapse {
101104 margin-bottom: 0;
@@ -209,15 +212,18 @@
209212 }
210213
211214 .clone-url {
212215 font-size: small;
213- color: #666;
214- padding: .3em 1ex;
215- background-color: white;
216216 border: none;
217 + border-radius: 4px;
217218 float: right;
218219 margin: 0;
220 + margin-top: 0.2rem;
221 + padding: 0 0.4rem;
219222 max-width: 50%;
223 +
224 + background-color: #eaeaea;
225 + color: #6f6f6f;
220226 }
221227 .clone-url:hover {
222228 color: #000;
223229 }
@@ -440,12 +446,8 @@
440446 #commits:target + .tab-links #commits-link {
441447 font-weight: bold;
442448 }
443449
444-.compare-commits {
445- width: 100%;
446-}
447-
448450 .date-info {
449451 font-weight: normal;
450452 text-align: left;
451453 color: #666;
@@ -489,6 +491,33 @@
489491 .w-100 { width: 100%; }
490492
491493 .ml2 { margin-left: 2rem; }
492494
495 +.float-right { float: right; }
496 +
493497 .light-grey { color: #909090; }
494498
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
static/drop-down-arrow.png

Built with git-ssb-web