Skip to content

Commit f309305

Browse files
committed
use flex-list correctly
1 parent b4ea7b5 commit f309305

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

templates/repo/home_sidebar_top.tmpl

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,14 @@
1111
<div class="flex-item-title">
1212
{{ctx.Locale.Tr "repo.repo_desc"}}
1313
</div>
14+
<div class="flex-item-body">
15+
1416
{{if and (not .HideRepoInfo) (not .IsBlame)}}
15-
<div class="flex-item-body repo-description tw-break-anywhere tw-gap-2 tw-my-2">
17+
<div class="repo-description tw-break-anywhere tw-gap-2 tw-mt-2">
1618
{{- $description := .Repository.DescriptionHTML ctx -}}
1719
{{if $description}}{{$description | RenderCodeBlock}}{{else}}{{ctx.Locale.Tr "repo.repo_no_desc"}}{{end}}
20+
{{if .Repository.Website}}{{svg "octicon-link"}}<a href="{{.Repository.Website}}">{{.Repository.Website}}</a>{{end}}
1821
</div>
19-
{{if .Repository.Website}}
20-
<a class="flex-text-block muted" href="{{.Repository.Website}}">
21-
{{svg "octicon-link"}} <span class="tw-text-primary">{{.Repository.Website}}</span>
22-
</a>
23-
{{end}}
2422
<div class="tw-flex tw-items-center tw-flex-wrap tw-gap-2 tw-my-2" id="repo-topics">
2523
{{/* !!!! it SHOULD and MUST match the code in issue-home.js */}}
2624
{{range .Topics}}<a class="repo-topic ui large label gt-ellipsis" title={{.Name}} href="{{AppSubUrl}}/explore/repos?q={{.Name}}&topic=1">{{.Name}}</a>{{end}}
@@ -29,8 +27,9 @@
2927
<button id="manage_topic" class="btn interact-fg tw-text-12">{{ctx.Locale.Tr "repo.topic.manage_topics"}}</button>
3028
{{end}}
3129
{{end}}
30+
3231
{{if and .Permission.IsAdmin (not .Repository.IsArchived)}}
33-
<div class="ui form tw-hidden flex-item-body tw-gap-2 tw-my-2" id="topic_edit">
32+
<div class="ui form tw-hidden tw-gap-2 tw-my-2" id="topic_edit">
3433
<div class="ui fluid multiple search selection dropdown tw-flex-wrap tw-flex-1">
3534
<input type="hidden" name="topics" value="{{range $i, $v := .Topics}}{{.Name}}{{if Eval $i "+" 1 "<" (len $.Topics)}},{{end}}{{end}}">
3635
{{range .Topics}}
@@ -45,23 +44,31 @@
4544
</div>
4645
</div>
4746
{{end}}
48-
<div class="flex-item-body tw-flex tw-flex-col tw-gap-1 tw-mt-2 tw-items-start">
49-
{{if .ReadmeExist}}
47+
48+
{{if .ReadmeExist}}
49+
<div class="tw-mt-2">
5050
<a class="flex-text-block muted" href="{{.TreeLink}}/{{.FileName}}">
5151
{{svg "octicon-book"}} {{ctx.Locale.Tr "readme"}}
5252
</a>
53-
{{end}}
54-
{{if .DetectedRepoLicenses}}
53+
</div>
54+
{{end}}
55+
56+
{{if .DetectedRepoLicenses}}
57+
<div>
5558
<a class="flex-text-block muted" href="{{.RepoLink}}/src/{{.Repository.DefaultBranch}}/{{PathEscapeSegments .LicenseFileName}}" title="{{StringUtils.Join .DetectedRepoLicenses ", "}}">
5659
{{svg "octicon-law"}} {{if eq (len .DetectedRepoLicenses) 1}}{{index .DetectedRepoLicenses 0}}{{else}}{{ctx.Locale.Tr "repo.multiple_licenses"}}{{end}}
5760
</a>
58-
{{end}}
59-
{{if .CitiationExist}}
61+
</div>
62+
{{end}}
63+
{{if .CitiationExist}}
64+
<div>
6065
{{template "repo/cite/cite_modal" .}}
6166
<a class="flex-text-block muted" id="cite-repo-button">
6267
{{svg "octicon-cross-reference"}} {{ctx.Locale.Tr "repo.cite_this_repo"}}
6368
</a>
64-
{{end}}
69+
</div>
70+
{{end}}
71+
6572
</div>
6673
</div>
6774
</div>

0 commit comments

Comments
 (0)