Make news posts look a little nicer
This commit is contained in:
parent
60a9ece643
commit
b7d4883c6c
|
@ -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 }}
|
||||
|
|
|
@ -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
|
||||
|
|
Reference in New Issue