2025.4.13

This commit is contained in:
Vaica committed 2025-04-13 19:08:41 +08:00
1 parent 768dfb0733
commit 7ecd47d514
20 files changed
+60 -5193

No files matched your search

+46 -33
View File
@@ -1,36 +1,49 @@
{{ define "main" }}
<div id="pjax-container">
<div class="post-content" itemprop="articleBody" uk-scrollspy="target: > *; cls: uk-animation-slide-bottom-small; delay: 0">
<div class="index-laodao">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-bird"><path d="M16 7h.01"/><path d="M3.4 18H12a8 8 0 0 0 8-8V7a4 4 0 0 0-7.28-2.3L2 20"/><path d="m20 7 2 .5-2 .5"/><path d="M10 18v3"/><path d="M14 17.75V21"/><path d="M7 18a6 6 0 0 0 3.84-10.61"/></svg>
<div class="index-laodao-titile">说说</div>
<div id="pjax-container" uk-scrollspy="target: > div,a; cls: uk-animation-slide-bottom-small; delay: 0">
<article>
<div class="recent-posts section">
<h2 class="section-header">随笔<i class="ri-quill-pen-line"></i></h2>
<div class="posts">
<!-- 使用 sort 对文章按 Weight 排序 -->
{{ $posts := sort (where (where .Site.RegularPages "Type" "post") "Params.status" "ne" "hidden")
"Weight" }}
{{ $paginator := .Paginate $posts }}
{{ range $paginator.Pages }}
<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 }}
<!-- 判断发布时间是否小于 24 小时,并且没有 weight 属性 -->
{{ if and (lt $timeDiff 24) (not .Params.weight) }}
<span class="new-post-message"></span>
{{ end }}
<!-- 判断发布时间和 weight 属性 -->
{{ if .Params.weight }}
<!-- 如果有 weight 属性,添加 pushpin 图标 -->
<img src="/image/zd_top.png" alt="" srcset="" style="width: 19px;position: relative;bottom: 2px;right: 3px;box-shadow: 0 0px 0px rgba(0, 0, 0, 0.2);cursor: pointer;transform: 1s;">
{{ end }}
</div>
{{ end }}
</div>
</div>
<!--memos-->
<div id="memos"></div>
<div id="bber"></div>
<!--相对时间-->
<script src="https://koobai.com/js/moment.min.js?v=2.29.4"></script>
<script src="https://koobai.com/js/moment.twitter.min.js"></script>
<script>
function formatDate(param) {
if(typeof param === 'number') {
param = new Date(param * 1000).toISOString();
}
return moment(Date.parse(param)).twitterLong().replace(/\s\d{2}:\d{2}/, '');
}
</script>
<!-- 加载 Markdown 语法-->
<script src="https://fastly.jsdelivr.net/npm/marked/marked.min.js"></script>
<!--评论加载-->
<link href="https://img.koobai.com/Artalk.css" rel="stylesheet">
<style>
.atk-loading{
background: #FFFFFF;
}
</style>
<script src="https://img.koobai.com/Artalk.js"></script>
<!--memos结束-->
</div>
</article>
<ul class="pagination">
<li class="page-item page-next">
{{ if $paginator.HasNext }}
<a class="next" title="下一页" href="{{ $paginator.Next.URL }}">下一页</a>
{{ end }}
</li>
<li class="page-item page-previous">
{{ if $paginator.HasPrev }}
<a class="prev" title="上一页" href="{{ $paginator.Prev.URL }}">上一页</a>
{{ end }}
</li>
</ul>
</div>
</div>
{{ end }}
{{ end }}
+1 -3
View File
@@ -22,9 +22,7 @@
el: '#Comments', // 绑定元素的 Selector
server: 'https://artalk.usj.cc', // 后端地址
site: '优世界', // 你的站点名
flatMode: true,
theme: 'light',
darkMode: false
flatMode: true
})
}
</script>
+1 -5
View File
@@ -25,10 +25,6 @@
<script src="/js/echarts.min.js"></script>
<script src="/js/tiaozhuan.js"></script>
<script async src="/js/bsz.js"></script>
<!--memos 内容-->
<script src="/js/memos.js?v=1.4.4" defer></script>
<script src="/js/coco-message.min.js"></script>
<!--memos 结束-->
</body>
</html>
</html>
+2 -2
View File
@@ -3,7 +3,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>{{ .Title }}</title>
<!-- RSS Feed -->
<link rel="alternate" type="application/rss+xml" title="{{ site.Title }}" href="https://rss.usj.cc">
<link rel="alternate" type="application/rss+xml" title="{{ site.Title }}" href="/rss.xml">
<!-- Favicon -->
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<!-- Stylesheets -->
@@ -127,4 +127,4 @@
<script>console.log("\n %c Amigo Theme %c https://usj.cc \n", "color: #fadfa3; background: #030307; padding:3px; font-size:12px;", "color: #ffffff;background: #16171a; padding: 3px; font-size: 12px;");</script>
<meta name="keywords" content="大学,教程,blog,优世界,优设计,博客,大学生博客,生活,文案," />
<meta name="template" content="Amigo" />
</head>
</head>
+2 -2
View File
@@ -20,11 +20,11 @@
<nav class="nav">
<ul class="flat">
<li class="active"><a href="/">首页</a></li>
<li class="active"><a href="/post/">文章</a></li>
<li class="active"><a href="/about/">关于</a></li>
<li class="active"><a href="/ly/">留言</a></li>
<li class="active"><a href="/archives/">归档</a></li>
<li class="active"><a href="/links/">友链</a></li>
<!--<li class="active"><a href="/circles/">友圈</a></li>-->
</ul>
</nav>
</div>
</div>
-49
View File
@@ -1,49 +0,0 @@
{{ define "main" }}
<div id="pjax-container" uk-scrollspy="target: > div,a; cls: uk-animation-slide-bottom-small; delay: 0">
<article>
<div class="recent-posts section">
<h2 class="section-header">随笔<i class="ri-quill-pen-line"></i></h2>
<div class="posts">
<!-- 使用 sort 对文章按 Weight 排序 -->
{{ $posts := sort (where (where .Site.RegularPages "Type" "post") "Params.status" "ne" "hidden")
"Weight" }}
{{ $paginator := .Paginate $posts }}
{{ range $paginator.Pages }}
<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 }}
<!-- 判断发布时间是否小于 24 小时,并且没有 weight 属性 -->
{{ if and (lt $timeDiff 24) (not .Params.weight) }}
<span class="new-post-message"></span>
{{ end }}
<!-- 判断发布时间和 weight 属性 -->
{{ if .Params.weight }}
<!-- 如果有 weight 属性,添加 pushpin 图标 -->
<img src="/image/zd_top.png" alt="" srcset="" style="width: 19px;position: relative;bottom: 2px;right: 3px;box-shadow: 0 0px 0px rgba(0, 0, 0, 0.2);cursor: pointer;transform: 1s;">
{{ end }}
</div>
{{ end }}
</div>
</div>
</article>
<ul class="pagination">
<li class="page-item page-next">
{{ if $paginator.HasNext }}
<a class="next" title="下一页" href="{{ $paginator.Next.URL }}">下一页</a>
{{ end }}
</li>
<li class="page-item page-previous">
{{ if $paginator.HasPrev }}
<a class="prev" title="上一页" href="{{ $paginator.Prev.URL }}">上一页</a>
{{ end }}
</li>
</ul>
</div>
{{ end }}
+5 -12
View File
@@ -50,21 +50,14 @@
// 定义暗黑模式下的颜色方案
var darkTheme = {
backgroundColor: '#FFFFFF',
fangkuaicolor:'#F4F4F4',
gaoliangcolor: ['#333'],
riqiColor: '#999',
textbrcolor: '#FFF',
backgroundColor: '#1A1718',
fangkuaicolor:'#282325',
gaoliangcolor: ['#b25f2f'],
riqiColor: '#666',
textbrcolor: '#332D2F',
xiankuangcolor:'rgba(0, 0, 0, 0.0)',
};
// 备份暗黑模式
// backgroundColor: '#1A1718',
// fangkuaicolor:'#282325',
// gaoliangcolor: ['#b25f2f'],
// riqiColor: '#666',
// textbrcolor: '#332D2F',
// 根据浏览器主题模式选择当前主题
var currentTheme = prefersDarkMode ? darkTheme : lightTheme;