Skip to content

Commit ed33275

Browse files
committed
document attribute and use title case
1 parent be5cdc5 commit ed33275

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

templates/repo/home_sidebar_bottom.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<div class="flex-item-header">
1818
<div class="flex-item-title tw-gap-2">
1919
<a class="gt-ellipsis muted" href="{{.LatestRelease.Link}}" title="{{.LatestRelease.Title}}">{{.LatestRelease.Title}}</a>
20-
{{template "repo/release/label" (dict "release" .LatestRelease "isLatest" true)}}
20+
{{template "repo/release/label" (dict "release" .LatestRelease "IsLatest" true)}}
2121
</div>
2222
</div>
2323
<div class="flex-item-body">

templates/repo/release/label.tmpl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
{{if .isLatest}}
1+
{{/*
2+
Template Attributes:
3+
* IsLatest: whether this is the latest release
4+
*/}}
5+
{{if .IsLatest}}
26
<span class="ui green label">{{ctx.Locale.Tr "repo.release.latest"}}</span>
37
{{else if .release.IsDraft}}
48
<span class="ui yellow label">{{ctx.Locale.Tr "repo.release.draft"}}</span>

0 commit comments

Comments
 (0)