{{define "content"}}{{with .Data}}{{$conn := .Connected}}{{$now := .Now}}{{$zone := .Zone}}{{$reddit := .Reddit}}

Posts

Everything waiting for your approval. Nothing is published until you say so: publish a draft now, or schedule it. {{if .Tagged}}Links to your own sites get UTM tags when published.{{end}}

{{template "reminders" .Reminders}} {{if .Sections}} {{range .Sections}}

{{.Module}}

{{range .Batches}}

{{if .InventoryName}}{{.InventoryName}} {{.Kind}} ·{{end}} written {{ago .CreatedAt}} {{if .SourceURL}} · source{{end}}

{{range .Drafts}}

{{.Where}}

{{if .Error}}

{{.Error}}

{{end}} {{$rv := index $reddit .ID}} {{if $rv}} {{if $rv.Warnings}}
    {{range $rv.Warnings}}
  • {{.}}
  • {{end}}
{{end}} {{with $rv.Info}}
r/{{.Name}}'s rules{{if .Rules}} ({{len .Rules}}){{end}} · read {{ago .FetchedAt}} {{if .SubmitText}}

{{truncate 1200 .SubmitText}}

{{end}} {{if .Rules}}
    {{range .Rules}}
  1. {{.Name}}{{if .Description}}: {{truncate 500 .Description}}{{end}}
  2. {{end}}
{{end}}

Posts: {{if eq .SubmissionType "self"}}text only{{else if eq .SubmissionType "link"}}links only{{else}}text or links{{end}}{{if .Subscribers}} · {{.Subscribers}} members{{end}}

{{end}}
{{end}}
{{if eq .Channel "reddit"}} {{end}} {{if eq .Channel "reddit"}}{{if .SourceURL}}

The source link is added at the end as “Source: …”.

{{end}}{{end}}

{{.Length}} / {{.Limit}}{{if and (eq .Channel "x") .SourceURL}} including the link{{end}}

{{if eq .Channel "reddit"}}

Or post it yourself{{if not (index $conn .Channel)}}, since Supermarket can't post to Reddit for you yet{{end}}: this saves your edits and opens r/{{.Target}}'s submit page in a new tab with the title and text filled in{{if .SourceURL}} (links to your sites tagged){{end}}. Check it there and post.

{{else if not (index $conn .Channel)}}

{{.ChannelName}} isn't connected: sign in before it's due.

{{end}}
{{if eq .Channel "reddit"}}
{{end}}
{{end}}
{{end}} {{end}} {{else}}

Nothing waiting. Write posts from Content; scheduled ones are under Content → Scheduled.

{{end}} {{end}}{{end}}