summaryrefslogtreecommitdiff
blob: 4e5c5c638d55b35049d986f463431b040c43b5eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package links

import (
	"html/template"
	"net/http"
)

// Show renders a template to show the landing page of the application
func Show(w http.ResponseWriter, r *http.Request) {

	templates := template.Must(
		template.Must(
			template.New("Show").
				Funcs(getFuncMap()).
				ParseGlob("web/templates/layout/*.tmpl")).
			ParseGlob("web/templates/links/show.tmpl"))

	templates.ExecuteTemplate(w, "show.tmpl", getPageData(w, r, "show"))
}