From 95aee6cf75191df8d6077e51638b89585bae9817 Mon Sep 17 00:00:00 2001 From: Amy Gale Ruth Bowersox Date: Wed, 4 Mar 2026 22:36:00 -0700 Subject: [PATCH] broke out a lot of base bits of the frame as configurable options --- config/config.go | 11 +++++++++-- config/default.yaml | 6 ++++++ ui/views/footer.jet | 24 ++++++++++++++++++++++++ ui/views/frame.jet | 29 +++++------------------------ 4 files changed, 44 insertions(+), 26 deletions(-) create mode 100644 ui/views/footer.jet diff --git a/config/config.go b/config/config.go index 0ee0297..6b20fdf 100644 --- a/config/config.go +++ b/config/config.go @@ -59,14 +59,21 @@ func (*AmCLI) Version() string { // AmConfig holds the configuration of the application as read from YAML. type AmConfig struct { Site struct { - BaseURL string `yaml:"baseURL"` - Title string `yaml:"title"` + BaseURL string `yaml:"baseURL"` + Title string `yaml:"title"` + SiteIcon struct { + Path string `yaml:"path"` + Type string `yaml:"type"` + } `yaml:"siteIcon"` + SiteShortcutIcon string `yaml:"siteShortcutIcon"` + SiteLogo string `yaml:"siteLogo"` TopRefresh int `yaml:"topRefresh"` LoginCookieName string `yaml:"loginCookieName"` LoginCookieAge int `yaml:"loginCookieAge"` SessionExpire string `yaml:"sessionExpire"` UserAgreementResource string `yaml:"userAgreementResource"` PolicyResource string `yaml:"policyResource"` + FooterTemplate string `yaml:"footerTemplate"` } `yaml:"site"` Database struct { Driver string `yaml:"driver"` diff --git a/config/default.yaml b/config/default.yaml index a881c4b..620cb9f 100644 --- a/config/default.yaml +++ b/config/default.yaml @@ -9,12 +9,18 @@ site: baseURL: "http://localhost:1323" title: "Amsterdam Web Communities System" + siteIcon: + path: "/img/builtin/AmsterdamIcon32.png" + type: "image/png" + siteShortcutIcon: "/img/builtin/AmsterdamIcon32.ico" + siteLogo: "/img/builtin/powered-by-amsterdam.png" topRefresh: 300 loginCookieName: AmsterdamAuth loginCookieAge: 365 sessionExpire: "3h" userAgreementResource: "useragreement.html" policyResource: "policy.html" + footerTemplate: "footer.jet" database: driver: "mysql" dsn: "amsdb:x00yes2k@tcp(localhost)/amsterdam?parseTime=true&loc=UTC" diff --git a/ui/views/footer.jet b/ui/views/footer.jet new file mode 100644 index 0000000..1d61fb9 --- /dev/null +++ b/ui/views/footer.jet @@ -0,0 +1,24 @@ +{* + * Amsterdam Web Communities System + * Copyright (c) 2025-2026 Erbosoft Metaverse Design Solutions, All Rights Reserved + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + *} +
+
+ All trademarks and copyrights on this page are owned by their respective companies.
+ All messages posted by users on this page are owned by those users.
+ The rest: Copyright © {{ AmsterdamCopyright }} + Erbosoft Metaverse Design Solutions, + All Rights Reserved.
+ See our Policy Page + for our copyright and privacy policies. +
+
+ + Powered By Amsterdam + +
+
diff --git a/ui/views/frame.jet b/ui/views/frame.jet index f1ca745..f0057ad 100644 --- a/ui/views/frame.jet +++ b/ui/views/frame.jet @@ -1,6 +1,6 @@ {* * Amsterdam Web Communities System - * Copyright (c) 2025 Erbosoft Metaverse Design Solutions, All Rights Reserved + * Copyright (c) 2025-2026 Erbosoft Metaverse Design Solutions, All Rights Reserved * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -13,8 +13,8 @@ {{ .FrameTitle() | raw }} - {{ GlobalConfig.Site.Title }} - - + + {{ range k, v := .FrameMetadata(0) }} {{ end }} @@ -28,11 +28,7 @@
- - {{ GlobalConfig.Site.Title }} - + {{ GlobalConfig.Site.Title }}
@@ -117,22 +113,7 @@
 

-
-
- All trademarks and copyrights on this page are owned by their respective companies.
- All messages posted by users on this page are owned by those users.
- The rest: Copyright © {{ AmsterdamCopyright }} - Erbosoft Metaverse Design Solutions, - All Rights Reserved.
- See our Policy Page - for our copyright and privacy policies. -
-
- - Powered By Amsterdam - -
-
+ {{ include GlobalConfig.Site.FooterTemplate }}