diff --git a/appview/pages/pages.go b/appview/pages/pages.go index c2a8c559..5f81540e 100644 --- a/appview/pages/pages.go +++ b/appview/pages/pages.go @@ -407,6 +407,13 @@ type RecentItem struct { Pull *models.Pull } +type BlogPost struct { + Slug string + Title string + Subtitle string + Date time.Time +} + type TimelineParams struct { LoggedInUser *oauth.MultiAccountUser Timeline []models.TimelineGroup @@ -417,6 +424,7 @@ type TimelineParams struct { Notifications []*models.NotificationWithEntity Recents []RecentItem FollowingOnly bool + RecentBlogPosts []BlogPost // ShowNewsletter controls whether the newsletter widget/CTA is rendered. // For logged-in users it reflects their newsletter_preferences row; for // anonymous visitors it is always true (dismissal falls back to diff --git a/appview/pages/templates/timeline/fragments/announcements.html b/appview/pages/templates/timeline/fragments/announcements.html index f281fb9c..23d6cf87 100644 --- a/appview/pages/templates/timeline/fragments/announcements.html +++ b/appview/pages/templates/timeline/fragments/announcements.html @@ -4,37 +4,52 @@ {{ i "megaphone" "size-4 flex-shrink-0" }} Announcements -
Build a web of trust
-- Vouch for trustworthy users that make open-source a better place. Visit a user's - profile to vouch for them. -
+{{ define "recentBlogPosts" }} + +{{ end }} -Build a web of trust
++ Vouch for trustworthy users that make open-source a better place. Visit a user's + profile to vouch for them. +
++ {{ if .FollowingOnly }} + Follow some users to see their activity here. + {{ else }} + Nothing here yet. + {{ end }} +
+