about page handler with peer project data
This commit is contained in:
parent
9491eb0586
commit
37a432d621
1 changed files with 72 additions and 0 deletions
72
web/pages/about/about.go
Normal file
72
web/pages/about/about.go
Normal file
|
@ -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,
|
||||||
|
)
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue