From 37a432d6215478d0406a01eb9b13802edddc9dad Mon Sep 17 00:00:00 2001 From: spatialfree Date: Sun, 3 Nov 2024 02:45:14 -0500 Subject: [PATCH] about page handler with peer project data --- web/pages/about/about.go | 72 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 web/pages/about/about.go diff --git a/web/pages/about/about.go b/web/pages/about/about.go new file mode 100644 index 0000000..a61c877 --- /dev/null +++ b/web/pages/about/about.go @@ -0,0 +1,72 @@ +package about + +import ( + "net/http" + + "dofdev/tem" +) + +type Project struct { + Name string + Url string + Icon string +} +type Profile struct { + Name string + Url string + Pfp string +} +type Peer struct { + Project Project + Profile Profile `` +} + +var Peers = []Peer{ + { + Project{ + Name: "StereoKit", + Url: "https://stereokit.net", + Icon: "https://stereokit.net/img/StereoKitLogoLight.svg", + }, + Profile{}, + }, + { + Project{ + Name: "Stardust XR", + Url: "https://stardustxr.org", + Icon: "https://stardustxr.org/img/icon.gif", + }, + Profile{}, + }, + { + Project{ + Name: "Project Northstar", + Url: "https://www.projectnorthstar.org/", + Icon: "/public/img/icons/northstar.svg", + }, + Profile{}, + }, + { + Project{ + Name: "Daemon XR", + Url: "https://daemonxr.com", + Icon: "/public/img/icons/daemonxr.png", + }, + Profile{}, + }, +} + +func Handler(w http.ResponseWriter, r *http.Request) { + data := struct { + Peers []Peer + }{ + Peers: Peers, + } + tem.Render( + w, r, + "about.html", + "dofdev", + "an effort to open higher degrees of spatial interaction free to the world.", + data, + ) +}