aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorMax Magorsch <arzano@gentoo.org>2020-06-23 19:39:37 +0000
committerMax Magorsch <arzano@gentoo.org>2020-06-23 19:39:37 +0000
commit7afe2554efd70e0a2ff4b0d54618b9fa744f3af7 (patch)
treec99fd2164e95e1a98e44f41deeca227594b19a75 /pkg
parentDecode subjects correctly (diff)
downloadarchives-7afe2554efd70e0a2ff4b0d54618b9fa744f3af7.tar.gz
archives-7afe2554efd70e0a2ff4b0d54618b9fa744f3af7.tar.bz2
archives-7afe2554efd70e0a2ff4b0d54618b9fa744f3af7.zip
Specify the used templates more explicitly
Signed-off-by: Max Magorsch <arzano@gentoo.org>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/app/home/utils.go2
-rw-r--r--pkg/app/list/utils.go8
-rw-r--r--pkg/app/message/utils.go2
-rw-r--r--pkg/app/popular/utils.go2
-rw-r--r--pkg/app/search/utils.go2
5 files changed, 8 insertions, 8 deletions
diff --git a/pkg/app/home/utils.go b/pkg/app/home/utils.go
index cb2e45e..6677302 100644
--- a/pkg/app/home/utils.go
+++ b/pkg/app/home/utils.go
@@ -16,7 +16,7 @@ func renderIndexTemplate(w http.ResponseWriter, templateData interface{}) {
template.Must(
template.New("Show").
ParseGlob("web/templates/layout/*.tmpl")).
- ParseGlob("web/templates/home/*.tmpl"))
+ ParseGlob("web/templates/home/home.tmpl"))
templates.ExecuteTemplate(w, "home.tmpl", templateData)
}
diff --git a/pkg/app/list/utils.go b/pkg/app/list/utils.go
index 7899a88..868e447 100644
--- a/pkg/app/list/utils.go
+++ b/pkg/app/list/utils.go
@@ -24,7 +24,7 @@ func renderShowTemplate(w http.ResponseWriter, listName string, messageData inte
template.Must(
template.New("Show").
ParseGlob("web/templates/layout/*.tmpl")).
- ParseGlob("web/templates/list/*.tmpl"))
+ ParseGlob("web/templates/list/show.tmpl"))
templteData := struct {
ListName string
@@ -46,7 +46,7 @@ func renderMessagesTemplate(w http.ResponseWriter, listName string, date string,
Funcs(getFuncMap()).
ParseGlob("web/templates/layout/*.tmpl")).
ParseGlob("web/templates/list/components/*.tmpl")).
- ParseGlob("web/templates/list/*.tmpl"))
+ ParseGlob("web/templates/list/messages.tmpl"))
templates.ExecuteTemplate(w, "messages.tmpl", buildListData(listName, date, currentPage, maxPages, messages))
}
@@ -60,7 +60,7 @@ func renderThreadsTemplate(w http.ResponseWriter, listName string, date string,
Funcs(getFuncMap()).
ParseGlob("web/templates/layout/*.tmpl")).
ParseGlob("web/templates/list/components/*.tmpl")).
- ParseGlob("web/templates/list/*.tmpl"))
+ ParseGlob("web/templates/list/threads.tmpl"))
templates.ExecuteTemplate(w, "threads.tmpl", buildListData(listName, date, currentPage, maxPages, messages))
}
@@ -75,7 +75,7 @@ func renderBrowseTemplate(w http.ResponseWriter, lists interface{}) {
"formatCount" : utils.FormatMessageCount,
}).
ParseGlob("web/templates/layout/*.tmpl")).
- ParseGlob("web/templates/list/*.tmpl"))
+ ParseGlob("web/templates/list/browse.tmpl"))
templates.ExecuteTemplate(w, "browse.tmpl", lists)
}
diff --git a/pkg/app/message/utils.go b/pkg/app/message/utils.go
index f79e6f3..3c8e116 100644
--- a/pkg/app/message/utils.go
+++ b/pkg/app/message/utils.go
@@ -16,7 +16,7 @@ func renderMessageTemplate(w http.ResponseWriter, listName string, message *mode
template.New("Show").
Funcs(getFuncMap()).
ParseGlob("web/templates/layout/*.tmpl")).
- ParseGlob("web/templates/message/*.tmpl"))
+ ParseGlob("web/templates/message/show.tmpl"))
templateData := struct {
ListName string
diff --git a/pkg/app/popular/utils.go b/pkg/app/popular/utils.go
index 66abe3e..574e60b 100644
--- a/pkg/app/popular/utils.go
+++ b/pkg/app/popular/utils.go
@@ -13,7 +13,7 @@ func renderPopularThreads(w http.ResponseWriter, templateData interface{}) {
template.Must(
template.New("Popular").
ParseGlob("web/templates/layout/*.tmpl")).
- ParseGlob("web/templates/popular/*.tmpl"))
+ ParseGlob("web/templates/popular/threads.tmpl"))
templates.ExecuteTemplate(w, "threads.tmpl", templateData)
}
diff --git a/pkg/app/search/utils.go b/pkg/app/search/utils.go
index 0fa4285..6f4ac09 100644
--- a/pkg/app/search/utils.go
+++ b/pkg/app/search/utils.go
@@ -24,7 +24,7 @@ func renderSearchTemplate(w http.ResponseWriter, showThreads bool, searchQuery s
Funcs(getFuncMap()).
ParseGlob("web/templates/layout/*.tmpl")).
ParseGlob("web/templates/search/components/pagination.tmpl")).
- ParseGlob("web/templates/search/*.tmpl"))
+ ParseGlob("web/templates/search/searchresults.tmpl"))
templates.ExecuteTemplate(w, "searchresults.tmpl", buildSearchData(showThreads, searchQuery, messagesCount, currentPage, maxPages, messages))
}