|
1 | 1 | <div class="{{TabSizeClass .Editorconfig .FileName}} non-diff-file-content">
|
2 |
| - <h4 class="ui top attached header" id="{{if .ReadmeExist}}repo-readme{{else}}repo-read-file{{end}}"> |
3 |
| - <div class="ui stackable grid"> |
4 |
| - <div class="eight wide column"> |
5 |
| - {{if .ReadmeExist}} |
6 |
| - <i class="book icon ui left"></i> |
7 |
| - {{if .ReadmeInList}} |
8 |
| - <strong>{{.FileName}}</strong> |
9 |
| - {{else}} |
10 |
| - <strong>{{.FileName}}</strong> <span class="text grey normal">{{FileSize .FileSize}}{{if .IsLFSFile}} ({{.i18n.Tr "repo.stored_lfs"}}){{end}}</span> |
| 2 | + <h4 class="file-header ui top attached header"> |
| 3 | + <div class="file-header-left"> |
| 4 | + {{if .ReadmeInList}} |
| 5 | + <i class="book icon"></i> |
| 6 | + <strong>{{.FileName}}</strong> |
| 7 | + {{else}} |
| 8 | + <div class="file-info text grey normal mono"> |
| 9 | + {{if .NumLines}} |
| 10 | + <div class="file-info-entry"> |
| 11 | + {{.NumLines}} {{.i18n.Tr "repo.lines"}} |
| 12 | + </div> |
11 | 13 | {{end}}
|
12 |
| - {{else}} |
13 |
| - <i class="file text outline icon ui left"></i> |
14 |
| - <strong>{{.FileName}}</strong> <span class="text grey normal">{{FileSize .FileSize}}{{if .IsLFSFile}} ({{.i18n.Tr "repo.stored_lfs"}}){{end}}</span> |
15 |
| - {{end}} |
16 |
| - </div> |
17 |
| - <div class="eight wide right aligned column"> |
18 |
| - {{if not .ReadmeInList}} |
19 |
| - <div class="ui right file-actions"> |
20 |
| - <div class="ui buttons"> |
21 |
| - <a class="ui button" href="{{EscapePound $.RawFileLink}}">{{.i18n.Tr "repo.file_raw"}}</a> |
22 |
| - {{if not .IsViewCommit}} |
23 |
| - <a class="ui button" href="{{.RepoLink}}/src/commit/{{.CommitID}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_permalink"}}</a> |
24 |
| - {{end}} |
25 |
| - {{if .IsTextFile}} |
26 |
| - <a class="ui button" href="{{.RepoLink}}/blame/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.blame"}}</a> |
27 |
| - {{end}} |
28 |
| - <a class="ui button" href="{{.RepoLink}}/commits/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_history"}}</a> |
| 14 | + {{if .FileSize}} |
| 15 | + <div class="file-info-entry"> |
| 16 | + {{FileSize .FileSize}}{{if .IsLFSFile}} ({{.i18n.Tr "repo.stored_lfs"}}){{end}} |
29 | 17 | </div>
|
30 |
| - {{if .Repository.CanEnableEditor}} |
31 |
| - {{if .CanEditFile}} |
32 |
| - <a href="{{.RepoLink}}/_edit/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><i class="octicon octicon-pencil btn-octicon poping up" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted"></i></a> |
33 |
| - {{else}} |
34 |
| - <i class="octicon octicon-pencil btn-octicon poping up disabled" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted"></i> |
35 |
| - {{end}} |
36 |
| - {{if .CanDeleteFile}} |
37 |
| - <a href="{{.RepoLink}}/_delete/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><i class="octicon octicon-trashcan btn-octicon btn-octicon-danger poping up" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted"></i></a> |
38 |
| - {{else}} |
39 |
| - <i class="octicon octicon-trashcan btn-octicon poping up disabled" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted"></i> |
40 |
| - {{end}} |
41 |
| - {{end}} |
42 |
| - </div> |
| 18 | + {{end}} |
| 19 | + </div> |
| 20 | + {{end}} |
| 21 | + </div> |
| 22 | + {{if not .ReadmeInList}} |
| 23 | + <div class="file-header-right"> |
| 24 | + <div class="ui right file-actions"> |
| 25 | + <div class="ui buttons"> |
| 26 | + <a class="ui button" href="{{EscapePound $.RawFileLink}}">{{.i18n.Tr "repo.file_raw"}}</a> |
| 27 | + {{if not .IsViewCommit}} |
| 28 | + <a class="ui button" href="{{.RepoLink}}/src/commit/{{.CommitID}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_permalink"}}</a> |
| 29 | + {{end}} |
| 30 | + {{if .IsTextFile}} |
| 31 | + <a class="ui button" href="{{.RepoLink}}/blame/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.blame"}}</a> |
| 32 | + {{end}} |
| 33 | + <a class="ui button" href="{{.RepoLink}}/commits/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_history"}}</a> |
| 34 | + </div> |
| 35 | + {{if .Repository.CanEnableEditor}} |
| 36 | + {{if .CanEditFile}} |
| 37 | + <a href="{{.RepoLink}}/_edit/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><i class="octicon octicon-pencil btn-octicon poping up" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted"></i></a> |
| 38 | + {{else}} |
| 39 | + <i class="octicon octicon-pencil btn-octicon poping up disabled" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted"></i> |
| 40 | + {{end}} |
| 41 | + {{if .CanDeleteFile}} |
| 42 | + <a href="{{.RepoLink}}/_delete/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><i class="octicon octicon-trashcan btn-octicon btn-octicon-danger poping up" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted"></i></a> |
| 43 | + {{else}} |
| 44 | + <i class="octicon octicon-trashcan btn-octicon poping up disabled" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted"></i> |
| 45 | + {{end}} |
43 | 46 | {{end}}
|
44 | 47 | </div>
|
45 | 48 | </div>
|
| 49 | + {{end}} |
46 | 50 | </h4>
|
47 | 51 | <div class="ui attached table unstackable segment">
|
48 | 52 | <div class="file-view {{if .IsMarkup}}{{.MarkupType}} markdown{{else if .IsRenderedHTML}}plain-text{{else if .IsTextFile}}code-view{{end}} has-emoji">
|
|
0 commit comments