-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclock.html
More file actions
83 lines (77 loc) · 3.51 KB
/
Copy pathclock.html
File metadata and controls
83 lines (77 loc) · 3.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>桌面时钟</title>
<meta name="keywords" content="桌面时钟,数字时钟,夜间模式,天气,日期" />
<meta name="description" content="一款简洁的桌面时钟程序,支持PWA,支持夜间模式,支持天气,日期。" />
<meta content="telephone=no" name="format-detection">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta name="viewport" content="width=750,minimum-scale=0.2,maximum-scale=2,user-scalable=no" />
<!-- 防止息屏 -->
<meta name="screen-orientation" content="any">
<meta name="full-screen" content="yes">
<meta name="x5-fullscreen" content="true">
<meta name="360-fullscreen" content="true">
<link rel="icon" type="image/x-icon" href="./time.ico" />
<link rel="stylesheet" href="https://web.lieme.cn/common/css/base.css">
<link rel="stylesheet" href="./clock.css">
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="./vue.min.js"></script>
<!-- 确保农历库先加载 -->
<script src="./lunar.js"></script>
<script type="text/javascript">
//为页面html动态设置font-size值
(function (doc, win) {
var docEl = doc.documentElement,
resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
recalc = function () {
var clientWidth = docEl.clientWidth;
if (!clientWidth) return;
docEl.style.fontSize = clientWidth / 7.5 + 'px';
};
if (!doc.addEventListener) return;
win.addEventListener(resizeEvt, recalc, false);
doc.addEventListener('DOMContentLoaded', recalc, false);
})(document, window);
</script>
</head>
<body>
<!-- 横屏提示 -->
<div id="landscape-tip" class="landscape-tip">
<div class="tip-content">
<div class="tip-icon">📱</div>
<div class="tip-text">横屏观看效果更佳</div>
<div class="tip-subtext">请将设备横向放置以获得最佳体验</div>
</div>
</div>
<div id="clock">
<div :class="style ? 'theme--dark' : ''">
<div :class="`city-weather-${weatherBgClass}`" class="clockBox">
<div class="clockBody" :class="style ? 'night' : ''" id="clock">
<div class="dark-mode-toggle" @click="toggleDarkMode" :title="style ? '切换到白天模式' : '切换到夜晚模式'">
{{ style ? '☀️' : '🌙' }}
</div>
<!-- 手动模式指示器 -->
<div v-if="manualOverride" class="manual-mode-indicator" title="已手动设置模式,点击模式切换按钮可恢复自动模式">
🔒
</div>
<div class="weather" v-if="weather" v-html="weather"></div>
<div class="clock">
<div class="hour">{{hour}}</div>
<div class="sep">:</div>
<div class="min">{{min}}</div>
<div class="sec">{{sec}}</div>
</div>
<div class="info">
<div class="date">{{date}},{{lunarDate}}</div>
<div class="subdate">{{subWeather}}{{tempWeather}}</div>
</div>
</div>
</div>
</div>
</div>
<!-- 移除defer属性,确保按顺序执行 -->
<script src="./index.js"></script>
</body>
</html>