Merge remote-tracking branch 'origin/beta'

This commit is contained in:
Ben Visness 2023-04-14 15:47:32 -05:00
commit 23e67638e4
2 changed files with 5 additions and 2 deletions

View File

@ -2,7 +2,7 @@
{{/* top bar - avatar, info, date */}}
<div class="flex items-center">
{{ if .OwnerAvatarUrl }}
<a class="flex-shrink-0" href="{{ .OwnerUrl }}">
<a class="flex flex-shrink-0" href="{{ .OwnerUrl }}">
<img class="avatar-icon lite {{ if not .SmallInfo }}big{{ end }} {{ if .SmallInfo }}mr2{{ else }}mr3{{ end }}" src="{{ .OwnerAvatarUrl }}" />
</a>
{{ end }}

View File

@ -78,6 +78,10 @@ func Index(c *RequestContext) ResponseData {
c.Logger.Warn().Err(err).Msg("failed to fetch latest posts")
}
for _, p := range posts {
if p.Project.IsHMN() {
continue // ignore news posts et. al.
}
item := PostToTimelineItem(hmndata.UrlContextForProject(&p.Project), lineageBuilder, &p.Post, &p.Thread, p.Author, c.Theme)
if p.Thread.Type == models.ThreadTypeProjectBlogPost && p.Post.ID == p.Thread.FirstID {
// blog post
@ -100,7 +104,6 @@ func Index(c *RequestContext) ResponseData {
if len(newsThreads) > 0 {
t := newsThreads[0]
item := PostToTimelineItem(hmndata.UrlContextForProject(&t.Project), lineageBuilder, &t.FirstPost, &t.Thread, t.FirstPostAuthor, c.Theme)
item.OwnerAvatarUrl = ""
item.Breadcrumbs = nil
item.TypeTitle = ""
item.AllowTitleWrap = true