about summary refs log tree commit diff stats
path: root/templates
diff options
context:
space:
mode:
authorAlan Pearce2024-06-27 13:34:21 +0200
committerAlan Pearce2024-06-27 13:34:21 +0200
commit879cc25421c66a959ab801f0937b4264a461fc7e (patch)
tree29141c22ef84cfc36ba74302b14546c21dbef199 /templates
parentd07ec650aafcfe4692bba8f481bc3cb8204cd4b0 (diff)
downloadwebsite-879cc25421c66a959ab801f0937b4264a461fc7e.tar.lz
website-879cc25421c66a959ab801f0937b4264a461fc7e.tar.zst
website-879cc25421c66a959ab801f0937b4264a461fc7e.zip
use pointer to config in builder & templates
Diffstat (limited to 'templates')
-rw-r--r--templates/error.templ2
-rw-r--r--templates/homepage.templ2
-rw-r--r--templates/list.templ4
-rw-r--r--templates/page.templ2
-rw-r--r--templates/post.templ2
-rw-r--r--templates/tags.templ2
6 files changed, 7 insertions, 7 deletions
diff --git a/templates/error.templ b/templates/error.templ
index 2da7bef..c336ea9 100644
--- a/templates/error.templ
+++ b/templates/error.templ
@@ -6,7 +6,7 @@ import (
 	"strconv"
 )
 
-templ Error(config config.Config, path string, err *http.Error) {
+templ Error(config *config.Config, path string, err *http.Error) {
 	@Page(config, PageSettings{
 		Title: "Error",
 		Path:  path,
diff --git a/templates/homepage.templ b/templates/homepage.templ
index 0afbb2f..611a8ff 100644
--- a/templates/homepage.templ
+++ b/templates/homepage.templ
@@ -5,7 +5,7 @@ import (
 	"website/internal/content"
 )
 
-templ Homepage(config config.Config, posts []content.Post, content string) {
+templ Homepage(config *config.Config, posts []content.Post, content string) {
 	@Page(config, PageSettings{
 		Title: config.Title,
 		TitleAttrs: templ.Attributes{
diff --git a/templates/list.templ b/templates/list.templ
index 602c15c..94ccf5a 100644
--- a/templates/list.templ
+++ b/templates/list.templ
@@ -5,7 +5,7 @@ import (
 	"website/internal/content"
 )
 
-templ TagPage(config config.Config, tag string, posts []content.Post, path string) {
+templ TagPage(config *config.Config, tag string, posts []content.Post, path string) {
 	@Page(config, PageSettings{
 		Title: tag,
 		Path:  path,
@@ -24,7 +24,7 @@ templ TagPage(config config.Config, tag string, posts []content.Post, path strin
 	}
 }
 
-templ ListPage(config config.Config, posts []content.Post, path string) {
+templ ListPage(config *config.Config, posts []content.Post, path string) {
 	@Page(config, PageSettings{
 		Title: config.Title,
 		TitleAttrs: templ.Attributes{
diff --git a/templates/page.templ b/templates/page.templ
index 7869369..1dbd345 100644
--- a/templates/page.templ
+++ b/templates/page.templ
@@ -43,7 +43,7 @@ templ menuItem(item config.MenuItem) {
 	>{ item.Name }</a>
 }
 
-templ Page(site config.Config, page PageSettings) {
+templ Page(site *config.Config, page PageSettings) {
 	<!DOCTYPE html>
 	<html lang={ site.DefaultLanguage }>
 		<head>
diff --git a/templates/post.templ b/templates/post.templ
index 7b82584..c432e57 100644
--- a/templates/post.templ
+++ b/templates/post.templ
@@ -19,7 +19,7 @@ templ postDate(d time.Time) {
 	</time>
 }
 
-templ PostPage(config config.Config, post content.Post) {
+templ PostPage(config *config.Config, post content.Post) {
 	@Page(config, PageSettings{
 		Title: post.Title,
 		TitleAttrs: templ.Attributes{
diff --git a/templates/tags.templ b/templates/tags.templ
index 7218ca1..5e9878a 100644
--- a/templates/tags.templ
+++ b/templates/tags.templ
@@ -6,7 +6,7 @@ templ tagLink(tag string, attrs templ.Attributes) {
 	<a { attrs... } href={ templ.SafeURL("/tags/" + tag) }>#{ tag }</a>
 }
 
-templ TagsPage(config config.Config, title string, tags []string, path string) {
+templ TagsPage(config *config.Config, title string, tags []string, path string) {
 	@Page(config, PageSettings{
 		Title: title,
 		Path:  path,