summaryrefslogtreecommitdiff
path: root/layouts/page.html
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--layouts/page.html50
1 files changed, 50 insertions, 0 deletions
diff --git a/layouts/page.html b/layouts/page.html
new file mode 100644
index 0000000..c28ab39
--- /dev/null
+++ b/layouts/page.html
@@ -0,0 +1,50 @@
+{{ define "main" }}
+<article class="h-entry">
+ <h1 class="p-name">{{ .Title }}</h1>
+ {{if .Date }}
+ {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
+ {{ $dateHuman := .Date | time.Format ":date_long" }}
+ <time class="dt-published" datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
+ {{end}}
+ <div class="e-content">
+ {{ .Content }}
+ </div>
+</article>
+<article>
+ {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
+</article>
+{{if .Param "comments"}}
+<h2>Комментарии</h2>
+{{ range $key, $comment := where .Site.Data.comments "subject" "eq" .Page.Permalink }}
+<article>
+ <b>{{$comment.from_name}}:</b>
+ <p>
+ {{if $comment.date }}
+ {{ $dateMachine := $comment.date | time.Format "2006-01-02T15:04:05-07:00" }}
+ {{ $dateHuman := $comment.date | time.Format ":date_long" }}
+ <time class="dt-published" datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
+ {{end}}
+ </p>
+ <p>{{$comment.body | safeHTML}}</p>
+ {{if $comment.body_signature}}
+ <details>
+ <summary>Подпись</summary>
+ <pre>{{$comment.body_signature| safeHTML}}</pre>
+ </details>
+ {{end}}
+</article>
+{{ else }}
+<article>Комментариев пока нет.</article>
+{{ end }}
+
+<article>
+ {{ $comment := (print "mailto:blog@neonxp.ru?subject=" .Page.Permalink | safeHTML) }}
+ Для отправки комментария достаточно отправить e-mail со своим комментарием
+ на адрес
+ <a href={{$comment}}>blog@neonxp.ru</a>, в теме нужно указать ссылку на
+ пост.<br />
+ Или просто нажать кнопку ниже. Всё очень просто :)<br />
+ <a class="btn-primary" href={{$comment}}>Написать комментарий</a>
+</article>
+{{end}}
+{{ end }} \ No newline at end of file