{{ define "main" }}
<div id="data-pid" style="display:none">{{ .RelPermalink }}</div>
<div class="post-content" itemprop="articleBody" uk-scrollspy="target: > #szh; cls: uk-animation-slide-bottom-small; delay: 0">
<div id="szh" onclick="copySzhContent()" style="cursor:pointer" title="点击复制">- 名称：{{ .Site.Title }}<br>- 简介：{{ .Site.Params.bio }}<br>- 链接：{{ .Site.BaseURL }}<br>- 图标：{{ .Site.BaseURL }}favicon.ico</div>
</div>
<hr class="uk-divider-icon">
<div class="comments-area">
<div id="Comments" uk-scrollspy="target: > *; cls: uk-animation-slide-bottom-small; delay: 100">
{{ if .Site.Params.artalk }}
<div id="artalk_container"></div>
{{ end }}
</div>
</div>
{{ end }}

{{ define "scripts" }}
<script>
function copySzhContent(){var e=document.getElementById("szh");if(!e)return;var t=e.innerText;navigator.clipboard?navigator.clipboard.writeText(t).then(function(){window.showToast?showToast("已复制到剪贴板","success"):showCopyTip("已复制到剪贴板")}).catch(function(){prompt("请手动复制:",t)}):prompt("请手动复制:",t)}function showCopyTip(msg){var d=document.createElement("div");d.textContent=msg;d.style.cssText="position:fixed;top:20px;left:50%;transform:translateX(-50%);background:#333;color:#fff;padding:10px 24px;border-radius:8px;font-size:14px;z-index:99999;animation:fadeInOut 2s ease forwards";document.body.appendChild(d);setTimeout(function(){d.remove()},2e3)}
</script>
{{ if .Site.Params.artalk }}
<link rel="stylesheet" href="{{ "css/libs/Artalk.min.css" | absURL }}">
<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 }}
