Commit 171bb8a2c96096c302ba35950277404010f2ddf5
Improve UI on Dillo
- Make symbol font explicit - Set text input size explicitly - Use width instead of max-width for fixed widthCharles Lehner committed on 3/23/2016, 2:42:29 AM
Parent: bf4d4c3362515386f80484915baac3ba1b03160f
Files changed
index.js | changed |
static/styles.css | changed |
index.js | ||
---|---|---|
@@ -497,9 +497,9 @@ | ||
497 | 497 | |
498 | 498 | function renderRepoPage(repo, branch, body) { |
499 | 499 | var gitUrl = 'ssb://' + repo.id |
500 | 500 | var gitLink = '<input class="clone-url" readonly="readonly" ' + |
501 | - 'value="' + gitUrl + '" size="' + gitUrl.length + '" ' + | |
501 | + 'value="' + gitUrl + '" size="' + (2 + gitUrl.length) + '" ' + | |
502 | 502 | 'onclick="this.select()"/>' |
503 | 503 | |
504 | 504 | var done = multicb({ pluck: 1, spread: true }) |
505 | 505 | getRepoName(repo.id, done()) |
@@ -517,9 +517,10 @@ | ||
517 | 517 | (isPublic |
518 | 518 | ? '<button disabled="disabled">✌ Dig</button> ' |
519 | 519 | : '<input type="hidden" name="vote" value="' + |
520 | 520 | (upvoted ? '0' : '1') + '">' + |
521 | - '<button type="submit">✌ ' + (upvoted ? 'Undig' : 'Dig') + | |
521 | + '<button type="submit"><i>✌</i> ' + | |
522 | + (upvoted ? 'Undig' : 'Dig') + | |
522 | 523 | '</button>') + |
523 | 524 | '<strong>' + votes.upvotes + '</strong>' + |
524 | 525 | '</form>' + |
525 | 526 | '<h2>' + link([repo.feed], authorName) + ' / ' + |
@@ -690,9 +691,10 @@ | ||
690 | 691 | (file.mode === 0160000) ? 'commit' : 'blob' |
691 | 692 | if (type == 'commit') |
692 | 693 | return ['<span title="git commit link">🖈</span>', '<span title="' + escapeHTML(file.id) + '">' + escapeHTML(file.name) + '</span>'] |
693 | 694 | 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)] | |
695 | 697 | }), |
696 | 698 | table('class="files"') |
697 | 699 | ) |
698 | 700 | ]) |
static/styles.css | ||
---|---|---|
@@ -4,15 +4,17 @@ | ||
4 | 4 | background-color: #eee; |
5 | 5 | font-family: sans-serif; |
6 | 6 | } |
7 | 7 | |
8 | -/* header */ | |
9 | - | |
10 | -header { | |
11 | - max-width: 45em; | |
8 | +header, article { | |
9 | + width: 45em; | |
10 | + max-width: 100%; | |
11 | + min-width: 16em; | |
12 | 12 | margin: 0 auto; |
13 | 13 | } |
14 | 14 | |
15 | +/* header */ | |
16 | + | |
15 | 17 | header h1 { |
16 | 18 | font-weight: inherit; |
17 | 19 | font-size: 1.5em; |
18 | 20 | } |
@@ -28,13 +30,8 @@ | ||
28 | 30 | } |
29 | 31 | |
30 | 32 | /* content */ |
31 | 33 | |
32 | -article { | |
33 | - max-width: 45em; | |
34 | - margin: 0 auto; | |
35 | -} | |
36 | - | |
37 | 34 | section { |
38 | 35 | background-color: white; |
39 | 36 | padding: 1ex 1ex; |
40 | 37 | margin-bottom: 1ex; |
@@ -63,8 +60,14 @@ | ||
63 | 60 | border: 0; |
64 | 61 | border-bottom: 1px solid #ddd; |
65 | 62 | } |
66 | 63 | |
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 | + | |
67 | 70 | /* repo page */ |
68 | 71 | |
69 | 72 | .repo-title h2 { |
70 | 73 | color: #888; |
@@ -90,8 +93,9 @@ | ||
90 | 93 | background-color: #f6f6f6; |
91 | 94 | } |
92 | 95 | |
93 | 96 | .clone-url { |
97 | + font-size: small; | |
94 | 98 | color: #666; |
95 | 99 | padding: .3em 1ex; |
96 | 100 | background-color: white; |
97 | 101 | border: 1px #ccc; |
Built with git-ssb-web