aboutsummaryrefslogtreecommitdiff
path: root/site.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'site.tmpl')
-rw-r--r--site.tmpl29
1 files changed, 26 insertions, 3 deletions
diff --git a/site.tmpl b/site.tmpl
index 243fc59..39e8c6c 100644
--- a/site.tmpl
+++ b/site.tmpl
@@ -72,15 +72,22 @@
72 <article> 72 <article>
73 <header> 73 <header>
74 <h1>{{ .Title }}</h1> 74 <h1>{{ .Title }}</h1>
75 {{ if eq .Other.Type "post" }}
75 <div class="info"> 76 <div class="info">
76 {{ template "date" .Date }} 77 {{ template "date" .Date }}
77 {{ template "author" . }} 78 {{ template "author" . }}
78 </div> 79 </div>
80 {{ end }}
79 </header> 81 </header>
80 <section> 82 <section>
81 {{ .Content }} 83 {{ .Content }}
82 </section> 84 </section>
83 </article> 85 </article>
86
87 {{ if eq .Other.Type "post" }}
88 {{ template "comments" . }}
89 {{ end }}
90
84 {{ template "modified" . }} 91 {{ template "modified" . }}
85{{ end }} 92{{ end }}
86 93
@@ -113,3 +120,19 @@
113 <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.17.1/components/prism-core.min.js"></script> 120 <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.17.1/components/prism-core.min.js"></script>
114 <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.17.1/plugins/autoloader/prism-autoloader.min.js"></script> 121 <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.17.1/plugins/autoloader/prism-autoloader.min.js"></script>
115{{ end }} 122{{ end }}
123
124{{ define "comments" }}
125 <div class="comments">
126 <h3>Comments</h3>
127 <div class="form">
128 <div><input id="name" placeholder="Your name" maxlength="20"></div>
129 <div><textarea id="comment" placeholder="Your comment" maxlength="500"></textarea></div>
130 <div><button id="submit">Post a comment</button></div>
131 </div>
132 <ul></ul>
133 </div>
134
135 <script src="https://www.gstatic.com/firebasejs/7.2.1/firebase-app.js"></script>
136 <script src="https://www.gstatic.com/firebasejs/7.2.1/firebase-database.js"></script>
137 <script src="{{ .Rel "static/comments.js" }}?v={{ .ModTime.Format "20060102150405" }}" async></script>
138{{ end }}