summaryrefslogtreecommitdiffstats
path: root/pkg/html
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.net>2025-09-10 00:46:42 +0100
committerLeonardo Bishop <me@leonardobishop.net>2025-09-10 00:46:42 +0100
commitd122d841e8b7dd7f8942b6f2fa84220f95f2cae4 (patch)
treea00734c1109b222f2485bd31c61fdf5e00a6d516 /pkg/html
parentbaea81484f61fc341634ecf5e144d7ecf18ad42f (diff)
Add optional CSS to html
Diffstat (limited to 'pkg/html')
-rw-r--r--pkg/html/service.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/pkg/html/service.go b/pkg/html/service.go
index cba3a6c..8a7a163 100644
--- a/pkg/html/service.go
+++ b/pkg/html/service.go
@@ -34,16 +34,19 @@ func (s *service) GenerateHtml(entries []sqlc.GetEntriesRow) (string, error) {
currentDate = date
str += "<span class=\"entry\">"
+ str += "<a class=\"entry-title\" href=" + entry.Url + " target=\"_blank\">"
if entry.KindName == "starred" {
str += "<b>"
}
- str += "<a class=\"entry-title\" href=" + entry.Url + " target=\"_blank\">" + entry.KindEmoji + " " + entry.Title + "</a>"
+ str += entry.KindEmoji + " " + entry.Title
if entry.KindName == "starred" {
str += "</b>"
}
- str += " - <span class=\"entry-description\">" + entry.Description + "</span>"
- str += " - <span class=\"entry-date\">" + date.Format(time.DateOnly) + "</span>"
- str += "</span><br>"
+ str += "</a>"
+
+ str += "<span class=\"entry-description\">" + entry.Description + "</span>"
+ str += "<i class=\"entry-date\">on " + date.Format("02 Jan 2006") + "</i>"
+ str += "</span>"
}
return str, nil