{{ define "main" }}
<div id="data-pid" style="display:none">{{ .RelPermalink }}</div>
<article style="margin-bottom:1.5em">
<h1 class="post-title" itemprop="name headline" uk-scrollspy="cls: uk-animation-slide-top-small; delay: 200">{{ .Title }}</h1>
<div class="meta" uk-scrollspy="cls: uk-animation-slide-bottom-small; delay: 300">
<span class="meta-item">作者: {{ .Site.Params.author | default "博主" }}</span>
<span class="meta-item">浏览: <span id="busuanzi_value_page_uv"></span></span>
<span class="meta-item">字数: {{ .WordCount }}</span>
<span class="meta-item meta-item-reading-time">阅读: 约 {{ .ReadingTime }} 分钟</span>
{{ with .Params.categories }}<span class="meta-item">分类:{{ range . }} <a href="{{ "categories/" | absURL }}{{ . | urlize }}.html">{{ . }}</a>{{ end }}</span>{{ end }}
</div>
<div class="post-content" id="post-writing" itemprop="articleBody">
{{ .Content }}
</div>
<hr class="uk-divider-icon">
{{ if .Site.Params.artalk }}
<div id="Comments"></div>
<div id="artalk_container"></div>
{{ end }}
</article>
{{ end }}

{{ define "scripts" }}
{{ if .Site.Params.artalk }}
<script>
window.loadScriptOnce&&loadScriptOnce("{{ "js/libs/Artalk.min.js" | absURL }}","Artalk",function(){
new Artalk({el:"#artalk_container",pageKey:"{{ .Permalink }}",pageTitle:"{{ .Title }}",server:"{{ .Site.Params.artalkServer }}",site:"{{ .Site.Title }}"})});
</script>
{{ end }}
{{ end }}
