initial commit before refactor switch
This commit is contained in:
18
server/funcs_tpl.go
Normal file
18
server/funcs_tpl.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
`fmt`
|
||||
`strings`
|
||||
)
|
||||
|
||||
func getTitle(subPage string) (title string) {
|
||||
|
||||
if subPage == "" || subPage == "index" {
|
||||
title = baseTitle
|
||||
return
|
||||
}
|
||||
|
||||
title = fmt.Sprintf("%s%s%s", baseTitle, titleSep, strings.ToTitle(subPage))
|
||||
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user