From f8a89ce8d9a3d5882a484fcaec810dc90f4a5e5d Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Thu, 23 Apr 2020 20:51:11 +0200 Subject: Move template to subfolder of feed --- internal/feed/template/feed.tpl.go | 76 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 internal/feed/template/feed.tpl.go (limited to 'internal/feed/template/feed.tpl.go') diff --git a/internal/feed/template/feed.tpl.go b/internal/feed/template/feed.tpl.go new file mode 100644 index 0000000..3f6470f --- /dev/null +++ b/internal/feed/template/feed.tpl.go @@ -0,0 +1,76 @@ +package template + +var Feed = fromString("Feed", feedTpl) + +//noinspection HtmlDeprecatedAttribute,HtmlUnknownTarget +const feedTpl = `{{- /*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 .Item.Description}} +
+ {{html .}} +{{end}} +{{with .Item.Content}} +
+ {{html .}} +{{end}} +{{with .Item.Enclosures}} + + + + +
+ + + {{range .}} + + + + {{end}} +
Files:
+     + {{.URL | lastUrlPart}} ({{.Length | byteCount}}, {{.Type}}) +
+
+{{end}} +
+ + {{template "bottomLine" (dict "descr" "Date:" "content" .Item.Published)}} + {{with .Item.Author}}{{template "bottomLine" (dict "descr" "Author:" "content" .Name)}}{{end}} + {{template "bottomLine" (dict "descr" "Subject:" "content" .Item.Title)}} + {{template "bottomLine" (dict "descr" "Filed under:" "content" (join ", " .Item.Categories))}} +
` -- cgit v1.2.3-70-g09d2 mp;id=ce9d81ac44d0a915ba23d5a032cede1bde321729&follow=1'>Honor branches different from masterRené 'Necoro' Neumann1-2/+4 2009-10-23Change the new_version plugin to use git.René 'Necoro' Neumann2-32/+33 2009-10-15Objectified all the functional stuff in backend.__init__.René 'Necoro' Neumann2-32/+34 2009-10-08Enhance the splash window handling.René 'Necoro' Neumann2-2/+9 2009-10-08Enhance the splash window handling.René 'Necoro' Neumann2-2/+9 2009-10-05Some more stuff to ignoreRené 'Necoro' Neumann1-0/+3 2009-10-05Renamed the ignore fileRené 'Necoro' Neumann1-0/+0 2009-10-05Update NEWSRené 'Necoro' Neumann1-0/+1 2009-10-05Also allow 'unselect all' in the PkgListRené 'Necoro' Neumann1-1/+10 2009-10-05Now have it the sorted way in PkgListsRené 'Necoro' Neumann2-3/+9 2009-10-05Enhanced system.sort_package_list to also sort CPVsRené 'Necoro' Neumann5-27/+38 2009-10-05Added an PkgList window and rewrote UpdateWindow and WorldListWindow to use itRené 'Necoro' Neumann3-39/+63 2009-10-05Add uninstall button and rename to PkgListWindowRené 'Necoro' Neumann1-2/+17 2009-10-05First quick hack to have a world listRené 'Necoro' Neumann3-2/+24