aboutsummaryrefslogtreecommitdiff
path: root/internal/feed
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--internal/feed/template/html.tpl114
1 files changed, 57 insertions, 57 deletions
diff --git a/internal/feed/template/html.tpl b/internal/feed/template/html.tpl
index b320ebb..aa7d341 100644
--- a/internal/feed/template/html.tpl
+++ b/internal/feed/template/html.tpl
@@ -1,58 +1,58 @@
-{{- /*gotype:github.com/Necoro/feed2imap-go/internal/feed.feeditem*/ -}}
-{{define "bottomLine"}}
- {{if .content}}
- <tr>
- <td style="text-align: right; padding: 0">
- <span style="color: #ababab">{{.descr}}</span>&nbsp;&nbsp;
- </td>
- <td style="padding: 0">
- <span style="color: #ababab">{{.content}}</span>
- </td>
- </tr>
- {{end}}
-{{end}}
-<table style="border: 2px black groove; background: #ededed; width: 100%; margin-bottom: 5px">
- <tr>
- <td style="text-align: right; padding: 4px"><strong>Feed</strong></td>
- <td style="width: 100%; padding: 4px">
- {{with .Feed.Link}}<a href="{{.}}">{{end}}
- <strong>{{or .Feed.Title .Feed.Link "Unnammed feed"}}</strong>
- {{if .Feed.Link}}</a>{{end}}
- </td>
- </tr>
- <tr>
- <td style="text-align: right; padding: 4px"><strong>Item</strong></td>
- <td style="width: 100%; padding: 4px">
- {{with .Item.Link}}<a href="{{.}}">{{end}}
- <strong>{{or .Item.Title .Item.Link}}</strong>
- {{if .Item.Link}}</a>{{end}}
- </td>
- </tr>
-</table>
-{{with .Body}}
- {{html .}}
-{{end}}
-{{with .Item.Enclosures}}
- <table style="border: 2px black groove; background: #ededed; width: 100%; margin-top: 5px">
- <tr>
- <td style="width: 100%"><strong>Files:</strong></td>
- </tr>
- {{range .}}
- <tr>
- <td>
- &nbsp;&nbsp;&nbsp;
- <a href={{.URL}}>{{.URL | lastUrlPart}}</a> ({{with .Length}}{{. | byteCount}}, {{end}}{{.Type}})
- </td>
- </tr>
- {{end}}
- </table>
-{{end}}
-<hr style="width: 100%"/>
-<table style="width: 100%; border-spacing: 0">
- {{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 "<a style=\"color: #ababab;\" href=\"" . "\">" . "</a>" | html))}}
- {{end}}
+{{- /*gotype:github.com/Necoro/feed2imap-go/internal/feed.feeditem*/ -}}
+{{define "bottomLine"}}
+ {{if .content}}
+ <tr>
+ <td style="text-align: right; padding: 0">
+ <span style="color: #ababab">{{.descr}}</span>&nbsp;&nbsp;
+ </td>
+ <td style="padding: 0">
+ <span style="color: #ababab">{{.content}}</span>
+ </td>
+ </tr>
+ {{end}}
+{{end}}
+<table style="border: 2px black groove; background: #ededed; width: 100%; margin-bottom: 5px">
+ <tr>
+ <td style="text-align: right; padding: 4px"><strong>Feed</strong></td>
+ <td style="width: 100%; padding: 4px">
+ {{with .Feed.Link}}<a href="{{.}}">{{end}}
+ <strong>{{or .Feed.Title .Feed.Link "Unnammed feed"}}</strong>
+ {{if .Feed.Link}}</a>{{end}}
+ </td>
+ </tr>
+ <tr>
+ <td style="text-align: right; padding: 4px"><strong>Item</strong></td>
+ <td style="width: 100%; padding: 4px">
+ {{with .Item.Link}}<a href="{{.}}">{{end}}
+ <strong>{{or .Item.Title .Item.Link}}</strong>
+ {{if .Item.Link}}</a>{{end}}
+ </td>
+ </tr>
+</table>
+{{with .Body}}
+ {{html .}}
+{{end}}
+{{with .Item.Enclosures}}
+ <table style="border: 2px black groove; background: #ededed; width: 100%; margin-top: 5px">
+ <tr>
+ <td style="width: 100%"><strong>Files:</strong></td>
+ </tr>
+ {{range .}}
+ <tr>
+ <td>
+ &nbsp;&nbsp;&nbsp;
+ <a href={{.URL}}>{{.URL | lastUrlPart}}</a> ({{with .Length}}{{. | byteCount}}, {{end}}{{.Type}})
+ </td>
+ </tr>
+ {{end}}
+ </table>
+{{end}}
+<hr style="width: 100%"/>
+<table style="width: 100%; border-spacing: 0">
+ {{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 "<a style=\"color: #ababab;\" href=\"" . "\">" . "</a>" | html))}}
+ {{end}}
</table> \ No newline at end of file
commit/go.sum?h=v1.4.0&id=0aa048e3032f963335670fc882a4f97e3c00ee8d&follow=1'>Bump github.com/google/uuid from 1.1.4 to 1.2.0dependabot[bot]2-3/+3 2021-02-15Issue #46: Make the resulting email body not to include single \r or \n. This...René 'Necoro' Neumann2-2/+66 2021-01-20Bump github.com/PuerkitoBio/goquery from 1.6.0 to 1.6.1dependabot[bot]2-3/+3 2021-01-09Bump github.com/google/uuid from 1.1.2 to 1.1.4dependabot[bot]2-3/+3 2021-01-09Bump github.com/emersion/go-message from 0.14.0 to 0.14.1 (#42)dependabot[bot]2-3/+3 2020-11-28Bump github.com/emersion/go-message from 0.13.0 to 0.14.0 (#38)dependabot[bot]2-3/+9 2020-11-28Bump github.com/google/go-cmp from 0.5.2 to 0.5.4 (#37)dependabot[bot]2-3/+3 2020-11-23Fix release.ymlv0.5.2René 'Necoro' Neumann1-3/+10 2020-11-23Prepare v0.5.2René 'Necoro' Neumann3-3/+8 2020-11-20Bump github.com/gabriel-vasile/mimetype from 1.1.1 to 1.1.2dependabot[bot]2-3/+3 2020-11-04Clean dependabot.ymlRené 'Necoro' Neumann1-4/+0