2
0

fix(blog): improve blog metadata display formatting

Simplify blog header to show owner/repo format without redundant "Blog" label. Add fallback to CreatedUnix when PublishedUnix is not available for featured posts.
This commit is contained in:
2026-02-03 15:21:39 -05:00
parent 33898561db
commit e19874f4b3
2 changed files with 3 additions and 3 deletions

View File

@@ -9,9 +9,7 @@
{{else if .BlogPost.Repo.Owner}}
<img class="blog-avatar-sm" src="{{.BlogPost.Repo.Owner.AvatarLink ctx}}" alt="">
{{end}}
<a href="{{.BlogPost.Repo.Link}}">{{if .BlogPost.Repo.DisplayTitle}}{{.BlogPost.Repo.DisplayTitle}}{{else}}{{.BlogPost.Repo.FullName}}{{end}}</a>
<span class="blog-meta-sep">/</span>
<span>{{ctx.Locale.Tr "repo.blog"}}</span>
<a href="{{.BlogPost.Repo.Link}}">{{if .BlogPost.Repo.Owner}}{{Iif .BlogPost.Repo.Owner.FullName .BlogPost.Repo.Owner.FullName .BlogPost.Repo.Owner.Name}}/{{end}}{{Iif .BlogPost.Repo.DisplayTitle .BlogPost.Repo.DisplayTitle .BlogPost.Repo.Name}}</a>
</div>
{{end}}

View File

@@ -18,6 +18,8 @@
<div class="blog-featured-meta">
{{if .FeaturedPost.PublishedUnix}}
<span class="blog-date">{{DateUtils.TimeSince .FeaturedPost.PublishedUnix}}</span>
{{else}}
<span class="blog-date">{{DateUtils.TimeSince .FeaturedPost.CreatedUnix}}</span>
{{end}}
{{if .FeaturedPost.Author}}
<span class="blog-meta-sep">&bull;</span>