git ssb

30+

cel / git-ssb-web



Commit 171bb8a2c96096c302ba35950277404010f2ddf5

Improve UI on Dillo

- Make symbol font explicit
- Set text input size explicitly
- Use width instead of max-width for fixed width
Charles Lehner committed on 3/23/2016, 2:42:29 AM
Parent: bf4d4c3362515386f80484915baac3ba1b03160f

Files changed

index.jschanged
static/styles.csschanged
index.jsView
@@ -497,9 +497,9 @@
497497
498498 function renderRepoPage(repo, branch, body) {
499499 var gitUrl = 'ssb://' + repo.id
500500 var gitLink = '<input class="clone-url" readonly="readonly" ' +
501- 'value="' + gitUrl + '" size="' + gitUrl.length + '" ' +
501+ 'value="' + gitUrl + '" size="' + (2 + gitUrl.length) + '" ' +
502502 'onclick="this.select()"/>'
503503
504504 var done = multicb({ pluck: 1, spread: true })
505505 getRepoName(repo.id, done())
@@ -517,9 +517,10 @@
517517 (isPublic
518518 ? '<button disabled="disabled">✌ Dig</button> '
519519 : '<input type="hidden" name="vote" value="' +
520520 (upvoted ? '0' : '1') + '">' +
521- '<button type="submit">✌ ' + (upvoted ? 'Undig' : 'Dig') +
521+ '<button type="submit"><i>✌</i> ' +
522+ (upvoted ? 'Undig' : 'Dig') +
522523 '</button>') +
523524 '<strong>' + votes.upvotes + '</strong>' +
524525 '</form>' +
525526 '<h2>' + link([repo.feed], authorName) + ' / ' +
@@ -690,9 +691,10 @@
690691 (file.mode === 0160000) ? 'commit' : 'blob'
691692 if (type == 'commit')
692693 return ['<span title="git commit link">🖈</span>', '<span title="' + escapeHTML(file.id) + '">' + escapeHTML(file.name) + '</span>']
693694 var filePath = [repo.id, type, rev].concat(path, file.name)
694- return [type == 'tree' ? '📁' : '📄', link(filePath, file.name)]
695+ return ['<i>' + (type == 'tree' ? '📁' : '📄') + '</i>',
696+ link(filePath, file.name)]
695697 }),
696698 table('class="files"')
697699 )
698700 ])
static/styles.cssView
@@ -4,15 +4,17 @@
44 background-color: #eee;
55 font-family: sans-serif;
66 }
77
8-/* header */
9-
10-header {
11- max-width: 45em;
8+header, article {
9+ width: 45em;
10+ max-width: 100%;
11+ min-width: 16em;
1212 margin: 0 auto;
1313 }
1414
15+/* header */
16+
1517 header h1 {
1618 font-weight: inherit;
1719 font-size: 1.5em;
1820 }
@@ -28,13 +30,8 @@
2830 }
2931
3032 /* content */
3133
32-article {
33- max-width: 45em;
34- margin: 0 auto;
35-}
36-
3734 section {
3835 background-color: white;
3936 padding: 1ex 1ex;
4037 margin-bottom: 1ex;
@@ -63,8 +60,14 @@
6360 border: 0;
6461 border-bottom: 1px solid #ddd;
6562 }
6663
64+i {
65+ font-family: Symbola, 'Apple Color Emoji', 'Android Emoji',
66+ 'Segoe UI Symbol', 'DejaVu Sans', sans-serif;
67+ font-style: inherit;
68+}
69+
6770 /* repo page */
6871
6972 .repo-title h2 {
7073 color: #888;
@@ -90,8 +93,9 @@
9093 background-color: #f6f6f6;
9194 }
9295
9396 .clone-url {
97+ font-size: small;
9498 color: #666;
9599 padding: .3em 1ex;
96100 background-color: white;
97101 border: 1px #ccc;

Built with git-ssb-web