about summary refs log tree commit diff stats
path: root/internal/builder/homepage.templ
diff options
context:
space:
mode:
authorAlan Pearce2024-06-24 21:48:36 +0200
committerAlan Pearce2024-06-24 23:09:15 +0200
commita2feb8c63c80a1f52830f562af2deb2c6065eaae (patch)
tree448ed15c5fb91099ef29528c529a35d6151d98ee /internal/builder/homepage.templ
parent8623948592fa14958d340b006653fc57861c4fc4 (diff)
downloadwebsite-a2feb8c63c80a1f52830f562af2deb2c6065eaae.tar.lz
website-a2feb8c63c80a1f52830f562af2deb2c6065eaae.tar.zst
website-a2feb8c63c80a1f52830f562af2deb2c6065eaae.zip
move templ templates into separate package
Diffstat (limited to 'internal/builder/homepage.templ')
-rw-r--r--internal/builder/homepage.templ42
1 files changed, 0 insertions, 42 deletions
diff --git a/internal/builder/homepage.templ b/internal/builder/homepage.templ
deleted file mode 100644
index 848b9ed..0000000
--- a/internal/builder/homepage.templ
+++ /dev/null
@@ -1,42 +0,0 @@
-package builder
-
-import (
-	"website/internal/config"
-	"website/internal/content"
-)
-
-templ homepage(config config.Config, posts []content.Post, content string) {
-	@page(config, PageSettings{
-		Title: config.Title,
-		TitleAttrs: templ.Attributes{
-			"class": "p-name u-url",
-		},
-		Path: "/",
-		BodyAttrs: templ.Attributes{
-			"class": "h-card",
-		},
-	}) {
-		<div id="content">
-			@Unsafe(content)
-		</div>
-		<section>
-			<h2>Latest Posts</h2>
-			@list(posts[0:3])
-		</section>
-		<section>
-			<h2>Elsewhere on the Internet</h2>
-			<ul class="elsewhere">
-				<li>
-					<a class="u-email" rel="me" href={ templ.SafeURL("mailto:" + config.Email) }>
-						{ config.Email }
-					</a>
-				</li>
-				for _, link := range config.Menus["me"] {
-					<li>
-						<a class="u-url" rel="me" href={ templ.SafeURL(link.URL.String()) }>{ link.Name }</a>
-					</li>
-				}
-			</ul>
-		</section>
-	}
-}