Archived
1
0

add new route for board list

This commit is contained in:
Jeff 2018-11-25 07:09:34 -05:00
parent d1c392ce29
commit 76f9d84fa0
2 changed files with 9 additions and 2 deletions

View File

@ -97,6 +97,12 @@ func (self *nullHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}
// board list page
if strings.ToLower(path) == "/b/" {
template.genBoardList(self.prefix, self.name, w, self.database, i18n)
return
}
if strings.HasPrefix(path, "/b/") {
// board handler
parts := strings.Split(path[3:], "/")

View File

@ -26,9 +26,10 @@
</head>
<body>
<center>
<a href="{{prefix}}o/?lang={{i18n.Name}}"><img id="logo" src="{{prefix}}static/changolia-logo.png" /><h1>Enter</h1></a>
<a href="{{prefix}}boards.html"><h2>Board List</h2></a>
<a href="{{prefix}}b/"><h2>Board List</h2></a>
<a href="{{prefix}}o/?lang={{i18n.Name}}"><img id="logo" src="{{prefix}}static/changolia-logo.png" />Firehose</a>
<a href="{{prefix}}static/faq.html">FAQ</a>
</center>
<hr/>
<footer>