all repos — honk @ 8bf51b5a21cfda42dd8e3b97cad9bbdfd3551426

my fork of honk

views/honk.html (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
<article class="honk {{ .Honk.Style }}" data-convoy="{{ .Honk.Convoy }}">
{{ $bonkcsrf := .BonkCSRF }}
{{ with .Honk }}
<header>
<img alt="" src="/a?a={{ .Honker}}">
{{ if .Oonker }}
<img alt="" src="/a?a={{ .Oonker}}">
{{ end }}
<p>
{{ if $bonkcsrf }}
<a href="/h?xid={{ .Honker }}" rel=noreferrer>{{ .Username }}</a>
{{ else }}
<a href="{{ .Honker }}" rel=noreferrer>{{ .Username }}</a>
{{ end }}
<span class="clip"><a href="{{ .URL }}" rel=noreferrer>{{ .What }}</a> {{ .Date.Format "02 Jan 2006 15:04" }}</span>
{{ if .Oonker }}
<br>
<span style="margin-left: 1em;" class="clip">
{{ if $bonkcsrf }}
original: <a href="/h?xid={{ .Oonker }}" rel=noreferrer>{{ .Oondle }}</a>
{{ else }}
original: <a href="{{ .Oonker }}" rel=noreferrer>{{ .Oondle }}</a>
{{ end }}
</span>
{{ else }}
{{ if .RID }}
<br>
<span style="margin-left: 1em;" class="clip">
in reply to: <a href="{{ .RID }}" rel=noreferrer>{{ .RID }}</a>
</span>
{{ end }}
{{ end }}
<br>
{{ if $bonkcsrf }}
<span style="margin-left: 1em;" class="clip">convoy: <a class="convoylink" href="/t?c={{ .Convoy }}">{{ .Convoy }}</a></span>
{{ else }}
<span style="margin-left: 1em;" class="clip">convoy: {{ .Convoy }}</span>
{{ end }}
</header>
<p>
<details class="noise" {{ .Open }} >
<summary>{{ .HTPrecis }}</summary>
<p>{{ .HTPrecis }}
<p>{{ .HTML }}
{{ range .Donks }}
{{ if .Local }}
{{ if eq .Media "text/plain" }}
<p><a href="/d/{{ .XID }}">Attachment: {{ .Name }}</a>
{{ else }}
<p><img src="/d/{{ .XID }}" title="{{ .Desc }}" alt="{{ .Desc }}">
{{ end }}
{{ else }}
{{ if .XID }}
<p><a href="{{ .URL }}">External Attachment: {{ .Name }}</a>
{{ else }}
{{ if eq .Media "video/mp4" }}
<p><video controls src="{{ .URL }}">{{ .Name }}</video>
{{ else }}
<p><img src="{{ .URL }}" title="{{ .Desc }}" alt="{{ .Desc }}">
{{ end }}
{{ end }}
{{ end }}
{{ end }}
</details>
{{ end }}
{{ if $bonkcsrf }}
<p>
<details class="actions">
<summary>Actions
</summary>
<div>
<p>
{{ if .Honk.Public }}
{{ if .Honk.IsBonked }}
<button onclick="unbonk(this, '{{ .Honk.XID }}');">unbonk</button>
{{ else }}
<button onclick="bonk(this, '{{ .Honk.XID }}');">bonk</button>
{{ end }}
{{ else }}
<button disabled>nope</button>
{{ end }}
<button onclick="showhonkform(this, '{{ .Honk.XID }}', '{{ .Honk.Handle }}');">honk back</button>
<button onclick="muteit(this, '{{ .Honk.Convoy }}');">mute</button>
<button onclick="zonkit(this, '{{ .Honk.XID }}');">zonk</button>
{{ if .Honk.IsAcked }}
<button onclick="deackit(this, '{{ .Honk.XID }}');">deack</button>
{{ else }}
<button onclick="ackit(this, '{{ .Honk.XID }}');">ack</button>
{{ end }}
<button><a href="/edit?xid={{ .Honk.XID }}">edit</a></button>
</div>
</details>
<p>
{{ end }}
</article>