diff options
author | Miquel Lionel <lionelmiquel@sfr.fr> | 2021-02-17 13:48:13 +0100 |
---|---|---|
committer | Miquel Lionel <lionel@les-miquelots.net> | 2021-02-17 13:48:13 +0100 |
commit | 2430bf57c22948e66b2c918d324d6e0bff4f6792 (patch) | |
tree | 0d79e5d8b5780d6c8d625de50d784a7da3a2a26b /v0.9.5/views/i18n/honk.html | |
parent | 19cfd918aa30f316754b118278fc6853d7b8e04b (diff) | |
download | honk_custom-2430bf57c22948e66b2c918d324d6e0bff4f6792.tar.gz honk_custom-2430bf57c22948e66b2c918d324d6e0bff4f6792.zip |
add i18n'd html templates, newer patch for web.go
Diffstat (limited to 'v0.9.5/views/i18n/honk.html')
-rw-r--r-- | v0.9.5/views/i18n/honk.html | 146 |
1 files changed, 146 insertions, 0 deletions
diff --git a/v0.9.5/views/i18n/honk.html b/v0.9.5/views/i18n/honk.html new file mode 100644 index 0000000..52f63a7 --- /dev/null +++ b/v0.9.5/views/i18n/honk.html @@ -0,0 +1,146 @@ +<article class="honk {{ .Honk.Style }}" data-convoy="{{ .Honk.Convoy }}"> +{{ $bonkcsrf := .BonkCSRF }} +{{ $IsPreview := .IsPreview }} +{{ $maplink := .MapLink }} +{{ $omitimages := .OmitImages }} +{{ $i18n := .i18n }} +{{ $lang := .Lang }} +{{ with .Honk }} +<header> +{{ if $bonkcsrf }} +<a class="honkerlink" href="/h?xid={{ .Honker }}" data-xid="{{ .Honker }}"> +{{ else }} +<a href="{{ .Honker }}" rel=noreferrer> +{{ end }} +<img alt="" src="/a?a={{ .Honker}}"> +{{ if $bonkcsrf }} </a> {{ end }} +{{ if .Oonker }} +{{ if $bonkcsrf }} +<a class="honkerlink" href="/h?xid={{ .Oonker }}" data-xid="{{ .Oonker }}"> +{{ else }} +<a href="{{ .Oonker }}" rel=noreferrer> +{{ end }} +<img alt="" src="/a?a={{ .Oonker}}"> +{{ if $bonkcsrf }} </a> {{ end }} +{{ end }} +<p> +{{ if $bonkcsrf }} +<a class="honkerlink" href="/h?xid={{ .Honker }}" data-xid="{{ .Honker }}">{{ .Username }}</a> +{{ else }} +<a href="{{ .Honker }}" rel=noreferrer>{{ .Username }}</a> +{{ end }} +<span class="clip"><a href="{{ .URL }}" rel=noreferrer>{{ .What }}</a> {{ .Date.Local.Format "02 Jan 2006 15:04 -0700" }}</span> +{{ if .Oonker }} +<br> +<span style="margin-left: 1em;" class="clip"> +{{ if $bonkcsrf }} +{{ $i18n.Original }}: <a class="honkerlink" href="/h?xid={{ .Oonker }}" data-xid="{{ .Oonker }}">{{ .Oondle }}</a> +{{ else }} +{{ $i18n.Original }}: <a href="{{ .Oonker }}" rel=noreferrer>{{ .Oondle }}</a> +{{ end }} +</span> +{{ else }} +{{ if .RID }} +<br> +<span style="margin-left: 1em;" class="clip"> +{{ $i18n.InReplyTo }}: <a href="{{ .RID }}" rel=noreferrer>{{ .RID }}</a> +</span> +{{ end }} +{{ end }} +<br> +{{ if $bonkcsrf }} + <span style="margin-left: 1em;" class="clip">{{ $i18n.Convoy }}: <a class="convoylink" href="/t?c={{ .Convoy }}">{{ .Convoy }}</a></span> +{{ else }} + <span style="margin-left: 1em;" class="clip">{{ $i18n.Convoy }}: {{ .Convoy }}</span> + +{{ end }} +</header> +<p> +<details class="noise" {{ .Open }} > +<summary>{{ .HTPrecis }}<p></summary> +<p>{{ .HTPrecis }} +<p>{{ .HTML }} +{{ with .Time }} +<p>{{ $i18n.Time }}: {{ .StartTime.Local.Format "03:04PM EDT Mon Jan 02"}} +{{ if .Duration }}<br>{{ $i18n.Duration }}: {{ .Duration }}{{ end }} +{{ end }} +{{ with .Place }} +<p>{{ $i18n.Location }}: {{ with .Url }}<a href="{{ . }}" rel=noreferrer>{{ end }}{{ .Name }}{{ if .Url }}</a>{{ end }}{{ if or .Latitude .Longitude }} <a href="{{ if eq $maplink "apple" }}https://maps.apple.com/?q={{ or .Name "here" }}&z=16&ll={{ .Latitude }},{{ .Longitude }}{{ else }}https://www.openstreetmap.org/?mlat={{ .Latitude }}&mlon={{ .Longitude}}#map=16/{{ .Latitude }}/{{ .Longitude }}{{ end }}" rel=noreferrer>{{ .Latitude }} {{ .Longitude }}</a>{{ end }} +{{ end }} +{{ range .Donks }} +{{ if .Local }} +{{ if eq .Media "text/plain" }} +<p><a href="/d/{{ .XID }}">{{ $i18n.Attachment }}: {{ .Name }}</a>{{ if not (eq .Desc .Name) }} {{ .Desc }}{{ end }} +{{ else if eq .Media "application/pdf" }} +<p><a href="/d/{{ .XID }}">{{ $i18n.Attachment }}: {{ .Name }}</a>{{ if not (eq .Desc .Name) }} {{ .Desc }}{{ end }} +{{ else }} +{{ if $omitimages }} +<p><a href="/d/{{ .XID }}">{{ $i18n.Image }}: {{ .Name }}</a>{{ if not (eq .Desc .Name) }} {{ .Desc }}{{ end }} +{{ else }} +<p><img src="/d/{{ .XID }}" title="{{ .Desc }}" alt="{{ .Desc }}"> +{{ end }} +{{ end }} +{{ else }} +{{ if .External }} +<p><a href="{{ .URL }}" rel=noreferrer>{{ $i18n.ExtAttachment }}: {{ .Name }}</a>{{ if not (eq .Desc .Name) }} {{ .Desc }}{{ end }} +{{ 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 and $bonkcsrf (not $IsPreview) }} +<p> +<details class="actions"> +<summary>{{ $i18n.Actions }}</summary> +<div> +<p> +{{ if .Honk.Public }} +{{ if .Honk.IsBonked }} +<button onclick="return unbonk(this, '{{ .Honk.XID }}');">{{ $i18n.Unbonk }}</button> +{{ else }} +<button onclick="return bonk(this, '{{ .Honk.XID }}');">{{ $i18n.Bonk }}</button> +{{ end }} +{{ else }} +<button disabled>{{ $i18n.Nope }}</button> +{{ end }} +<button onclick="return showhonkform(this, '{{ .Honk.XID }}', '{{ .Honk.Handles }}');"><a href="/newhonk?rid={{ .Honk.XID }}">{{ $i18n.HonkBack }}</a></button> +<button onclick="return muteit(this, '{{ .Honk.Convoy }}');">{{ $i18n.Mute }}</button> + <button onclick="return showelement('evenmore{{ .Honk.ID }}')">{{ $i18n.EvenMore }} </button> +</div> +<div id="evenmore{{ .Honk.ID }}" style="display:none"> +<p> +<button onclick="return zonkit(this, '{{ .Honk.XID }}');">{{ $i18n.Zonk }}</button> +{{ if .Honk.IsAcked }} +<button onclick="return flogit(this, 'deack', '{{ .Honk.XID }}');">{{ $i18n.Deack }}</button> +{{ else }} +<button onclick="return flogit(this, 'ack', '{{ .Honk.XID }}');">{{ $i18n.Ack }}</button> +{{ end }} +{{ if .Honk.IsSaved }} +<button onclick="return flogit(this, 'unsave', '{{ .Honk.XID }}');">{{ $i18n.Unsave }}</button> +{{ else }} +<button onclick="return flogit(this, 'save', '{{ .Honk.XID }}');">{{ $i18n.Save }}</button> +{{ end }} +{{ if .Honk.IsUntagged }} +<button disabled>{{ $i18n.Untagged }}</button> +{{ else }} +<button onclick="return flogit(this, 'untag', '{{ .Honk.XID }}');">{{ $i18n.UntagMe }}</button> +{{ end }} +<button><a href="/edit?xid={{ .Honk.XID }}">{{ $i18n.Edit }}</a></button> +{{ if not (eq .Badonk "none") }} +{{ if .Honk.IsReacted }} +<button disabled>badonked</button> +{{ else }} +<button onclick="return flogit(this, 'react', '{{ .Honk.XID }}');">{{ .Badonk }}</button> +{{ end }} +{{ end }} +</div> +</details> +<p> +{{ end }} +</article> |