put the ad (quote) banners in - last major feature in MISSINGFUNCS

This commit is contained in:
2026-03-02 22:52:45 -07:00
parent c26e7340c7
commit 5fa05bb086
33 changed files with 125 additions and 2 deletions
+9
View File
@@ -34,6 +34,9 @@ import (
//go:embed static_images/*
var static_images embed.FS
//go:embed adbanners/*
var ad_banners embed.FS
// Constants for default photo sizes.
const (
UserPhotoWidth = 100
@@ -71,6 +74,12 @@ func AmServeImage(c echo.Context) error {
if err == nil {
return c.Blob(http.StatusOK, mimeTypeFromFilename(components[3]), b)
}
case "ads/":
var b []byte
b, err = ad_banners.ReadFile(filepath.Join("adbanners", components[3]))
if err == nil {
return c.Blob(http.StatusOK, mimeTypeFromFilename(components[3]), b)
}
case "store/":
var id int
id, err = strconv.Atoi(components[3])