From a1c4b750fbf4680445c52ec4605a7d27223885d7 Mon Sep 17 00:00:00 2001 From: Amy Gale Ruth Bowersox Date: Thu, 5 Mar 2026 22:38:19 -0700 Subject: [PATCH] added variables for the top page content --- config/config.go | 3 +++ config/default.yaml | 5 +++++ ui/views/top.jet | 8 +++----- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/config/config.go b/config/config.go index c43e8fb..bf65d98 100644 --- a/config/config.go +++ b/config/config.go @@ -88,6 +88,9 @@ type AmConfig struct { FooterTemplate string `yaml:"footerTemplate"` DefaultCommunityLogo string `yaml:"defaultCommunityLogo"` DefaultUserPhoto string `yaml:"defaultUserPhoto"` + WelcomeTitle string `yaml:"welcomeTitle"` + WelcomeMessage string `yaml:"welcomeMessage"` + TopPostsTitle string `yaml:"topPostsTitle"` } `yaml:"site"` Database struct { Driver string `yaml:"driver"` diff --git a/config/default.yaml b/config/default.yaml index 330980f..b9cb88d 100644 --- a/config/default.yaml +++ b/config/default.yaml @@ -25,6 +25,11 @@ site: footerTemplate: "footer.jet" defaultCommunityLogo: "/img/builtin/default-community.jpg" defaultUserPhoto: "/img/builtin/no-user.png" + welcomeTitle: "Welcome to Amsterdam" + welcomeMessage: > + Welcome to the Amsterdam Web Communities System. To get the most out of this site, you should log in or create an account, + using one of the links above. + topPostsTitle: "Latest from the Conferences" database: driver: "mysql" dsn: "amsdb:x00yes2k@tcp(localhost)/amsterdam?parseTime=true&loc=UTC" diff --git a/ui/views/top.jet b/ui/views/top.jet index ce03f4c..b8e49c7 100644 --- a/ui/views/top.jet +++ b/ui/views/top.jet @@ -12,17 +12,15 @@ {{ if .CurrentUser().IsAnon }}
-

Welcome to Amsterdam

+

{{ GlobalConfig.Site.WelcomeTitle | raw }}


-

- Welcome to the Amsterdam Web Communities System. To get the most out of this site, you should log in or create an account, using one of the links above. -

+

{{ GlobalConfig.Site.WelcomeMessage | raw }}

{{ end }}
-

Latest from the Conferences

+

{{ GlobalConfig.Site.TopPostsTitle | raw }}


{{ user := "" }}