Skip to content

Commit 30368b4

Browse files
author
Taois
committed
feat: 发个新版本,修了亿点问题
1 parent 20de6f6 commit 30368b4

File tree

24 files changed

+8458
-782
lines changed

24 files changed

+8458
-782
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# drpyS(drpy-node)
22

33
nodejs作为服务端的drpy实现。全面升级异步写法
4-
~~积极开发中,每日一更~~,当前进度 `99.9%`
4+
~~积极开发中,每日一更~~,当前进度 `99.99%`
55
~~找工作中,随缘更新~~
66
上班当牛马,下班要带娃,阶段性佛系趁娃睡觉熬夜更新
77

@@ -33,14 +33,21 @@ nodejs作为服务端的drpy实现。全面升级异步写法
3333
* [cron表达式插件](/apps/cron-generator/index.html)
3434
* [剪切板智能推送插件](/apps/clipboard-pusher/index.html)
3535
* [DS源可用性检测插件](/apps/source-checker/index.html)
36+
* [DS解析检测插件](/apps/vip-parser/index.html)
3637
* [DS源配置编辑插件](/apps/source-editor/index.html)
3738
* [DS内存图片管理器插件](/apps/image-manager/index.html)
39+
* [DS时钟插件-白色时钟](/apps/clock/white_clock.html)|[日历时钟](/apps/clock/index.html)
40+
* [DS庆祝页面-完结撒花](/apps/happy/index.html)
3841
* [代码加解密工具](/admin/encoder)
3942
* [央视点播解析工具](/proxy/央视大全[官]/index.html)
4043
* [在线猫ds源主页](/cat/index.html)
4144

4245
## 更新记录
4346

47+
### 20250916
48+
49+
更新至V1.3.2
50+
4451
### 20250914
4552

4653
更新至V1.3.1

apps/clock/calendar.js

Lines changed: 649 additions & 0 deletions
Large diffs are not rendered by default.

apps/clock/index.html

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
<html lang="zh">
2+
<head>
3+
<title>主页日历钟-20250915</title>
4+
<meta charset="utf-8">
5+
6+
<meta name="applicable-device" content="pc,mobile">
7+
<meta name="viewport" content="width=device-width, initial-scale=1">
8+
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
9+
10+
<script src="calendar.js"></script>
11+
</head>
12+
13+
<body style="text-align: center">
14+
15+
<div class="a-nav item" id='clock'>
16+
<div class="aclass" style="width: 100%;height: 80%;"></div>
17+
<div>
18+
<object style="border:0;margin-top:0" type="text/x-scriptlet" id='clock_obj' data="white_clock.html"
19+
width="90%" height="80%">
20+
</object>
21+
<div id="showHistory" style="margin-top:0">
22+
<span id="clockText" style="color: #34b1ff;font-size: 12px;letter-spacing: 0;"></span>
23+
<span id="workdayText" style="color: #ff9044;font-size: 18px;letter-spacing: 1px;"></span>
24+
</div>
25+
</div>
26+
</div>
27+
28+
29+
<script>
30+
function darkModeHandler() {
31+
const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
32+
if (mediaQuery.matches) {
33+
document.body.style.background = '#1b1b1b';
34+
}
35+
}
36+
37+
function showDate() {
38+
let dNow = new Date();
39+
let dYear = dNow.getFullYear();
40+
let dMonth = dNow.getMonth() + 1;
41+
let dDay = dNow.getDate();
42+
let date_obj = calendar.solar2lunar(dYear, dMonth, dDay);
43+
let lValue = dYear + "年" + dMonth + "月" + dDay + "日 " + date_obj.ncWeek + " " + date_obj.gzYear + date_obj.Animal + "年 " + date_obj.IMonthCn + date_obj.IDayCn;
44+
console.log(lValue);
45+
return lValue;
46+
}
47+
48+
function getNowFormatDate() {
49+
let date = new Date();
50+
let seperator1 = "-";
51+
let seperator2 = ":";
52+
let month = date.getMonth() + 1;
53+
let strDate = date.getDate();
54+
let strHours = date.getHours();
55+
let strMinutes = date.getMinutes();
56+
let strSeconds = date.getSeconds() + 1;
57+
if (month >= 1 && month <= 9) {
58+
month = "0" + month
59+
}
60+
if (strDate >= 0 && strDate <= 9) {
61+
strDate = "0" + strDate
62+
}
63+
if (strHours >= 0 && strHours <= 9) {
64+
strHours = "0" + strHours
65+
}
66+
if (strMinutes >= 0 && strMinutes <= 9) {
67+
strMinutes = "0" + strMinutes
68+
}
69+
if (strSeconds >= 0 && strSeconds <= 9) {
70+
strSeconds = "0" + strSeconds
71+
}
72+
let current_date = date.getFullYear() + seperator1 + month + seperator1 + strDate + " " + strHours + seperator2 + strMinutes + seperator2 + strSeconds;
73+
console.log(`current date: ${current_date}`);
74+
return current_date
75+
}
76+
77+
function init_clock() {
78+
let data = showDate();
79+
document.getElementById('clockText').textContent = data.substring(5, data.length);
80+
setInterval(function () {
81+
let time = getNowFormatDate();
82+
document.getElementById('workdayText').textContent = time.split(" ")[1];
83+
}, 1000);
84+
}
85+
86+
document.addEventListener('DOMContentLoaded', function () {
87+
darkModeHandler();
88+
init_clock();
89+
});
90+
91+
</script>
92+
93+
</body>
94+
95+
<style>
96+
.a-nav {
97+
position: relative;
98+
}
99+
100+
.aclass {
101+
position: absolute;
102+
z-index: 999;
103+
}
104+
</style>
105+
106+
</html>

0 commit comments

Comments
 (0)