GoBlog/templates/interactions.gohtml

31 lines
1.7 KiB
Plaintext

{{ define "interactions" }}
<details class="p" id="interactions">
<summary><b>{{ string .Blog.Lang "interactions" }}</b></summary>
{{ with ( mentions .Canonical ) }}
<ul>
{{ range $i, $mention := . }}
<li><a href="{{$mention.Source}}" target="_blank" rel="nofollow noopener noreferrer ugc">
{{ if $mention.Author }}
{{ $mention.Author }}
{{ else }}
{{ $mention.Source }}
{{ end }}
</a>{{ with $mention.Title }} <b>{{.}}</b>{{ end }}{{ with $mention.Content }} <i>{{.}}</i>{{ end }}</li>
{{ end }}
</ul>
{{ end }}
<form class="fw-form p" method="post" action="/webmention">
<label for="wm-source" class="p">{{ string .Blog.Lang "interactionslabel" }}</label>
<input id="wm-source" type="url" name="source" placeholder="URL" required>
<input type="hidden" name="target" value="{{ .Canonical }}">
<input class="fw" type="submit" value="{{ string .Blog.Lang "send" }}">
</form>
<form class="fw-form p" method="post" action="{{ blogrelative .Blog "/comment" }}">
<input type="hidden" name="target" value="{{ .Canonical }}">
<input type="text" name="name" placeholder="{{ string .Blog.Lang "nameopt" }}">
<input type="url" name="website" placeholder="{{ string .Blog.Lang "websiteopt" }}">
<textarea name="comment" required placeholder="{{ string .Blog.Lang "comment" }}"></textarea>
<input class="fw" type="submit" value="{{ string .Blog.Lang "docomment" }}">
</form>
</details>
{{ end }}