|
2 | 2 | {{with .Repository}} |
3 | 3 | <div class="ui container"> |
4 | 4 | <div class="repo-header"> |
5 | | - <div class="repo-title-wrap gt-df gt-fc"> |
6 | | - <div class="repo-title" role="heading" aria-level="1"> |
7 | | - <div class="gt-mr-3"> |
8 | | - {{template "repo/icon" .}} |
9 | | - </div> |
10 | | - <a href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a> |
11 | | - <div class="gt-mx-2">/</div> |
12 | | - <a href="{{$.RepoLink}}">{{.Name}}</a> |
13 | | - <div class="labels gt-df gt-ac gt-fw"> |
14 | | - {{if .IsArchived}} |
15 | | - <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.archived"}}</span> |
16 | | - {{end}} |
17 | | - {{if .IsPrivate}} |
18 | | - <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.private"}}</span> |
19 | | - {{else}} |
20 | | - {{if .Owner.Visibility.IsPrivate}} |
21 | | - <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.internal"}}</span> |
22 | | - {{end}} |
23 | | - {{end}} |
24 | | - {{if .IsTemplate}} |
25 | | - <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.template"}}</span> |
| 5 | + <div class="flex-item gt-ac"> |
| 6 | + <div class="flex-item-leading">{{template "repo/icon" .}}</div> |
| 7 | + <div class="flex-item-main"> |
| 8 | + <div class="flex-item-title"> |
| 9 | + <a class="text light thin" href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>/ |
| 10 | + <a class="text primary" href="{{$.RepoLink}}">{{.Name}}</a></div> |
| 11 | + </div> |
| 12 | + <div class="flex-item-trailing"> |
| 13 | + {{if .IsArchived}} |
| 14 | + <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.archived"}}</span> |
| 15 | + <div class="repo-icon" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.archived"}}">{{svg "octicon-archive" 18}}</div> |
| 16 | + {{end}} |
| 17 | + {{if .IsPrivate}} |
| 18 | + <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.private"}}</span> |
| 19 | + <div class="repo-icon" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.private"}}">{{svg "octicon-lock" 18}}</div> |
| 20 | + {{else}} |
| 21 | + {{if .Owner.Visibility.IsPrivate}} |
| 22 | + <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.internal"}}</span> |
| 23 | + <div class="repo-icon" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.internal"}}">{{svg "octicon-shield-lock" 18}}</div> |
26 | 24 | {{end}} |
27 | | - </div> |
| 25 | + {{end}} |
| 26 | + {{if .IsTemplate}} |
| 27 | + <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.template"}}</span> |
| 28 | + <div class="repo-icon" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.template"}}">{{svg "octicon-repo-template" 18}}</div> |
| 29 | + {{end}} |
28 | 30 | </div> |
29 | | - {{if $.PullMirror}} |
30 | | - <div class="fork-flag">{{ctx.Locale.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener noreferrer" href="{{$.PullMirror.RemoteAddress}}">{{$.PullMirror.RemoteAddress}}</a></div> |
31 | | - {{end}} |
32 | | - {{if .IsFork}}<div class="fork-flag">{{ctx.Locale.Tr "repo.forked_from"}} <a href="{{.BaseRepo.Link}}">{{.BaseRepo.FullName}}</a></div>{{end}} |
33 | | - {{if .IsGenerated}}<div class="fork-flag">{{ctx.Locale.Tr "repo.generated_from"}} <a href="{{(.TemplateRepo ctx).Link}}">{{(.TemplateRepo ctx).FullName}}</a></div>{{end}} |
34 | 31 | </div> |
35 | 32 | {{if not (or .IsBeingCreated .IsBroken)}} |
36 | 33 | <div class="repo-buttons"> |
|
62 | 59 | {{$.CsrfTokenHtml}} |
63 | 60 | <div class="ui labeled button" {{if not $.IsSigned}}data-tooltip-content="{{ctx.Locale.Tr "repo.watch_guest_user"}}"{{end}}> |
64 | 61 | <button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}}> |
65 | | - {{if $.IsWatchingRepo}}{{svg "octicon-eye-closed" 16}}{{ctx.Locale.Tr "repo.unwatch"}}{{else}}{{svg "octicon-eye"}}{{ctx.Locale.Tr "repo.watch"}}{{end}} |
| 62 | + {{if $.IsWatchingRepo}} |
| 63 | + {{svg "octicon-eye-closed" 16}}<span class="text">{{ctx.Locale.Tr "repo.unwatch"}}</span> |
| 64 | + {{else}} |
| 65 | + {{svg "octicon-eye"}}<span class="text">{{ctx.Locale.Tr "repo.watch"}}</span> |
| 66 | + {{end}} |
66 | 67 | </button> |
67 | 68 | <a class="ui basic label" href="{{.Link}}/watchers"> |
68 | 69 | {{CountFmt .NumWatches}} |
|
74 | 75 | {{$.CsrfTokenHtml}} |
75 | 76 | <div class="ui labeled button" {{if not $.IsSigned}}data-tooltip-content="{{ctx.Locale.Tr "repo.star_guest_user"}}"{{end}}> |
76 | 77 | <button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}}> |
77 | | - {{if $.IsStaringRepo}}{{svg "octicon-star-fill"}}{{ctx.Locale.Tr "repo.unstar"}}{{else}}{{svg "octicon-star"}}{{ctx.Locale.Tr "repo.star"}}{{end}} |
| 78 | + {{if $.IsStaringRepo}} |
| 79 | + {{svg "octicon-star-fill"}}<span class="text">{{ctx.Locale.Tr "repo.unstar"}}</span> |
| 80 | + {{else}} |
| 81 | + {{svg "octicon-star"}}<span class="text">{{ctx.Locale.Tr "repo.star"}}</span> |
| 82 | + {{end}} |
78 | 83 | </button> |
79 | 84 | <a class="ui basic label" href="{{.Link}}/stars"> |
80 | 85 | {{CountFmt .NumStars}} |
|
107 | 112 | data-modal="#fork-repo-modal" |
108 | 113 | {{end}} |
109 | 114 | > |
110 | | - {{svg "octicon-repo-forked"}}{{ctx.Locale.Tr "repo.fork"}} |
| 115 | + {{svg "octicon-repo-forked"}}<span class="text">{{ctx.Locale.Tr "repo.fork"}}</span> |
111 | 116 | </a> |
112 | 117 | <div class="ui small modal" id="fork-repo-modal"> |
113 | 118 | <div class="header"> |
|
117 | 122 | <div class="ui list"> |
118 | 123 | {{range $.UserAndOrgForks}} |
119 | 124 | <div class="ui item gt-py-3"> |
120 | | - <a href="{{.Link}}"> |
121 | | - {{svg "octicon-repo-forked" 16 "gt-mr-3"}}{{.FullName}} |
122 | | - </a> |
| 125 | + <a href="{{.Link}}">{{svg "octicon-repo-forked" 16 "gt-mr-3"}}{{.FullName}}</a> |
123 | 126 | </div> |
124 | 127 | {{end}} |
125 | 128 | </div> |
126 | 129 | {{if $.CanSignedUserFork}} |
127 | 130 | <div class="divider"></div> |
128 | | - <a href="{{AppSubUrl}}/repo/fork/{{.ID}}"> |
129 | | - {{ctx.Locale.Tr "repo.fork_to_different_account"}} |
130 | | - </a> |
| 131 | + <a href="{{AppSubUrl}}/repo/fork/{{.ID}}">{{ctx.Locale.Tr "repo.fork_to_different_account"}}</a> |
131 | 132 | {{end}} |
132 | 133 | </div> |
133 | 134 | </div> |
|
138 | 139 | {{end}} |
139 | 140 | </div> |
140 | 141 | {{end}} |
141 | | - </div><!-- end grid --> |
142 | | - </div><!-- end container --> |
| 142 | + </div> |
| 143 | + {{if $.PullMirror}}<div class="fork-flag">{{ctx.Locale.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener noreferrer" href="{{$.PullMirror.RemoteAddress}}">{{$.PullMirror.RemoteAddress}}</a></div>{{end}} |
| 144 | + {{if .IsFork}}<div class="fork-flag">{{ctx.Locale.Tr "repo.forked_from"}} <a href="{{.BaseRepo.Link}}">{{.BaseRepo.FullName}}</a></div>{{end}} |
| 145 | + {{if .IsGenerated}}<div class="fork-flag">{{ctx.Locale.Tr "repo.generated_from"}} <a href="{{(.TemplateRepo ctx).Link}}">{{(.TemplateRepo ctx).FullName}}</a></div>{{end}} |
| 146 | + </div> |
143 | 147 | {{end}} |
144 | | - <div class="ui tabs container"> |
| 148 | + <div class="ui container secondary pointing tabular top attached borderless menu new-menu navbar"> |
145 | 149 | {{if not (or .Repository.IsBeingCreated .Repository.IsBroken)}} |
146 | | - <div class="ui tabular menu navbar gt-overflow-x-auto gt-overflow-y-hidden"> |
| 150 | + <div class="new-menu-inner"> |
147 | 151 | {{if .Permission.CanRead $.UnitTypeCode}} |
148 | 152 | <a class="{{if .PageIsViewCode}}active {{end}}item" href="{{.RepoLink}}{{if and (ne .BranchName .Repository.DefaultBranch) (not $.PageIsWiki)}}/src/{{.BranchNameSubURL}}{{end}}"> |
149 | 153 | {{svg "octicon-code"}} {{ctx.Locale.Tr "repo.code"}} |
|
228 | 232 | {{template "custom/extra_tabs" .}} |
229 | 233 |
|
230 | 234 | {{if .Permission.IsAdmin}} |
231 | | - <a class="{{if .PageIsRepoSettings}}active {{end}}right item" href="{{.RepoLink}}/settings"> |
| 235 | + <a class="{{if .PageIsRepoSettings}}active {{end}} item" href="{{.RepoLink}}/settings"> |
232 | 236 | {{svg "octicon-tools"}} {{ctx.Locale.Tr "repo.settings"}} |
233 | 237 | </a> |
234 | 238 | {{end}} |
235 | 239 | </div> |
236 | 240 | {{else if .Permission.IsAdmin}} |
237 | | - <div class="ui tabular menu navbar gt-overflow-x-auto gt-overflow-y-hidden"> |
238 | | - <a class="{{if .PageIsRepoSettings}}active {{end}}right item" href="{{.RepoLink}}/settings"> |
| 241 | + <div class="new-menu-inner"> |
| 242 | + <a class="{{if .PageIsRepoSettings}}active {{end}} item" href="{{.RepoLink}}/settings"> |
239 | 243 | {{svg "octicon-tools"}} {{ctx.Locale.Tr "repo.settings"}} |
240 | 244 | </a> |
241 | 245 | </div> |
|
0 commit comments