Repository navigation
Expand file tree
/
Copy pathhome.html
More file actions
135 lines (126 loc) · 6.67 KB
/
Copy pathhome.html
File metadata and controls
135 lines (126 loc) · 6.67 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
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>新标签页</title>
<link rel="stylesheet" href="home.css" />
</head>
<body>
<!-- 背景层:壁纸 + 压暗遮罩,保证白色文字可读 -->
<div class="home-bg" id="homeBg"></div>
<div class="home-bg-mask"></div>
<!-- 右上角工具按钮 -->
<div class="home-tools">
<button class="home-tool" id="appsBtn" title="全部快捷方式">
<svg viewBox="0 0 24 24" width="17" height="17" fill="currentColor"><circle cx="5" cy="5" r="1.9"/><circle cx="12" cy="5" r="1.9"/><circle cx="19" cy="5" r="1.9"/><circle cx="5" cy="12" r="1.9"/><circle cx="12" cy="12" r="1.9"/><circle cx="19" cy="12" r="1.9"/><circle cx="5" cy="19" r="1.9"/><circle cx="12" cy="19" r="1.9"/><circle cx="19" cy="19" r="1.9"/></svg>
</button>
<button class="home-tool" id="settingsBtn" title="设置">
<svg viewBox="0 0 24 24" width="17" height="17" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3.2"/><path d="M19.1 14.6a1.6 1.6 0 0 0 .32 1.77l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.6 1.6 0 0 0-1.77-.32 1.6 1.6 0 0 0-.97 1.46V21a2 2 0 0 1-4 0v-.1a1.6 1.6 0 0 0-1.05-1.46 1.6 1.6 0 0 0-1.77.32l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.6 1.6 0 0 0 .32-1.77 1.6 1.6 0 0 0-1.46-.97H3a2 2 0 0 1 0-4h.1a1.6 1.6 0 0 0 1.46-1.05 1.6 1.6 0 0 0-.32-1.77l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.6 1.6 0 0 0 1.77.32H9a1.6 1.6 0 0 0 .97-1.46V3a2 2 0 0 1 4 0v.1a1.6 1.6 0 0 0 .97 1.46 1.6 1.6 0 0 0 1.77-.32l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.6 1.6 0 0 0-.32 1.77V9a1.6 1.6 0 0 0 1.46.97H21a2 2 0 0 1 0 4h-.1a1.6 1.6 0 0 0-1.46.97z"/></svg>
</button>
</div>
<main class="home-main">
<!-- 时钟 -->
<section class="home-clock">
<div class="home-greeting" id="homeGreeting"></div>
<div class="home-time" id="homeTime">
<span class="home-time-main" id="timeMain">--:--</span>
<span class="home-time-sec" id="timeSec">:--</span>
</div>
<div class="home-date" id="homeDate"></div>
</section>
<!-- 搜索 -->
<section class="home-search">
<button class="home-engine" id="engineBtn" title="切换搜索引擎">
<span class="home-engine-badge" id="engineBadge">百</span>
</button>
<input id="homeSearchInput" type="text" placeholder="输入并搜索…" autocomplete="off" />
<button class="home-search-go" id="searchGoBtn" title="搜索">
<svg viewBox="0 0 24 24" width="17" height="17" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
</button>
<div class="home-engine-pop" id="enginePop" hidden></div>
</section>
<!-- 快捷方式 -->
<section class="home-shortcuts">
<button class="home-arrow" id="pagePrev" title="上一页" hidden>
<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 18 9 12 15 6"/></svg>
</button>
<div class="home-grid" id="homeGrid"></div>
<button class="home-arrow" id="pageNext" title="下一页" hidden>
<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"/></svg>
</button>
</section>
<div class="home-dots" id="homeDots"></div>
</main>
<!-- 面板:全部快捷方式 / 设置 -->
<div class="home-mask" id="panelMask" hidden>
<aside class="home-panel" id="appsPanel" hidden>
<div class="home-panel-head">
<h2>全部快捷方式</h2>
<button class="home-panel-close" data-close-panel title="关闭">×</button>
</div>
<div class="home-panel-body">
<button class="home-btn home-btn-primary home-add-btn" id="addShortcutBtn">
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
添加快捷方式
</button>
<ul class="home-list" id="appsList"></ul>
</div>
</aside>
<aside class="home-panel" id="settingsPanel" hidden>
<div class="home-panel-head">
<h2>设置</h2>
<button class="home-panel-close" data-close-panel title="关闭">×</button>
</div>
<div class="home-panel-body">
<div class="home-field">
<span class="home-field-label">默认搜索引擎</span>
<div class="home-seg" id="engineSeg"></div>
</div>
<div class="home-field">
<span class="home-field-label">背景壁纸</span>
<div class="home-seg" id="wallpaperSeg">
<button class="home-seg-item" data-wallpaper="bing">Bing 每日一图</button>
<button class="home-seg-item" data-wallpaper="none">不使用壁纸</button>
</div>
<button class="home-btn home-btn-ghost home-refresh-wall" id="refreshWallBtn">换一张壁纸</button>
<p class="home-hint" id="wallCopyright"></p>
</div>
<div class="home-field">
<span class="home-field-label">时钟</span>
<label class="home-switch">
<input type="checkbox" id="secondsToggle" />
<span>显示秒</span>
</label>
</div>
</div>
</aside>
</div>
<!-- 快捷方式编辑弹窗 -->
<div class="home-mask" id="scModal" hidden>
<div class="home-dialog" role="dialog" aria-modal="true">
<div class="home-panel-head">
<h2 id="scModalTitle">添加快捷方式</h2>
<button class="home-panel-close" id="scModalClose" title="关闭">×</button>
</div>
<div class="home-panel-body">
<label class="home-input-field">
<span>名称</span>
<input type="text" id="scTitle" placeholder="例如:哔哩哔哩" autocomplete="off" />
</label>
<label class="home-input-field">
<span>网址</span>
<input type="url" id="scUrl" placeholder="https://example.com" autocomplete="off" />
</label>
<p class="home-hint home-hint-error" id="scError" hidden></p>
</div>
<div class="home-dialog-foot">
<button class="home-btn home-btn-ghost" id="scCancel">取消</button>
<button class="home-btn home-btn-primary" id="scSave">保存</button>
</div>
</div>
</div>
<div class="home-toast" id="homeToast" hidden></div>
<script src="home.js"></script>
</body>
</html>