From b41368462c89dbfc5230350c46629266f03ad9d5 Mon Sep 17 00:00:00 2001 From: RenĂ© 'Necoro' Neumann Date: Tue, 16 Feb 2021 19:24:33 +0100 Subject: Use go-embed for templates instead of inline strings. They should also use CRLF (cf issue #46). --- internal/feed/template/html.tpl.go | 63 -------------------------------------- 1 file changed, 63 deletions(-) delete mode 100644 internal/feed/template/html.tpl.go (limited to 'internal/feed/template/html.tpl.go') diff --git a/internal/feed/template/html.tpl.go b/internal/feed/template/html.tpl.go deleted file mode 100644 index be84030..0000000 --- a/internal/feed/template/html.tpl.go +++ /dev/null @@ -1,63 +0,0 @@ -package template - -var Html = fromString("Feed", htmlTpl, true) - -//noinspection HtmlDeprecatedAttribute,HtmlUnknownTarget -const htmlTpl = `{{- /*gotype:github.com/Necoro/feed2imap-go/internal/feed.feeditem*/ -}} -{{define "bottomLine"}} - {{if .content}} - - - {{.descr}}   - - - {{.content}} - - - {{end}} -{{end}} - - - - - - - - - -
Feed - {{with .Feed.Link}}{{end}} - {{or .Feed.Title .Feed.Link "Unnammed feed"}} - {{if .Feed.Link}}{{end}} -
Item - {{with .Item.Link}}{{end}} - {{or .Item.Title .Item.Link}} - {{if .Item.Link}}{{end}} -
-{{with .Body}} - {{html .}} -{{end}} -{{with .Item.Enclosures}} - - - - - {{range .}} - - - - {{end}} -
Files:
-     - {{.URL | lastUrlPart}} ({{with .Length}}{{. | byteCount}}, {{end}}{{.Type}}) -
-{{end}} -
- - {{template "bottomLine" (dict "descr" "Date:" "content" .Date)}} - {{template "bottomLine" (dict "descr" "Author:" "content" .Creator)}} - {{template "bottomLine" (dict "descr" "Filed under:" "content" (join ", " .Categories))}} - {{with .FeedLink}} - {{template "bottomLine" (dict "descr" "Feed-Link:" "content" (print "" . "" | html))}} - {{end}} -
` -- cgit v1.2.3-54-g00ecf