Files
at-container-registry/pkg/appview/handlers/learn_more.go
T

32 lines
836 B
Go

package handlers
import (
"net/http"
)
// LearnMoreHandler handles the /learn-more page
type LearnMoreHandler struct {
BaseUIHandler
}
func (h *LearnMoreHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
meta := NewPageMeta(
"About "+h.ClientShortName+" - Decentralized Container Registry on AT Protocol",
"Learn how "+h.ClientShortName+" brings Docker container registries to the decentralized web using AT Protocol. Own your data, use your identity.",
).WithCanonical("https://" + h.SiteURL + "/learn-more").
WithSiteName(h.ClientShortName)
data := struct {
PageData
Meta *PageMeta
}{
PageData: NewPageData(r, &h.BaseUIHandler),
Meta: meta,
}
if err := h.Templates.ExecuteTemplate(w, "learn-more", data); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
}