From d38fc83df3824b840f0b3930e4cb7236bdab84b2 Mon Sep 17 00:00:00 2001 From: a73x Date: Tue, 27 Aug 2024 19:43:56 +0100 Subject: feat(content): support templating in content this is tired person code don't write tired person code --- templates/default.html | 5 +++ templates/index.html | 54 ----------------------------- templates/layouts/_default.html | 75 +++++++++++++++++++++++++++++++++++++++++ templates/layouts/default.html | 75 ----------------------------------------- templates/post.html | 6 ---- templates/posts.html | 9 ----- 6 files changed, 80 insertions(+), 144 deletions(-) create mode 100644 templates/default.html delete mode 100644 templates/index.html create mode 100644 templates/layouts/_default.html delete mode 100644 templates/layouts/default.html delete mode 100644 templates/post.html delete mode 100644 templates/posts.html (limited to 'templates') diff --git a/templates/default.html b/templates/default.html new file mode 100644 index 0000000..3d68d2c --- /dev/null +++ b/templates/default.html @@ -0,0 +1,5 @@ +{{template "base" .}} +{{define "content"}} +

{{.Meta.title}}

+{{ .Body }} +{{end}} \ No newline at end of file diff --git a/templates/index.html b/templates/index.html deleted file mode 100644 index e84a09e..0000000 --- a/templates/index.html +++ /dev/null @@ -1,54 +0,0 @@ -{{template "base" .}} -{{define "content"}} - -

tidbits

-

#go

- -

#git

- - -

resources

- -

books

- -{{end}} diff --git a/templates/layouts/_default.html b/templates/layouts/_default.html new file mode 100644 index 0000000..beab01e --- /dev/null +++ b/templates/layouts/_default.html @@ -0,0 +1,75 @@ +{{define "base"}} + + + + + + + + + a73x + + + + +

a73x

+ high effort, low reward + + {{ template "content" . }} + + + + +{{end}} \ No newline at end of file diff --git a/templates/layouts/default.html b/templates/layouts/default.html deleted file mode 100644 index 14868cf..0000000 --- a/templates/layouts/default.html +++ /dev/null @@ -1,75 +0,0 @@ -{{define "base"}} - - - - - - - - - a73x - - - - -

a73x

- high effort, low reward - - {{ template "content" . }} - - - - -{{end}} \ No newline at end of file diff --git a/templates/post.html b/templates/post.html deleted file mode 100644 index 0a6cc6e..0000000 --- a/templates/post.html +++ /dev/null @@ -1,6 +0,0 @@ -{{template "base" .}} -{{define "content"}} -

{{.Title}}

-{{ .Post }} -{{end}} - diff --git a/templates/posts.html b/templates/posts.html deleted file mode 100644 index c68fb73..0000000 --- a/templates/posts.html +++ /dev/null @@ -1,9 +0,0 @@ -{{template "base" .}} -{{define "content"}} -

posts

- -{{end}} -- cgit v1.2.3