Improvements for mobile
ef51e7e9ee1716795fb2ce873d6854d50522f8ca
1 parent
a780e2bc
static/style.css
+51 -1
| 66 | 66 | line-height: 1.4; |
|
| 67 | 67 | color: var(--fg); |
|
| 68 | 68 | background: var(--bg); |
|
| 69 | 69 | -webkit-font-smoothing: antialiased; |
|
| 70 | 70 | -moz-osx-font-smoothing: grayscale; |
|
| 71 | + | -webkit-text-size-adjust: 100%; |
|
| 72 | + | text-size-adjust: 100%; |
|
| 71 | 73 | } |
|
| 72 | 74 | ||
| 73 | 75 | ::selection { |
|
| 74 | 76 | color: var(--bg); |
|
| 75 | 77 | background: var(--link); |
| 252 | 254 | margin: 0; |
|
| 253 | 255 | padding: 1rem; |
|
| 254 | 256 | font-family: var(--mono); |
|
| 255 | 257 | font-size: 1rem; |
|
| 256 | 258 | line-height: 1.5; |
|
| 257 | - | white-space: pre-wrap; |
|
| 259 | + | white-space: pre; |
|
| 260 | + | overflow-x: auto; |
|
| 258 | 261 | } |
|
| 259 | 262 | ||
| 260 | 263 | .blob-view { |
|
| 261 | 264 | border: 1px solid var(--border); |
|
| 262 | 265 | border-radius: 4px; |
| 668 | 671 | .language-ril .number { color: var(--color-highlight); } |
|
| 669 | 672 | .language-ril .string { color: var(--color-secondary); } |
|
| 670 | 673 | .language-ril .reg { color: var(--color-secondary); } |
|
| 671 | 674 | .language-ril .symbol { color: var(--color-highlight-dim); } |
|
| 672 | 675 | .language-ril .label { color: var(--color-highlight-dim); font-style: italic; } |
|
| 676 | + | ||
| 677 | + | /* --- Mobile --- */ |
|
| 678 | + | ||
| 679 | + | @media (max-width: 720px) { |
|
| 680 | + | .container { |
|
| 681 | + | padding: 0 0.5rem 2rem; |
|
| 682 | + | } |
|
| 683 | + | ||
| 684 | + | .file-view pre, |
|
| 685 | + | .blob-code pre, |
|
| 686 | + | .blob-code .line-num a, |
|
| 687 | + | .diff-hunk pre, |
|
| 688 | + | td.diff-num, |
|
| 689 | + | td.diff-marker { font-size: 0.875rem; } |
|
| 690 | + | ||
| 691 | + | .repo-home { |
|
| 692 | + | grid-template-columns: 1fr; |
|
| 693 | + | } |
|
| 694 | + | .repo-home .file-tree { |
|
| 695 | + | display: none; |
|
| 696 | + | } |
|
| 697 | + | ||
| 698 | + | .view-nav { |
|
| 699 | + | flex-wrap: wrap; |
|
| 700 | + | gap: 0.5rem; |
|
| 701 | + | } |
|
| 702 | + | .view-nav .last-commit { |
|
| 703 | + | margin-left: 0; |
|
| 704 | + | width: 100%; |
|
| 705 | + | } |
|
| 706 | + | ||
| 707 | + | .repo-nav { |
|
| 708 | + | flex-wrap: wrap; |
|
| 709 | + | } |
|
| 710 | + | ||
| 711 | + | .desktop { |
|
| 712 | + | display: none; |
|
| 713 | + | } |
|
| 714 | + | ||
| 715 | + | .commit-title { |
|
| 716 | + | flex-wrap: wrap; |
|
| 717 | + | } |
|
| 718 | + | ||
| 719 | + | .diff-header { |
|
| 720 | + | flex-wrap: wrap; |
|
| 721 | + | } |
|
| 722 | + | } |
templates/index.html
+2 -2
| 4 | 4 | {{else}} |
|
| 5 | 5 | <table class="repo-list"> |
|
| 6 | 6 | <thead> |
|
| 7 | 7 | <tr> |
|
| 8 | 8 | <th>Repository</th> |
|
| 9 | - | <th>Description</th> |
|
| 9 | + | <th class="desktop">Description</th> |
|
| 10 | 10 | <th>Idle</th> |
|
| 11 | 11 | </tr> |
|
| 12 | 12 | </thead> |
|
| 13 | 13 | <tbody> |
|
| 14 | 14 | {{range .Data.Repos}} |
|
| 15 | 15 | <tr> |
|
| 16 | 16 | <td><a href="{{$.BaseURL}}/{{.Name}}/">{{.Name}}</a></td> |
|
| 17 | - | <td>{{.Description}}</td> |
|
| 17 | + | <td class="desktop">{{.Description}}</td> |
|
| 18 | 18 | <td>{{if not .LastUpdated.IsZero}}{{timeAgo .LastUpdated}}{{end}}</td> |
|
| 19 | 19 | </tr> |
|
| 20 | 20 | {{end}} |
|
| 21 | 21 | </tbody> |
|
| 22 | 22 | </table> |
templates/log.html
+2 -2
| 24 | 24 | <table class="log-list"> |
|
| 25 | 25 | <thead> |
|
| 26 | 26 | <tr> |
|
| 27 | 27 | <th>Hash</th> |
|
| 28 | 28 | <th>Subject</th> |
|
| 29 | - | <th>Author</th> |
|
| 29 | + | <th class="author desktop">Author</th> |
|
| 30 | 30 | <th>Age</th> |
|
| 31 | 31 | </tr> |
|
| 32 | 32 | </thead> |
|
| 33 | 33 | <tbody> |
|
| 34 | 34 | {{range .Data.Commits}} |
|
| 35 | 35 | <tr> |
|
| 36 | 36 | <td class="hash"><a href="{{$.BaseURL}}/{{$.Repo}}/commit/{{.Hash}}">{{.ShortHash}}</a></td> |
|
| 37 | 37 | <td class="subject">{{.Subject}}</td> |
|
| 38 | - | <td class="author">{{.Author}}</td> |
|
| 38 | + | <td class="author desktop">{{.Author}}</td> |
|
| 39 | 39 | <td class="date">{{timeAgo .AuthorDate}}</td> |
|
| 40 | 40 | </tr> |
|
| 41 | 41 | {{end}} |
|
| 42 | 42 | </tbody> |
|
| 43 | 43 | </table> |
templates/refs.html
+8 -8
| 3 | 3 | <table class="ref-list"> |
|
| 4 | 4 | <thead> |
|
| 5 | 5 | <tr> |
|
| 6 | 6 | <th>Branch</th> |
|
| 7 | 7 | <th>Hash</th> |
|
| 8 | - | <th>Subject</th> |
|
| 9 | - | <th>Author</th> |
|
| 8 | + | <th class="desktop">Subject</th> |
|
| 9 | + | <th class="author desktop">Author</th> |
|
| 10 | 10 | <th>Idle</th> |
|
| 11 | 11 | </tr> |
|
| 12 | 12 | </thead> |
|
| 13 | 13 | <tbody> |
|
| 14 | 14 | {{range .Data.Branches}} |
|
| 15 | 15 | <tr> |
|
| 16 | 16 | <td><a href="{{$.BaseURL}}/{{$.Repo}}/log/{{.Name}}">{{.Name}}</a></td> |
|
| 17 | 17 | <td class="hash"><a href="{{$.BaseURL}}/{{$.Repo}}/commit/{{.Hash}}">{{.ShortHash}}</a></td> |
|
| 18 | - | <td class="subject">{{.Subject}}</td> |
|
| 19 | - | <td class="author">{{.Author}}</td> |
|
| 18 | + | <td class="subject desktop">{{.Subject}}</td> |
|
| 19 | + | <td class="author desktop">{{.Author}}</td> |
|
| 20 | 20 | <td class="date">{{timeAgo .Date}}</td> |
|
| 21 | 21 | </tr> |
|
| 22 | 22 | {{end}} |
|
| 23 | 23 | </tbody> |
|
| 24 | 24 | </table> |
| 28 | 28 | <table class="ref-list"> |
|
| 29 | 29 | <thead> |
|
| 30 | 30 | <tr> |
|
| 31 | 31 | <th>Tag</th> |
|
| 32 | 32 | <th>Hash</th> |
|
| 33 | - | <th>Subject</th> |
|
| 34 | - | <th>Author</th> |
|
| 33 | + | <th class="desktop">Subject</th> |
|
| 34 | + | <th class="author desktop">Author</th> |
|
| 35 | 35 | <th>Idle</th> |
|
| 36 | 36 | </tr> |
|
| 37 | 37 | </thead> |
|
| 38 | 38 | <tbody> |
|
| 39 | 39 | {{range .Data.Tags}} |
|
| 40 | 40 | <tr> |
|
| 41 | 41 | <td><a href="{{$.BaseURL}}/{{$.Repo}}/commit/{{.Hash}}">{{.Name}}</a></td> |
|
| 42 | 42 | <td class="hash"><a href="{{$.BaseURL}}/{{$.Repo}}/commit/{{.Hash}}">{{.ShortHash}}</a></td> |
|
| 43 | - | <td class="subject">{{.Subject}}</td> |
|
| 44 | - | <td class="author">{{.Author}}</td> |
|
| 43 | + | <td class="subject desktop">{{.Subject}}</td> |
|
| 44 | + | <td class="author desktop">{{.Author}}</td> |
|
| 45 | 45 | <td class="date">{{timeAgo .Date}}</td> |
|
| 46 | 46 | </tr> |
|
| 47 | 47 | {{end}} |
|
| 48 | 48 | </tbody> |
|
| 49 | 49 | </table> |