added config variables for default community logo and user photo

This commit is contained in:
2026-03-04 23:06:09 -07:00
parent 2b7225c269
commit 0d93e4f1f9
9 changed files with 15 additions and 7 deletions
+1 -1
View File
@@ -111,7 +111,7 @@ func immediateIf(a jet.Arguments) reflect.Value {
// extractCommunityLogo extracts a community logo URL from a community.
func extractCommunityLogo(a jet.Arguments) reflect.Value {
rc := "/img/builtin/default-community.jpg"
rc := config.GlobalConfig.Site.DefaultCommunityLogo
comm := a.Get(0).Convert(reflect.TypeFor[*database.Community]()).Interface().(*database.Community)
ctxt := a.Get(1).Convert(reflect.TypeFor[AmContext]()).Interface().(AmContext)
ci, err := comm.ContactInfo(ctxt.Ctx())
+1 -1
View File
@@ -21,7 +21,7 @@
<div class="flex-shrink-0 w-40">
<div class="border-2 border-gray-300 rounded mb-4">
<img src="{{ photoURL }}" alt="{{ username }}'s photo" class="w-full h-auto rounded-3xl border-2 border-gray-300"
onerror="this.src='/img/builtin/no-user.png'">
onerror="this.src='{{ GlobalConfig.Site.DefaultUserPhoto }}'">
</div>
<div class="text-xs text-gray-700 space-y-2">
<div>
+1 -1
View File
@@ -12,7 +12,7 @@
<div class="flex-shrink-0">
<img src="{{ post_profile_pic }}" alt="Profile image: {{ post_userName }}"
class="w-16 h-16 rounded-lg border-2 border-gray-300"
onerror="this.src='/img/builtin/no-user.png'">
onerror="this.src='{{ GlobalConfig.Site.DefaultUserPhoto }}'">
</div>
{{ end }}
<div class="flex-1">