|
1 |
| -<form class="ignore-dirty tw-flex tw-flex-1 tw-mt-1" action="{{.RepoLink}}/search" method="get"> |
2 |
| - <div class="ui small action input tw-flex-1"> |
3 |
| - <input name="q" size="10" placeholder="{{ctx.Locale.Tr "search.code_kind"}}"> |
4 |
| - {{template "shared/search/button"}} |
5 |
| - </div> |
6 |
| -</form> |
| 1 | +<div class="repo-home-sidebar-top"> |
| 2 | + <form class="ignore-dirty tw-flex tw-flex-1 tw-mt-1" action="{{.RepoLink}}/search" method="get"> |
| 3 | + <div class="ui small action input tw-flex-1"> |
| 4 | + <input name="q" size="10" placeholder="{{ctx.Locale.Tr "search.code_kind"}}"> {{template "shared/search/button"}} |
| 5 | + </div> |
| 6 | + </form> |
7 | 7 |
|
8 |
| -<div class="flex-list"> |
9 |
| - <div class="flex-item"> |
10 |
| - <div class="flex-item-main"> |
11 |
| - <div class="flex-item-title"> |
12 |
| - {{ctx.Locale.Tr "repo.repo_desc"}} |
13 |
| - </div> |
14 |
| - {{if and (not .HideRepoInfo) (not .IsBlame)}} |
15 |
| - <div class="flex-item-body repo-description tw-break-anywhere tw-gap-2 tw-mt-2"> |
16 |
| - {{- $description := .Repository.DescriptionHTML ctx -}} |
17 |
| - {{if $description}}{{$description | RenderCodeBlock}}{{else}}{{ctx.Locale.Tr "repo.repo_no_desc"}}{{end}} |
18 |
| - {{if .Repository.Website}}{{svg "octicon-link"}}<a href="{{.Repository.Website}}">{{.Repository.Website}}</a>{{end}} |
19 |
| - </div> |
20 |
| - <div class="tw-flex tw-items-center tw-flex-wrap tw-gap-2 tw-my-2" id="repo-topics"> |
21 |
| - {{/* !!!! it SHOULD and MUST match the code in issue-home.js */}} |
22 |
| - {{range .Topics}}<a class="repo-topic ui large label gt-ellipsis" title={{.Name}} href="{{AppSubUrl}}/explore/repos?q={{.Name}}&topic=1">{{.Name}}</a>{{end}} |
23 |
| - </div> |
24 |
| - {{if and .Permission.IsAdmin (not .Repository.IsArchived)}} |
25 |
| - <button id="manage_topic" class="btn interact-fg tw-text-12">{{ctx.Locale.Tr "repo.topic.manage_topics"}}</button> |
26 |
| - {{end}} |
27 |
| - {{end}} |
28 |
| - {{if and .Permission.IsAdmin (not .Repository.IsArchived)}} |
29 |
| - <div class="ui form tw-hidden flex-item-body tw-gap-2 tw-my-2" id="topic_edit"> |
30 |
| - <div class="ui fluid multiple search selection dropdown tw-flex-wrap tw-flex-1"> |
31 |
| - <input type="hidden" name="topics" value="{{range $i, $v := .Topics}}{{.Name}}{{if Eval $i "+" 1 "<" (len $.Topics)}},{{end}}{{end}}"> |
32 |
| - {{range .Topics}} |
33 |
| - {{/* keep the same layout as Fomantic UI generated labels */}} |
34 |
| - <a class="ui label transition visible tw-cursor-default tw-inline-block repo-topic" data-value="{{.Name}}">{{.Name}}{{svg "octicon-x" 16 "delete icon"}}</a> |
| 8 | + <div class="flex-list"> |
| 9 | + <div class="flex-item"> |
| 10 | + <div class="flex-item-main"> |
| 11 | + <div class="flex-item-title">{{ctx.Locale.Tr "repo.repo_desc"}}</div> |
| 12 | + <div class="flex-item-body tw-text-16"> |
| 13 | + <div class="tw-flex tw-flex-col tw-gap-2 tw-mt-2"> |
| 14 | + <div class="repo-description tw-break-anywhere tw-gap-2"> |
| 15 | + {{- $description := .Repository.DescriptionHTML ctx -}} |
| 16 | + {{if $description}}{{$description | RenderCodeBlock}}{{else}}{{ctx.Locale.Tr "repo.repo_no_desc"}}{{end}} |
| 17 | + </div> |
| 18 | + |
| 19 | + {{if .Repository.Website}} |
| 20 | + <a class="flex-text-block" href="{{.Repository.Website}}"> |
| 21 | + {{svg "octicon-link" 16 "tw-text-text"}} <span class="tw-text-primary">{{.Repository.Website}}</span> |
| 22 | + </a> |
| 23 | + {{end}} |
| 24 | + |
| 25 | + <div id="repo-topics" class="flex-text-block tw-flex-wrap tw-gap-1 tw-my-1 tw-text-text"> |
| 26 | + {{/* !!!! it SHOULD and MUST match the code in repo-home.ts */}} |
| 27 | + {{range .Topics}}<a class="repo-topic ui large label gt-ellipsis" title={{.Name}} href="{{AppSubUrl}}/explore/repos?q={{.Name}}&topic=1">{{.Name}}</a>{{end}} |
| 28 | + </div> |
| 29 | + {{if and .Permission.IsAdmin (not .Repository.IsArchived)}} |
| 30 | + <button id="manage_topic" class="btn interact-fg tw-mb-2 tw-text-12">{{ctx.Locale.Tr "repo.topic.manage_topics"}}</button> |
| 31 | + <div class="ui form tw-hidden tw-my-2" id="topic_edit"> |
| 32 | + <div class="ui fluid multiple search selection dropdown tw-flex-wrap tw-flex-1"> |
| 33 | + <input type="hidden" name="topics" value="{{range $i, $v := .Topics}}{{.Name}}{{if Eval $i "+" 1 "<" (len $.Topics)}},{{end}}{{end}}"> |
| 34 | + {{range .Topics}} |
| 35 | + {{/* keep the same layout as Fomantic UI generated labels */}} |
| 36 | + <a class="ui label transition visible tw-cursor-default tw-inline-block repo-topic" data-value="{{.Name}}">{{.Name}}{{svg "octicon-x" 16 "delete icon"}}</a> |
| 37 | + {{end}} |
| 38 | + <div class="text"></div> |
| 39 | + </div> |
| 40 | + <div class="tw-my-2"> |
| 41 | + <button class="ui primary button" id="save_topic" data-link="{{.RepoLink}}/topics">{{ctx.Locale.Tr "save"}}</button> |
| 42 | + <button class="ui basic button" id="cancel_topic_edit">{{ctx.Locale.Tr "cancel"}}</button> |
| 43 | + </div> |
| 44 | + </div> |
| 45 | + {{end}} |
| 46 | + |
| 47 | + {{if .ReadmeExist}} |
| 48 | + <a class="flex-text-block muted" href="{{.TreeLink}}/{{.FileName}}"> |
| 49 | + {{svg "octicon-book"}} {{ctx.Locale.Tr "readme"}} |
| 50 | + </a> |
| 51 | + {{end}} |
| 52 | + |
| 53 | + {{if .DetectedRepoLicenses}} |
| 54 | + <a class="flex-text-block muted" href="{{.RepoLink}}/src/{{.Repository.DefaultBranch}}/{{PathEscapeSegments .LicenseFileName}}" title="{{StringUtils.Join .DetectedRepoLicenses ", "}}"> |
| 55 | + {{svg "octicon-law"}} {{if eq (len .DetectedRepoLicenses) 1}}{{index .DetectedRepoLicenses 0}}{{else}}{{ctx.Locale.Tr "repo.multiple_licenses"}}{{end}} |
| 56 | + </a> |
| 57 | + {{end}} |
| 58 | + |
| 59 | + {{if .CitiationExist}} |
| 60 | + {{template "repo/cite/cite_modal" .}} |
| 61 | + <a class="flex-text-block muted" id="cite-repo-button"> |
| 62 | + {{svg "octicon-cross-reference"}} {{ctx.Locale.Tr "repo.cite_this_repo"}} |
| 63 | + </a> |
35 | 64 | {{end}}
|
36 |
| - <div class="text"></div> |
37 |
| - </div> |
38 |
| - <div> |
39 |
| - <button class="ui primary button" id="save_topic" data-link="{{.RepoLink}}/topics">{{ctx.Locale.Tr "save"}}</button> |
40 |
| - <button class="ui basic button" id="cancel_topic_edit">{{ctx.Locale.Tr "cancel"}}</button> |
41 | 65 | </div>
|
42 | 66 | </div>
|
43 |
| - {{end}} |
44 |
| - {{if .ReadmeExist}} |
45 |
| - <div class="flex-item-body tw-mt-2"> |
46 |
| - <a class="flex-text-block muted" href="{{.TreeLink}}/{{.FileName}}"> |
47 |
| - {{svg "octicon-book"}} {{ctx.Locale.Tr "readme"}} |
48 |
| - </a> |
49 |
| - </div> |
50 |
| - {{end}} |
51 |
| - {{if .DetectedRepoLicenses}} |
52 |
| - <div class="flex-item-body"> |
53 |
| - <a class="flex-text-block muted" href="{{.RepoLink}}/src/{{.Repository.DefaultBranch}}/{{PathEscapeSegments .LicenseFileName}}" title="{{StringUtils.Join .DetectedRepoLicenses ", "}}"> |
54 |
| - {{svg "octicon-law"}} {{if eq (len .DetectedRepoLicenses) 1}}{{index .DetectedRepoLicenses 0}}{{else}}{{ctx.Locale.Tr "repo.multiple_licenses"}}{{end}} |
55 |
| - </a> |
56 |
| - </div> |
57 |
| - {{end}} |
58 |
| - {{if .CitiationExist}} |
59 |
| - <div class="flex-item-body"> |
60 |
| - {{template "repo/cite/cite_modal" .}} |
61 |
| - <a class="flex-text-block muted" id="cite-repo-button"> |
62 |
| - {{svg "octicon-cross-reference"}} {{ctx.Locale.Tr "repo.cite_this_repo"}} |
63 |
| - </a> |
64 |
| - </div> |
65 |
| - {{end}} |
| 67 | + </div> |
66 | 68 | </div>
|
67 | 69 | </div>
|
68 | 70 | </div>
|
0 commit comments