Coffee journaling on ATProto (alpha) alpha.arabica.social
coffee
17
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: better page titles for home and profile pages

+23 -15
+14 -14
internal/handlers/profile.go
··· 493 493 } 494 494 495 495 // Create layout data 496 - pageTitle := "Profile" 496 + pageTitle := "@" + viewedProfile.Handle 497 497 if viewedProfile.DisplayName != "" { 498 - pageTitle = viewedProfile.DisplayName + " - Profile" 498 + pageTitle = viewedProfile.DisplayName + " (@" + viewedProfile.Handle + ")" 499 499 } 500 500 layoutData, _, _ := h.layoutDataFromRequest(r, pageTitle) 501 501 ··· 672 672 } 673 673 674 674 if err := components.ProfileContentPartial(components.ProfileContentPartialProps{ 675 - Brews: profileData.Brews, 676 - Beans: profileData.Beans, 677 - Roasters: profileData.Roasters, 678 - Grinders: profileData.Grinders, 679 - Brewers: profileData.Brewers, 680 - IsOwnProfile: isOwnProfile, 681 - ProfileHandle: profileHandle, 682 - Profile: profile, 683 - BrewLikeCounts: brewLikeCounts, 684 - BrewLikedByUser: brewLikedByUser, 685 - BrewCIDs: brewCIDs, 686 - IsAuthenticated: isAuthenticated, 675 + Brews: profileData.Brews, 676 + Beans: profileData.Beans, 677 + Roasters: profileData.Roasters, 678 + Grinders: profileData.Grinders, 679 + Brewers: profileData.Brewers, 680 + IsOwnProfile: isOwnProfile, 681 + ProfileHandle: profileHandle, 682 + Profile: profile, 683 + BrewLikeCounts: brewLikeCounts, 684 + BrewLikedByUser: brewLikedByUser, 685 + BrewCIDs: brewCIDs, 686 + IsAuthenticated: isAuthenticated, 687 687 BeanBrewCounts: beanBrewCounts, 688 688 GrinderBrewCounts: grinderBrewCounts, 689 689 BrewerBrewCounts: brewerBrewCounts,
+9 -1
internal/web/components/layout.templ
··· 26 26 if d.OGTitle != "" { 27 27 return d.OGTitle 28 28 } 29 + return d.pageTitle() 30 + } 31 + 32 + // pageTitle returns the <title> text, collapsing the home page to just "Arabica" 33 + func (d *LayoutData) pageTitle() string { 34 + if d.Title == "" || d.Title == "Home" { 35 + return "Arabica" 36 + } 29 37 return d.Title + " - Arabica" 30 38 } 31 39 ··· 103 111 } 104 112 <meta name="theme-color" content="#4a2c2a" media="(prefers-color-scheme: light)"/> 105 113 <meta name="theme-color" content="#0F0A08" media="(prefers-color-scheme: dark)"/> 106 - <title>{ data.Title } - Arabica</title> 114 + <title>{ data.pageTitle() }</title> 107 115 <link rel="icon" href="/static/favicon.svg" type="image/svg+xml"/> 108 116 <link rel="icon" href="/static/favicon-32.svg" type="image/svg+xml" sizes="32x32"/> 109 117 <link rel="apple-touch-icon" href="/static/icon-192.svg"/>