aboutsummaryrefslogtreecommitdiff
path: root/internal/feed/template
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--internal/feed/template/feed.tpl.go74
1 files changed, 32 insertions, 42 deletions
diff --git a/internal/feed/template/feed.tpl.go b/internal/feed/template/feed.tpl.go
index c3aede5..10f870b 100644
--- a/internal/feed/template/feed.tpl.go
+++ b/internal/feed/template/feed.tpl.go
@@ -7,63 +7,53 @@ const feedTpl = `{{- /*gotype:github.com/Necoro/feed2imap-go/internal/feed.feedi
{{define "bottomLine"}}
{{if .content}}
<tr>
- <td align="right">
- <span style="color: #ababab; ">{{.descr}}</span>&nbsp;&nbsp;
+ <td style="text-align: right; padding: 0">
+ <span style="color: #ababab">{{.descr}}</span>&nbsp;&nbsp;
</td>
- <td>
- <span style="color: #ababab; ">{{.content}}</span>
+ <td style="padding: 0">
+ <span style="color: #ababab">{{.content}}</span>
</td>
</tr>
{{end}}
{{end}}
-<table border="1" width="100%" cellpadding="0" cellspacing="0" style="border-spacing: 0; ">
- <tr>
- <td>
- <table width="100%" bgcolor="#EDEDED" cellpadding="4" cellspacing="2">
- <tr>
- <td align="right"><b>Feed</b></td>
- <td width="100%">
+<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}}
- <b>{{or .Feed.Title .Feed.Link "Unnammed feed"}}</b>
- {{if .Feed.Link}}</a>{{end}}
- </td>
- </tr>
- <tr>
- <td align="right"><b>Item</b></td>
- <td width="100%">
+ <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}}
- <b>{{or .Item.Title .Item.Link}}</b>
- {{if .Item.Link}}</a>{{end}}
- </td>
- </tr>
- </table>
- </td>
- </tr>
+ <strong>{{or .Item.Title .Item.Link}}</strong>
+ {{if .Item.Link}}</a>{{end}}
+ </td>
+ </tr>
</table>
{{with .Body}}
{{html .}}
{{end}}
{{with .Item.Enclosures}}
- <table border="1" width="100%" cellpadding="0" cellspacing="0" style="border-spacing: 0; ">
- <tr>
- <td>
- <table width="100%" bgcolor="#EDEDED" cellpadding="2" cellspacing="2">
- <tr><td width="100%"><b>Files:</b></td></tr>
- {{range .}}
- <tr>
+ <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}})
+ &nbsp;&nbsp;&nbsp;
+ <a href={{.URL}}>{{.URL | lastUrlPart}}</a> ({{with .Length}}{{. | byteCount}}, {{end}}{{.Type}})
</td>
- </tr>
- {{end}}
- </table>
- </td>
- </tr>
- </table>
+ </tr>
+ {{end}}
+ </table>
{{end}}
-<hr width="100%"/>
-<table width="100%" cellpadding="0" cellspacing="0">
+<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))}}