Skip to content

Commit 3652576

Browse files
committed
improve
1 parent 1bf3f66 commit 3652576

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

options/locale/locale_en-US.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,6 +1036,7 @@ generate_repo = Generate Repository
10361036
generate_from = Generate From
10371037
repo_desc = Description
10381038
repo_desc_helper = Enter short description (optional)
1039+
repo_no_desc = No description provided
10391040
repo_lang = Languages
10401041
repo_gitignore_helper = Select .gitignore templates.
10411042
repo_gitignore_helper_desc = Choose which files not to track from a list of templates for common languages. Typical artifacts generated by each language's build tools are included on .gitignore by default.

templates/repo/home.tmpl

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@
133133
{{ctx.Locale.Tr "repo.repo_desc"}}
134134
</div>
135135
{{if and (not .HideRepoInfo) (not .IsBlame)}}
136-
<div class="flex-item-body repo-description tw-break-anywhere tw-gap-2">
136+
<div class="flex-item-body repo-description tw-break-anywhere tw-gap-2 tw-mt-2">
137137
{{- $description := .Repository.DescriptionHTML ctx -}}
138-
{{if $description}}{{$description | RenderCodeBlock}}{{end}}
138+
{{if $description}}{{$description | RenderCodeBlock}}{{else}}{{ctx.Locale.Tr "repo.repo_no_desc"}}{{end}}
139139
{{if .Repository.Website}}{{svg "octicon-link"}}<a href="{{.Repository.Website}}">{{.Repository.Website}}</a>{{end}}
140140
</div>
141141
<div class="tw-flex tw-items-center tw-flex-wrap tw-gap-2 tw-my-2" id="repo-topics">
@@ -161,15 +161,24 @@
161161
</div>
162162
{{end}}
163163
{{if .ReadmeExist}}
164-
<div class="flex-item-body">
164+
<div class="flex-item-body tw-mt-2">
165165
<a class="tw-flex tw-items-center tw-gap-2 muted" href="{{.TreeLink}}/{{.FileName}}">
166166
{{svg "octicon-book"}}{{ctx.Locale.Tr "readme"}}
167167
</a>
168168
</div>
169169
{{end}}
170+
{{if .DetectedRepoLicenses}}
171+
<div class="flex-item-body">
172+
<a class="tw-flex tw-items-center tw-gap-2 muted" href="{{.RepoLink}}/src/{{.Repository.DefaultBranch}}/{{PathEscapeSegments .LicenseFileName}}" data-tooltip-placement="top" data-tooltip-content="{{StringUtils.Join .DetectedRepoLicenses ", "}}">
173+
{{svg "octicon-law"}}{{if eq (len .DetectedRepoLicenses) 1}}{{index .DetectedRepoLicenses 0}}{{else}}{{ctx.Locale.Tr "repo.multiple_licenses"}}{{end}}
174+
</a>
175+
</div>
176+
{{end}}
170177
{{if .CitiationExist}}
171178
<div class="flex-item-body">
172-
<a class="item" id="cite-repo-button">{{svg "octicon-cross-reference" 16 "tw-mr-2"}}{{ctx.Locale.Tr "repo.cite_this_repo"}}</a>
179+
<a class="tw-flex tw-items-center tw-gap-2 muted" id="cite-repo-button">
180+
{{svg "octicon-cross-reference"}}{{ctx.Locale.Tr "repo.cite_this_repo"}}
181+
</a>
173182
</div>
174183
{{end}}
175184
</div>

templates/repo/sub_menu.tmpl

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@
1313
{{svg "octicon-tag"}} <b>{{ctx.Locale.PrettyNumber .NumTags}}</b> {{ctx.Locale.TrN .NumTags "repo.tag" "repo.tags"}}
1414
</a>
1515
{{end}}
16-
{{if .DetectedRepoLicenses}}
17-
<a class="item muted" href="{{.RepoLink}}/src/{{.Repository.DefaultBranch}}/{{PathEscapeSegments .LicenseFileName}}" data-tooltip-placement="top" data-tooltip-content="{{StringUtils.Join .DetectedRepoLicenses ", "}}">
18-
{{svg "octicon-law"}} <b>{{if eq (len .DetectedRepoLicenses) 1}}{{index .DetectedRepoLicenses 0}}{{else}}{{ctx.Locale.Tr "repo.multiple_licenses"}}{{end}}</b>
19-
</a>
20-
{{end}}
2116
<span class="item not-mobile" {{if not (eq .Repository.Size 0)}}data-tooltip-placement="top" data-tooltip-content="{{.Repository.SizeDetailsString}}"{{end}}>
2217
{{$fileSizeFormatted := FileSize .Repository.Size}}{{/* the formatted string is always "{val} {unit}" */}}
2318
{{$fileSizeFields := StringUtils.Split $fileSizeFormatted " "}}

web_src/css/modules/flexcontainer.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@
3535
width: auto;
3636
}
3737
.flex-container-repo {
38-
width: 100%;
38+
width: auto;
3939
}
4040
}

0 commit comments

Comments
 (0)