From 1057b54b3dd0ebe776b6ffa3344a5c4dd3a19bc7 Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Mon, 27 Jan 2025 17:05:20 -0800 Subject: [PATCH] Refactor item into a template --- web/html/feed.html | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/web/html/feed.html b/web/html/feed.html index b02b9a9..c32f0da 100644 --- a/web/html/feed.html +++ b/web/html/feed.html @@ -11,16 +11,7 @@ {{ or .Title .Id | raw }} {{- end }} -{{ define "content" -}} -
- -Home -[Active | All] - -
- -{{ if .Items }} -{{ range .Items }} +{{ define "item" -}}
{{/* The item title is a clickable if there is body content */}} @@ -57,7 +48,20 @@
{{ end }} -{{/* end range .Items */}} +{{/* end define "item" */}} + +{{ define "content" -}} +
+ +Home +[Active | All] + +
+ +{{ if .Items }} +{{ range .Items }} + {{ template "item" . }} +{{ end }}