privacy policy per game
This commit is contained in:
parent
c92b96adc0
commit
7b10cad239
3 changed files with 53 additions and 7 deletions
|
@ -24,6 +24,7 @@ func New() *mux.Router {
|
||||||
r.HandleFunc("/move/{hash}", moves.MoveHandler)
|
r.HandleFunc("/move/{hash}", moves.MoveHandler)
|
||||||
r.HandleFunc("/games", games.Handler)
|
r.HandleFunc("/games", games.Handler)
|
||||||
r.HandleFunc("/game/{hash}", games.GameHandler)
|
r.HandleFunc("/game/{hash}", games.GameHandler)
|
||||||
|
r.HandleFunc("/game/{hash}/privacy", games.PrivacyHandler)
|
||||||
r.HandleFunc("/projects", projects.Handler)
|
r.HandleFunc("/projects", projects.Handler)
|
||||||
r.HandleFunc("/project/{hash}", projects.ProjectHandler)
|
r.HandleFunc("/project/{hash}", projects.ProjectHandler)
|
||||||
|
|
||||||
|
|
16
tem/html/pages/privacy.html
Normal file
16
tem/html/pages/privacy.html
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{{ template "head.html" .}}
|
||||||
|
|
||||||
|
<div style="height: 48px;"></div>
|
||||||
|
<!-- <h1 style='width: 100%; word-wrap: break-word; hyphens: auto;'>
|
||||||
|
{{ .Title }}
|
||||||
|
<p>
|
||||||
|
{{ .Desc }}
|
||||||
|
</p>
|
||||||
|
</h1> -->
|
||||||
|
{{ template "title_desc.html" .}}
|
||||||
|
|
||||||
|
|
||||||
|
<h2>policy</h2>
|
||||||
|
<pre>{{ .Data.Game.PrivacyPolicy }}</pre>
|
||||||
|
|
||||||
|
<div style='height: 44px; width: 100%;'></div>
|
|
@ -12,13 +12,15 @@ type Game struct {
|
||||||
Name string
|
Name string
|
||||||
Desc string
|
Desc string
|
||||||
|
|
||||||
Notes string
|
PrivacyPolicy string
|
||||||
|
Notes string
|
||||||
}
|
}
|
||||||
|
|
||||||
var Games = map[string]Game{
|
var Games = map[string]Game{
|
||||||
"silo": {
|
"silo": {
|
||||||
Name: "stretch silo",
|
Name: "stretch silo",
|
||||||
Desc: "a stretch cursor 360 missile defense game",
|
Desc: "a stretch cursor 360 missile defense game",
|
||||||
|
PrivacyPolicy: "we do not collect store or distribute any user data",
|
||||||
Notes: `start with air raid sirens
|
Notes: `start with air raid sirens
|
||||||
and shouted commands
|
and shouted commands
|
||||||
shilouttes in the night
|
shilouttes in the night
|
||||||
|
@ -35,16 +37,18 @@ missiles fly in
|
||||||
*ref typhon missile system`,
|
*ref typhon missile system`,
|
||||||
},
|
},
|
||||||
"snake": {
|
"snake": {
|
||||||
Name: "snake in a box",
|
Name: "snake in a box",
|
||||||
Desc: "vr snake zencore",
|
Desc: "vr snake zencore",
|
||||||
|
PrivacyPolicy: "we do not collect store or distribute any user data",
|
||||||
Notes: `cute happy go lucky eating stuff
|
Notes: `cute happy go lucky eating stuff
|
||||||
|
|
||||||
older and bigger
|
older and bigger
|
||||||
and have to deal with your past choices`,
|
and have to deal with your past choices`,
|
||||||
},
|
},
|
||||||
"vien": {
|
"vien": {
|
||||||
Name: "vien",
|
Name: "vien",
|
||||||
Desc: "hordiculture",
|
Desc: "hordiculture",
|
||||||
|
PrivacyPolicy: "we do not collect store or distribute any user data",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,3 +91,28 @@ func GameHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
data,
|
data,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func PrivacyHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
hash := mux.Vars(r)["hash"]
|
||||||
|
|
||||||
|
game, ok := Games[hash]
|
||||||
|
if !ok {
|
||||||
|
w.WriteHeader(http.StatusNotFound)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
data := struct {
|
||||||
|
Hash string
|
||||||
|
Game Game
|
||||||
|
}{
|
||||||
|
Hash: hash,
|
||||||
|
Game: game,
|
||||||
|
}
|
||||||
|
tem.Render(
|
||||||
|
w, r,
|
||||||
|
"privacy.html",
|
||||||
|
"privacy",
|
||||||
|
game.Name,
|
||||||
|
data,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue