mirror of https://github.com/jlelse/GoBlog
43 lines
1.9 KiB
Plaintext
43 lines
1.9 KiB
Plaintext
{{ define "title" }}
|
|
<title>{{ string .Blog.Lang "webmentions" }} - {{ mdtitle .Blog.Title }}</title>
|
|
{{ end }}
|
|
|
|
{{ define "main" }}
|
|
<main>
|
|
<h1>{{ string .Blog.Lang "webmentions" }}</h1>
|
|
{{ $blog := .Blog }}
|
|
{{ $current := .Data.Current }}
|
|
{{ range $i, $mention := .Data.Mentions }}
|
|
<div id="mention-{{ $mention.ID }}" class="p">
|
|
<p>
|
|
From: <a href="{{ $mention.Source }}" target="_blank" rel="noopener noreferrer">{{ $mention.Source }}</a><br/>
|
|
{{ if not (eq $mention.Source $mention.Url ) }}u-url: <a href="{{ $mention.Url }}" target="_blank" rel="noopener noreferrer">{{ $mention.Url }}</a><br/>{{ end }}
|
|
To: <a href="{{ $mention.Target }}" target="_blank">{{ $mention.Target }}</a><br/>
|
|
Created: {{ unixtodate $mention.Created }}<br/><br/>
|
|
{{ if $mention.Author }}{{ $mention.Author }}<br/>{{ end }}
|
|
{{ with $mention.Title }}<b>{{.}}</b><br/>{{ end }}
|
|
{{ with $mention.Content }}<i>{{.}}</i>{{ end }}
|
|
</p>
|
|
<form method="post">
|
|
<input type="hidden" name="mentionid" value="{{ $mention.ID }}">
|
|
<input type="hidden" name="redir" value="{{ $current }}#mention-{{ $mention.ID }}">
|
|
{{ if eq $mention.Status "verified" }}
|
|
<input type="submit" formaction="/webmention/approve" value="{{ string $blog.Lang "approve" }}">
|
|
{{ end }}
|
|
<input type="submit" formaction="/webmention/delete" value="{{ string $blog.Lang "delete" }}">
|
|
<input type="submit" formaction="/webmention/reverify" value="{{ string $blog.Lang "reverify" }}">
|
|
</form>
|
|
</div>
|
|
{{ end }}
|
|
{{ if .Data.HasPrev }}
|
|
<p><a href="{{ .Data.Prev }}">{{ string .Blog.Lang "prev" }}</a></p>
|
|
{{ end }}
|
|
{{ if .Data.HasNext }}
|
|
<p><a href="{{ .Data.Next }}">{{ string .Blog.Lang "next" }}</a></p>
|
|
{{ end }}
|
|
</main>
|
|
{{ end }}
|
|
|
|
{{ define "webmentionadmin" }}
|
|
{{ template "base" . }}
|
|
{{ end }} |