8.12
This commit is contained in:
1 parent
e86aebf49b
commit
0cd2776532
23 files changed
+371
-96
No files matched your search
@@ -6,10 +6,10 @@
|
||||
uk-scrollspy="target: > .cf-article-item; cls: uk-animation-fade; delay: 0"></div>
|
||||
</div>
|
||||
<script>
|
||||
// 定义几个全局变量
|
||||
let UserConfig = {
|
||||
// 定义几个全局变量
|
||||
let UserConfig = {
|
||||
// 填写你的api地址
|
||||
private_api_url: 'https://circle.usj.cc/',
|
||||
private_api_url: 'https://fc.5b2.cn/',
|
||||
// 点击加载更多时,一次最多加载几篇文章,默认10
|
||||
page_turning_number: 10,
|
||||
// 头像加载失败时,默认头像地址
|
||||
|
||||
@@ -9,6 +9,14 @@
|
||||
<div class="post">
|
||||
<div class="time">{{ .Date.Format "January 2, 2006" }}</div>
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
<!-- 计算每篇文章的发布时间与当前时间的差值 -->
|
||||
{{ $publishDate := .Date }}
|
||||
{{ $currentTime := now }}
|
||||
{{ $timeDiff := div (sub $currentTime.Unix $publishDate.Unix) 3600 }}
|
||||
<!-- 判断发布时间是否小于 48 小时 -->
|
||||
{{ if lt $timeDiff 48 }}
|
||||
<span class="new-post-message"></span>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
@@ -25,7 +33,6 @@
|
||||
<a class="prev" title="上一页" href="{{ $paginator.Prev.URL }}">上一页</a>
|
||||
{{ end }}
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
Reference in new issue
Block a user