Files
blog/themes/Ying/layouts/_default/single.html
T

50 lines
2.0 KiB
HTML
Raw Normal View History

2024-07-11 08:59:32 +08:00
{{ define "main" }}
<div id="pjax-container">
2024-07-12 14:55:59 +08:00
<article style="margin-bottom: 3.5em;">
2024-07-11 08:59:32 +08:00
<h1 class="post-title" itemprop="name headline">{{ .Title }}</h1>
<div class="meta">
2024-07-26 11:24:34 +08:00
作者: 小赵同学 浏览: {{ .Params.views }} 字数: {{ .WordCount }} 分类:
2024-07-23 13:47:57 +08:00
{{ range .Params.categories }}
<a href="{{ . }}">{{ . }}</a>
{{ end }}
2024-07-11 08:59:32 +08:00
</div>
<div class="post-content" itemprop="articleBody">
{{ .Content }}
</div>
<div class="post-tags" style="margin-top: -30px;">
<nav class="nav tags">
<ul class="flat">
2024-07-23 13:47:57 +08:00
<!-- 标签内容 -->
2024-07-11 08:59:32 +08:00
</ul>
</nav>
</div>
</article>
2024-07-12 14:55:59 +08:00
<hr class="uk-divider-icon">
2024-07-11 08:59:32 +08:00
<div id="comments" class="comments-area">
<!-- 评论区内容 -->
2024-07-13 15:15:32 +08:00
{{ if or (eq .Type "about") (eq .Type "post") }}
{{ partial "waline.html" . }}
{{ end }}
<!-- 评论区内容结束 -->
2024-07-11 08:59:32 +08:00
</div>
2024-07-13 15:15:32 +08:00
{{/* 文章页面评论弹幕 */}}
2024-07-12 16:26:14 +08:00
<script type="text/javascript">
2024-07-12 17:10:51 +08:00
$(document).ready(function () {
2024-07-12 16:26:14 +08:00
// 获取当前页面的路径
2024-07-13 11:42:38 +08:00
var currentPath = "{{ .RelPermalink }}";
2024-07-28 21:46:00 +08:00
// console.log(currentPath);
2024-07-12 17:10:51 +08:00
// 调用封装的函数
fetchCommentsAndCreateBarrager(currentPath, {
looper_time: 3000, // 每条弹幕的发送间隔,单位毫秒
defaultAvatar: 'static/default-avatar.png', // 默认头像
defaultInfo: 'No comment', // 默认评论内容
defaultLink: '#', // 默认用户链接
close: true, // 显示关闭按钮
speed: 6, // 弹幕速度,单位秒
color: '#fff', // 弹幕颜色
old_ie_color: '#000000' // IE低版兼容色
2024-07-12 16:26:14 +08:00
});
});
</script>
2024-07-11 08:59:32 +08:00
</div>
2024-07-23 13:47:57 +08:00
{{ end }}