diff --git a/handlers.go b/handlers.go index a6afe8e..607a107 100644 --- a/handlers.go +++ b/handlers.go @@ -1,6 +1,7 @@ package main import ( + "code.as/writeas/developers-site/platform" "fmt" "github.com/writeas/web-core/log" "net/http" @@ -55,9 +56,11 @@ func viewPage(w http.ResponseWriter, r *http.Request) { return } p := struct { - Path string + Path string + Platform platform.Platform }{ - Path: name, + Path: name, + Platform: platform.WriteAs, } err = t.ExecuteTemplate(w, "base", p) diff --git a/platform/platforms.go b/platform/platforms.go new file mode 100644 index 0000000..f580e86 --- /dev/null +++ b/platform/platforms.go @@ -0,0 +1,23 @@ +package platform + +type Platform struct { + Name string + URL string + LogoURL string + StyleSheetURL string + CodeAsName string + GitHubName string + MatomoID int +} + +var ( + WriteAs = Platform{ + Name: "Write.as", + URL: "https://write.as", + LogoURL: "https://write.as/img/w-sq.svg", + StyleSheetURL: "https://write.as/css/write.css", + CodeAsName: "writeas", + GitHubName: "writeas", + MatomoID: 7, + } +) diff --git a/templates/base.tmpl b/templates/base.tmpl index ecacca4..3bd3f27 100644 --- a/templates/base.tmpl +++ b/templates/base.tmpl @@ -3,14 +3,14 @@ {{ template "head" . }} - +