UP Reader
This commit is contained in:
@@ -12,6 +12,7 @@ type TemplatePointer struct {
|
||||
}
|
||||
|
||||
type HtmlTemplate struct {
|
||||
Reader TemplatePointer
|
||||
Talk TemplatePointer
|
||||
Album TemplatePointer
|
||||
Article TemplatePointer
|
||||
@@ -68,7 +69,7 @@ func BuildViewData(title string, data interface{}) map[string]interface{} {
|
||||
// error: 错误信息(如果有)
|
||||
func initHtmlTemplate(viewDir string) (HtmlTemplate, error) {
|
||||
tp, err := readHtmlTemplate(
|
||||
[]string{"index", "extraNav", "dashboard", "categories", "article", "album", "talk"},
|
||||
[]string{"index", "extraNav", "dashboard", "categories", "article", "album", "talk", "reader"},
|
||||
viewDir)
|
||||
if err != nil {
|
||||
return HtmlTemplate{}, err
|
||||
@@ -82,6 +83,7 @@ func initHtmlTemplate(viewDir string) (HtmlTemplate, error) {
|
||||
Article: tp[4],
|
||||
Album: tp[5],
|
||||
Talk: tp[6],
|
||||
Reader: tp[7],
|
||||
}, nil
|
||||
}
|
||||
func SpreadDigit(n int) []int {
|
||||
|
Reference in New Issue
Block a user