From 9f5978186ac3de07f4325975fecf4f538fe713b6 Mon Sep 17 00:00:00 2001 From: Sam Scholten Date: Mon, 15 Dec 2025 19:34:17 +1000 Subject: Init v0.1.0 --- cmds/templates/results.html | 279 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 279 insertions(+) create mode 100644 cmds/templates/results.html (limited to 'cmds/templates/results.html') diff --git a/cmds/templates/results.html b/cmds/templates/results.html new file mode 100644 index 0000000..13f68e0 --- /dev/null +++ b/cmds/templates/results.html @@ -0,0 +1,279 @@ +{{define "results"}} + + + + + + {{.PageTitle}} - Results + + + +

{{.PageTitle}}

+ + +
+ {{if .IsScoreResult}} +
+

Score Article

+ {{if .Error}} +
{{.Error}}
+
+ + + + + If URL is provided, title will be automatically extracted + +
+ {{else}} +
+
{{.Rating}}/10
+

Score: {{printf "%.3f" .Score}}

+

{{.Title}}

+
+
+ + + + + If URL is provided, title will be automatically extracted + +
+ {{end}} +
+ +
+

Scan Feed

+
+ + + +
+
+ + {{else if .IsScanResult}} +
+

Score Article

+
+ + + + + If URL is provided, title will be automatically extracted + +
+
+ +
+

Scan Feed

+ {{if .Error}} +
{{.Error}}
+
+ + + +
+ {{else}} +
+ {{len .Articles}} articles from {{.FeedURL}} (threshold: {{printf "%.2f" .Threshold}}) +
+
+ {{$threshold := .Threshold}} + {{range .Articles}} + {{$isGood := ge .Score $threshold}} + {{$bgColor := "white"}} + {{if $isGood}} + {{$bgColor = "#e8f5e9"}} + {{else}} + {{$bgColor = "#ffebee"}} + {{end}} + {{$indicator := "✗"}} + {{if $isGood}} + {{$indicator = "✓"}} + {{end}} +
+
+ {{.Title}} +
+ +
+ {{end}} +
+
+ + + +
+ {{end}} +
+ {{end}} +
+ + +{{end}} -- cgit v1.2.3