Add about page.

This commit is contained in:
A. Svensson 2016-04-21 16:32:04 +02:00
parent 6fe5510291
commit 2976629ad2
2 changed files with 28 additions and 1 deletions

View File

@ -52,7 +52,7 @@ func (i *Instance) Serve(addr string) error {
i.router.GET("/server/:server_id", i.page_server) i.router.GET("/server/:server_id", i.page_server)
//i.router.GET("/stats", page_stats) //i.router.GET("/stats", page_stats)
//i.router.GET("/about", page_about) i.router.GET("/about", i.page_about)
return i.router.Run(i.addr) return i.router.Run(i.addr)
} }
@ -65,6 +65,10 @@ func (i *Instance) page_index(c *gin.Context) {
}) })
} }
func (i *Instance) page_about(c *gin.Context) {
c.HTML(http.StatusOK, "page_about.html", nil)
}
func (i *Instance) page_server(c *gin.Context) { func (i *Instance) page_server(c *gin.Context) {
id, err := strconv.ParseInt(c.Param("server_id"), 10, 0) id, err := strconv.ParseInt(c.Param("server_id"), 10, 0)
if err != nil { if err != nil {

23
templates/page_about.html Normal file
View File

@ -0,0 +1,23 @@
{{template "header" .}}
<h1>About</h1>
<p>A server hub dedicated to SS13 and possibly a better replacement for the default
server page at <a href="http://www.byond.com/games/exadv1/spacestation13">Byond</a>.</p>
<p>More info and full source code can be found on
<a href="https://github.com/lmas/ss13_se">Github</a>.</p>
<h2>Data Sources</h2>
<p>The data used for most of the <strong>public</strong> servers is scraped from
the <a href="http://www.byond.com/games/exadv1/spacestation13">Byond</a> page.</p>
<p>All <strong>private</strong> servers, and some public ones, are being polled
directly for data.</p>
<p>If you would like to <strong>add your server</strong> to the private list,
and accept being polled about 4 times an hour, please open a
<a href="https://github.com/lmas/ss13_se/issues/new">new ticket</a> on the
issue tracker on github.</p>
{{template "footer"}}