重构: 前端Vue3+Tailwind+Vite构建管线+设置组件拆分
This commit is contained in:
1 parent
f3148bf72f
commit
aee7997195
44 files changed
+4309
-1720
No files matched your search
+22
-928
@@ -1,934 +1,28 @@
|
||||
<!-- v4 -->
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
* { margin: 0; padding: 0; }
|
||||
html, body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background: #000;
|
||||
font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
|
||||
color: #fff;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
:root {
|
||||
--card-bg: rgba(22, 19, 28, 0.56);
|
||||
--card-bg-strong: rgba(24, 20, 30, 0.68);
|
||||
--card-line: rgba(255,255,255,0.10);
|
||||
--card-line-soft: rgba(255,255,255,0.06);
|
||||
--text-main: rgba(255,255,255,0.92);
|
||||
--text-soft: rgba(255,255,255,0.66);
|
||||
--text-faint: rgba(255,255,255,0.42);
|
||||
--accent-warm: #ffd86b;
|
||||
--accent-cool: #6bdcff;
|
||||
--shadow-card: 0 18px 60px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.10);
|
||||
--layout-x: 48px;
|
||||
--layout-top: 38px;
|
||||
--layout-bottom: 72px;
|
||||
--layout-gap: 18px;
|
||||
--layout-col-gap: 24px;
|
||||
--right-panel: 400px;
|
||||
--knowledge-panel: 460px;
|
||||
--time-panel-h: 154px;
|
||||
--zodiac-panel-h: 326px;
|
||||
--photo-panel-h: 360px;
|
||||
}
|
||||
|
||||
/* ===== 公共卡片样式 ===== */
|
||||
.card {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
background: linear-gradient(145deg, rgba(255,255,255,0.075), rgba(255,255,255,0.025)), var(--card-bg);
|
||||
backdrop-filter: blur(28px) saturate(1.2);
|
||||
-webkit-backdrop-filter: blur(28px) saturate(1.2);
|
||||
border: 1px solid var(--card-line);
|
||||
border-radius: 8px;
|
||||
padding: 22px 24px;
|
||||
box-shadow: var(--shadow-card);
|
||||
}
|
||||
.card::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
pointer-events: none;
|
||||
border-radius: inherit;
|
||||
background:
|
||||
linear-gradient(90deg, rgba(255,255,255,0.13), transparent 34%),
|
||||
radial-gradient(circle at 12% 0%, rgba(255,216,107,0.13), transparent 38%);
|
||||
opacity: 0.55;
|
||||
}
|
||||
.card > * {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-size: 66px;
|
||||
font-weight: 200;
|
||||
text-shadow: 0 3px 28px rgba(0,0,0,0.42);
|
||||
letter-spacing: 0;
|
||||
line-height: 1;
|
||||
font-variant-numeric: tabular-nums;
|
||||
color: rgba(255,255,255,0.96);
|
||||
}
|
||||
@keyframes hourlyGlow {
|
||||
0% { text-shadow: 0 0 30px rgba(255,255,255,1), 0 0 80px rgba(180,200,255,0.8), 0 0 120px rgba(100,150,255,0.5); color: #fff; }
|
||||
8% { text-shadow: 0 0 50px rgba(255,255,255,1), 0 0 100px rgba(180,200,255,1), 0 0 160px rgba(100,150,255,0.6); }
|
||||
18% { text-shadow: 0 0 20px rgba(255,255,255,0.6), 0 0 40px rgba(180,200,255,0.3); }
|
||||
28% { text-shadow: 0 0 35px rgba(255,255,255,0.85), 0 0 70px rgba(180,200,255,0.6), 0 0 100px rgba(100,150,255,0.35); }
|
||||
38% { text-shadow: 0 0 15px rgba(255,255,255,0.4), 0 0 30px rgba(180,200,255,0.2); }
|
||||
48% { text-shadow: 0 0 25px rgba(255,255,255,0.6), 0 0 50px rgba(180,200,255,0.4); }
|
||||
60% { text-shadow: 0 0 10px rgba(255,255,255,0.25), 0 0 20px rgba(180,200,255,0.12); }
|
||||
75% { text-shadow: 0 0 15px rgba(255,255,255,0.35), 0 0 30px rgba(180,200,255,0.2); }
|
||||
100% { text-shadow: 0 2px 20px rgba(0,0,0,0.5); color: #fff; }
|
||||
}
|
||||
.time.hourly-glow {
|
||||
animation: hourlyGlow 6s ease-out forwards;
|
||||
}
|
||||
.date {
|
||||
font-size: 13px;
|
||||
color: var(--text-soft);
|
||||
margin-bottom: 8px;
|
||||
text-shadow: 0 1px 6px rgba(0,0,0,0.5);
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
.current-weather {
|
||||
font-size: 17px;
|
||||
font-weight: 600;
|
||||
color: var(--text-main);
|
||||
text-shadow: 0 1px 4px rgba(0,0,0,0.5);
|
||||
margin-bottom: 16px;
|
||||
text-align: right;
|
||||
}
|
||||
.forecast-title {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
color: var(--text-faint);
|
||||
letter-spacing: 0;
|
||||
margin-bottom: 9px;
|
||||
text-align: right;
|
||||
}
|
||||
.weather-forecast {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(8, minmax(60px, 1fr));
|
||||
gap: 7px;
|
||||
overflow: hidden;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.forecast-item {
|
||||
background: rgba(255,255,255,0.055);
|
||||
border-radius: 8px;
|
||||
padding: 9px 8px;
|
||||
text-align: center;
|
||||
min-width: 0;
|
||||
font-size: 12px;
|
||||
color: var(--text-main);
|
||||
border: 1px solid var(--card-line-soft);
|
||||
}
|
||||
.forecast-icon { font-size: 22px; margin: 5px 0; }
|
||||
.forecast-time { color: var(--text-faint); font-size: 10px; }
|
||||
.forecast-temp { font-weight: 700; margin-top: 2px; font-size: 14px; }
|
||||
.forecast-pop { font-size: 10px; color: var(--text-faint); margin-top: 2px; }
|
||||
.daily-forecast {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(7, minmax(64px, 1fr));
|
||||
gap: 7px;
|
||||
overflow: hidden;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.daily-item {
|
||||
background: rgba(255,255,255,0.04);
|
||||
border-radius: 8px;
|
||||
padding: 9px 8px;
|
||||
text-align: center;
|
||||
min-width: 0;
|
||||
font-size: 12px;
|
||||
color: var(--text-main);
|
||||
border: 1px solid var(--card-line-soft);
|
||||
}
|
||||
.daily-icon { font-size: 22px; margin: 5px 0; }
|
||||
|
||||
.zodiac-text {
|
||||
font-size: 14px;
|
||||
color: var(--text-main);
|
||||
line-height: 1.6;
|
||||
text-shadow: 0 1px 4px rgba(0,0,0,0.5);
|
||||
}
|
||||
.zodiac-title {
|
||||
font-size: 16px;
|
||||
font-weight: 650;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
.zodiac-date {
|
||||
font-size: 11px;
|
||||
color: var(--text-faint);
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.zodiac-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
margin-bottom: 7px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.zodiac-bar-label {
|
||||
width: 28px;
|
||||
color: var(--text-soft);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.zodiac-bar-track {
|
||||
flex: 1;
|
||||
height: 5px;
|
||||
background: rgba(255,255,255,0.10);
|
||||
border-radius: 999px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.zodiac-bar-fill {
|
||||
height: 100%;
|
||||
border-radius: 999px;
|
||||
transition: width 0.6s ease;
|
||||
}
|
||||
.zodiac-bar-val {
|
||||
width: 30px;
|
||||
text-align: right;
|
||||
font-size: 11px;
|
||||
color: var(--text-soft);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.zodiac-tags {
|
||||
display: flex;
|
||||
gap: 7px;
|
||||
flex-wrap: wrap;
|
||||
margin: 10px 0 9px;
|
||||
}
|
||||
.zodiac-tag {
|
||||
font-size: 10px;
|
||||
background: rgba(255,255,255,0.08);
|
||||
padding: 4px 8px;
|
||||
border-radius: 6px;
|
||||
color: var(--text-soft);
|
||||
border: 1px solid rgba(255,255,255,0.05);
|
||||
}
|
||||
.zodiac-summary {
|
||||
font-size: 12px;
|
||||
color: var(--text-soft);
|
||||
line-height: 1.65;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* ===== AI 资讯 ===== */
|
||||
.ainews-header {
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
color: var(--text-faint);
|
||||
letter-spacing: 0;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
.ainews-item {
|
||||
display: flex;
|
||||
gap: 14px;
|
||||
margin-bottom: 12px;
|
||||
padding-bottom: 12px;
|
||||
border-bottom: 1px solid var(--card-line-soft);
|
||||
min-height: 58px;
|
||||
}
|
||||
.ainews-item:last-child {
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
border-bottom: none;
|
||||
}
|
||||
.ainews-img {
|
||||
width: 92px;
|
||||
height: 58px;
|
||||
border-radius: 6px;
|
||||
object-fit: cover;
|
||||
flex-shrink: 0;
|
||||
opacity: 0.92;
|
||||
box-shadow: 0 8px 22px rgba(0,0,0,0.22);
|
||||
}
|
||||
.ainews-body {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
.ainews-title-row {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 10px;
|
||||
}
|
||||
.ainews-title {
|
||||
font-size: 14px;
|
||||
font-weight: 650;
|
||||
color: var(--text-main);
|
||||
line-height: 1.4;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
.ainews-source {
|
||||
font-size: 10px;
|
||||
color: var(--text-faint);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.ainews-desc {
|
||||
font-size: 12px;
|
||||
color: var(--text-soft);
|
||||
line-height: 1.5;
|
||||
margin-top: 5px;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@media (max-width: 1500px) {
|
||||
:root {
|
||||
--layout-x: 32px;
|
||||
--layout-col-gap: 18px;
|
||||
--right-panel: 360px;
|
||||
--knowledge-panel: 380px;
|
||||
--time-panel-h: 144px;
|
||||
--zodiac-panel-h: 312px;
|
||||
--photo-panel-h: 320px;
|
||||
}
|
||||
.time {
|
||||
font-size: 64px;
|
||||
}
|
||||
.weather-forecast {
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
}
|
||||
.daily-forecast {
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
/* ===== 知识卡片 ===== */
|
||||
.knowledge-header {
|
||||
font-size: 11px;
|
||||
color: var(--text-faint);
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
letter-spacing: 0;
|
||||
font-weight: 700;
|
||||
}
|
||||
.knowledge-keyword-tag {
|
||||
background: rgba(255,255,255,0.09);
|
||||
padding: 3px 8px;
|
||||
border-radius: 6px;
|
||||
font-size: 10px;
|
||||
color: var(--text-soft);
|
||||
}
|
||||
.knowledge-content {
|
||||
font-size: 16px;
|
||||
color: var(--text-main);
|
||||
line-height: 1.55;
|
||||
text-shadow: 0 1px 4px rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
.divider {
|
||||
height: 1px;
|
||||
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.14), transparent);
|
||||
margin: 18px 0;
|
||||
}
|
||||
|
||||
#author {
|
||||
position: fixed;
|
||||
bottom: 60px;
|
||||
right: 30px;
|
||||
font-size: 16px;
|
||||
color: rgba(255,255,255,0.42);
|
||||
letter-spacing: 0;
|
||||
z-index: 10;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.weather-forecast::-webkit-scrollbar,
|
||||
.daily-forecast::-webkit-scrollbar { display: none; }
|
||||
|
||||
/* ===== SINGLE 布局(现有) ===== */
|
||||
body.layout-single #layout-single { display: block; }
|
||||
body.layout-single #layout-multi { display: none; }
|
||||
|
||||
body.layout-single #info {
|
||||
position: fixed;
|
||||
top: 42px;
|
||||
right: 42px;
|
||||
text-align: left;
|
||||
width: min(760px, calc(50vw - 52px));
|
||||
max-height: calc(100vh - 84px);
|
||||
z-index: 10;
|
||||
}
|
||||
body.layout-single #info .date {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* ===== MULTI 布局(独立卡片) ===== */
|
||||
body.layout-multi #layout-single { display: none; }
|
||||
body.layout-multi #layout-multi {
|
||||
position: fixed;
|
||||
inset: var(--layout-top) var(--layout-x) var(--layout-bottom);
|
||||
z-index: 10;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(420px, 1fr) minmax(360px, var(--knowledge-panel)) var(--right-panel);
|
||||
grid-template-rows: var(--time-panel-h) var(--layout-gap) var(--zodiac-panel-h) minmax(32px, 1fr) auto;
|
||||
grid-template-areas:
|
||||
"photo knowledge time"
|
||||
"photo knowledge ."
|
||||
"photo knowledge zodiac"
|
||||
". . ."
|
||||
"news weather weather";
|
||||
column-gap: var(--layout-col-gap);
|
||||
row-gap: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
body.layout-multi #layout-multi > .card {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
body.layout-multi #card-time {
|
||||
grid-area: time;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 22px 30px;
|
||||
}
|
||||
body.layout-multi #card-zodiac {
|
||||
grid-area: zodiac;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 22px 28px;
|
||||
}
|
||||
body.layout-multi #card-knowledge {
|
||||
grid-area: knowledge;
|
||||
align-self: stretch;
|
||||
width: 100%;
|
||||
min-height: 0;
|
||||
padding: 22px 26px;
|
||||
}
|
||||
body.layout-multi #card-knowledge .knowledge-content {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 8;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
body.layout-multi #card-ainews {
|
||||
grid-area: news;
|
||||
align-self: end;
|
||||
width: 100%;
|
||||
max-height: 390px;
|
||||
}
|
||||
body.layout-multi #card-weather {
|
||||
grid-area: weather;
|
||||
align-self: end;
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
text-align: right;
|
||||
padding: 22px 28px 24px;
|
||||
}
|
||||
body.layout-multi #card-photo {
|
||||
grid-area: photo;
|
||||
position: relative;
|
||||
top: auto;
|
||||
left: auto;
|
||||
align-self: start;
|
||||
width: 100%;
|
||||
max-height: var(--photo-panel-h);
|
||||
padding: 16px;
|
||||
}
|
||||
body.layout-multi #card-photo img {
|
||||
max-height: calc(var(--photo-panel-h) - 32px);
|
||||
}
|
||||
/* ===== 卡片隐藏 ===== */
|
||||
body.hide-time #card-time,
|
||||
body.hide-time #info .time,
|
||||
body.hide-time #info .date { display: none !important; }
|
||||
body.hide-weather #card-weather,
|
||||
body.hide-weather #info .weather-section,
|
||||
body.hide-weather #info .current-weather,
|
||||
body.hide-weather #info .forecast-title,
|
||||
body.hide-weather #info .weather-forecast,
|
||||
body.hide-weather #info .daily-forecast { display: none !important; }
|
||||
body.hide-zodiac #card-zodiac,
|
||||
body.hide-zodiac #info .zodiac-text { display: none !important; }
|
||||
body.hide-ainews #card-ainews,
|
||||
body.hide-ainews #info .ainews-section { display: none !important; }
|
||||
body.hide-knowledge #card-knowledge,
|
||||
body.hide-knowledge #info .knowledge-section { display: none !important; }
|
||||
body.hide-photo #card-photo { display: none !important; }
|
||||
|
||||
/* ===== 相册 ===== */
|
||||
#card-photo {
|
||||
position: fixed;
|
||||
top: 44px;
|
||||
left: 48px;
|
||||
width: min(860px, calc(50vw - 72px));
|
||||
box-sizing: border-box;
|
||||
z-index: 10;
|
||||
padding: 16px;
|
||||
}
|
||||
.photo-wrap {
|
||||
position: relative;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
#card-photo img {
|
||||
width: 100%;
|
||||
max-height: 450px;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
border-radius: 8px;
|
||||
transition: opacity 0.5s ease;
|
||||
}
|
||||
.photo-info {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding: 20px 14px 10px;
|
||||
background: linear-gradient(transparent, rgba(0,0,0,0.5));
|
||||
}
|
||||
.photo-counter {
|
||||
font-size: 11px;
|
||||
opacity: 0.7;
|
||||
display: block;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.photo-progress {
|
||||
height: 3px;
|
||||
background: rgba(255,255,255,0.15);
|
||||
border-radius: 2px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.photo-progress-bar {
|
||||
height: 100%;
|
||||
width: 0%;
|
||||
background: rgba(255,255,255,0.6);
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
/* ===== 电子相册模式 ===== */
|
||||
body.photo-frame-mode #bg-layer { display: none !important; }
|
||||
body.photo-frame-mode #card-photo { display: none !important; }
|
||||
body.photo-frame-mode #layout-multi { display: none !important; }
|
||||
body.photo-frame-mode #layout-single { display: none !important; }
|
||||
body.photo-frame-mode #author { display: none !important; }
|
||||
#photo-frame-bg {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 0; left: 0;
|
||||
width: 100%; height: 100%;
|
||||
z-index: 4;
|
||||
object-fit: cover;
|
||||
filter: blur(30px) brightness(0.5);
|
||||
transform: scale(1.1);
|
||||
transition: opacity 0.8s ease;
|
||||
}
|
||||
#photo-frame-img {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 0; left: 0;
|
||||
width: 100%; height: 100%;
|
||||
z-index: 5;
|
||||
object-fit: contain;
|
||||
transition: opacity 0.8s ease;
|
||||
}
|
||||
body.photo-frame-mode #photo-frame-bg { display: block; }
|
||||
body.photo-frame-mode #photo-frame-img { display: block; }
|
||||
/* 相册时钟叠加层 */
|
||||
.photo-frame-clock {
|
||||
position: fixed; top: 28px; right: 36px; z-index: 10;
|
||||
font-family: -apple-system, "SF Pro Display", "Segoe UI", sans-serif;
|
||||
font-size: 52px; font-weight: 200; letter-spacing: 2px;
|
||||
color: #fff;
|
||||
text-shadow: 0 0 20px rgba(0,0,0,0.8), 0 0 40px rgba(0,0,0,0.5), 0 2px 4px rgba(0,0,0,0.9);
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
transition: opacity 0.5s ease;
|
||||
}
|
||||
body.photo-frame-mode .photo-frame-clock { opacity: 1; }
|
||||
.photo-frame-date {
|
||||
position: fixed; top: 86px; right: 38px; z-index: 10;
|
||||
font-family: -apple-system, "SF Pro Display", "Segoe UI", sans-serif;
|
||||
font-size: 15px; font-weight: 400;
|
||||
color: rgba(255,255,255,0.8);
|
||||
text-shadow: 0 0 12px rgba(0,0,0,0.7), 0 1px 3px rgba(0,0,0,0.8);
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
transition: opacity 0.5s ease;
|
||||
}
|
||||
body.photo-frame-mode .photo-frame-date { opacity: 1; }
|
||||
</style>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<script type="module" crossorigin>(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const r of i)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function s(i){const r={};return i.integrity&&(r.integrity=i.integrity),i.referrerPolicy&&(r.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?r.credentials="include":i.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function n(i){if(i.ep)return;i.ep=!0;const r=s(i);fetch(i.href,r)}})();/**
|
||||
* @vue/shared v3.5.34
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/function Ks(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const J={},at=[],$e=()=>{},Wn=()=>!1,os=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ls=e=>e.startsWith("onUpdate:"),oe=Object.assign,Ws=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},sr=Object.prototype.hasOwnProperty,k=(e,t)=>sr.call(e,t),F=Array.isArray,dt=e=>jt(e)==="[object Map]",Un=e=>jt(e)==="[object Set]",hn=e=>jt(e)==="[object Date]",D=e=>typeof e=="function",ee=e=>typeof e=="string",Fe=e=>typeof e=="symbol",B=e=>e!==null&&typeof e=="object",Bn=e=>(B(e)||D(e))&&D(e.then)&&D(e.catch),zn=Object.prototype.toString,jt=e=>zn.call(e),nr=e=>jt(e).slice(8,-1),qn=e=>jt(e)==="[object Object]",Us=e=>ee(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ot=Ks(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cs=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},ir=/-\w/g,ye=cs(e=>e.replace(ir,t=>t.slice(1).toUpperCase())),rr=/\B([A-Z])/g,ct=cs(e=>e.replace(rr,"-$1").toLowerCase()),Gn=cs(e=>e.charAt(0).toUpperCase()+e.slice(1)),vs=cs(e=>e?`on${Gn(e)}`:""),Ie=(e,t)=>!Object.is(e,t),xs=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},Zn=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},or=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let pn;const fs=()=>pn||(pn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function lt(e){if(F(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],i=ee(n)?ur(n):lt(n);if(i)for(const r in i)t[r]=i[r]}return t}else if(ee(e)||B(e))return e}const lr=/;(?![^(]*\))/g,cr=/:([^]+)/,fr=/\/\*[^]*?\*\//g;function ur(e){const t={};return e.replace(fr,"").split(lr).forEach(s=>{if(s){const n=s.split(cr);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function us(e){let t="";if(ee(e))t=e;else if(F(e))for(let s=0;s<e.length;s++){const n=us(e[s]);n&&(t+=n+" ")}else if(B(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const ar="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",dr=Ks(ar);function Jn(e){return!!e||e===""}function hr(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=Bs(e[n],t[n]);return s}function Bs(e,t){if(e===t)return!0;let s=hn(e),n=hn(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=Fe(e),n=Fe(t),s||n)return e===t;if(s=F(e),n=F(t),s||n)return s&&n?hr(e,t):!1;if(s=B(e),n=B(t),s||n){if(!s||!n)return!1;const i=Object.keys(e).length,r=Object.keys(t).length;if(i!==r)return!1;for(const o in e){const l=e.hasOwnProperty(o),f=t.hasOwnProperty(o);if(l&&!f||!l&&f||!Bs(e[o],t[o]))return!1}}return String(e)===String(t)}const Yn=e=>!!(e&&e.__v_isRef===!0),K=e=>ee(e)?e:e==null?"":F(e)||B(e)&&(e.toString===zn||!D(e.toString))?Yn(e)?K(e.value):JSON.stringify(e,Xn,2):String(e),Xn=(e,t)=>Yn(t)?Xn(e,t.value):dt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,i],r)=>(s[ws(n,r)+" =>"]=i,s),{})}:Un(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>ws(s))}:Fe(t)?ws(t):B(t)&&!F(t)&&!qn(t)?String(t):t,ws=(e,t="")=>{var s;return Fe(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/**
|
||||
* @vue/reactivity v3.5.34
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/let re;class pr{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&re&&(re.active?(this.parent=re,this.index=(re.scopes||(re.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].pause();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].resume();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].resume()}}run(t){if(this._active){const s=re;try{return re=this,t()}finally{re=s}}}on(){++this._on===1&&(this.prevScope=re,re=this)}off(){if(this._on>0&&--this._on===0){if(re===this)re=this.prevScope;else{let t=re;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s<n;s++)this.effects[s].stop();for(this.effects.length=0,s=0,n=this.cleanups.length;s<n;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){for(s=0,n=this.scopes.length;s<n;s++)this.scopes[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function gr(){return re}let Z;const Ss=new WeakSet;class Qn{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,re&&(re.active?re.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ss.has(this)&&(Ss.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||ti(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,gn(this),si(this);const t=Z,s=be;Z=this,be=!0;try{return this.fn()}finally{ni(this),Z=t,be=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Gs(t);this.deps=this.depsTail=void 0,gn(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ss.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ps(this)&&this.run()}get dirty(){return Ps(this)}}let ei=0,Mt,It;function ti(e,t=!1){if(e.flags|=8,t){e.next=It,It=e;return}e.next=Mt,Mt=e}function zs(){ei++}function qs(){if(--ei>0)return;if(It){let t=It;for(It=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;Mt;){let t=Mt;for(Mt=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function si(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ni(e){let t,s=e.depsTail,n=s;for(;n;){const i=n.prevDep;n.version===-1?(n===s&&(s=i),Gs(n),_r(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=s}function Ps(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ii(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ii(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ht)||(e.globalVersion=Ht,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ps(e))))return;e.flags|=2;const t=e.dep,s=Z,n=be;Z=e,be=!0;try{si(e);const i=e.fn(e._value);(t.version===0||Ie(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{Z=s,be=n,ni(e),e.flags&=-3}}function Gs(e,t=!1){const{dep:s,prevSub:n,nextSub:i}=e;if(n&&(n.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let r=s.computed.deps;r;r=r.nextDep)Gs(r,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function _r(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let be=!0;const ri=[];function je(){ri.push(be),be=!1}function ke(){const e=ri.pop();be=e===void 0?!0:e}function gn(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=Z;Z=void 0;try{t()}finally{Z=s}}}let Ht=0;class mr{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Zs{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Z||!be||Z===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==Z)s=this.activeLink=new mr(Z,this),Z.deps?(s.prevDep=Z.depsTail,Z.depsTail.nextDep=s,Z.depsTail=s):Z.deps=Z.depsTail=s,oi(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=Z.depsTail,s.nextDep=void 0,Z.depsTail.nextDep=s,Z.depsTail=s,Z.deps===s&&(Z.deps=n)}return s}trigger(t){this.version++,Ht++,this.notify(t)}Line truncated
|
||||
* @vue/runtime-core v3.5.34
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/function kt(e,t,s,n){try{return n?e(...n):e()}catch(i){hs(i,t,s)}}function Re(e,t,s,n){if(D(e)){const i=kt(e,t,s,n);return i&&Bn(i)&&i.catch(r=>{hs(r,t,s)}),i}if(F(e)){const i=[];for(let r=0;r<e.length;r++)i.push(Re(e[r],t,s,n));return i}}function hs(e,t,s,n=!0){const i=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||J;if(t){let l=t.parent;const f=t.proxy,d=`https://vuejs.org/error-reference/#runtime-${s}`;for(;l;){const a=l.ec;if(a){for(let p=0;p<a.length;p++)if(a[p](e,f,d)===!1)return}l=l.parent}if(r){je(),kt(r,null,10,[e,f,d]),ke();return}}Wr(e,s,i,n,o)}function Wr(e,t,s,n=!0,i=!1){if(i)throw e;console.error(e)}const de=[];let Ee=-1;const ht=[];let qe=null,ut=0;const pi=Promise.resolve();let es=null;function Ur(e){const t=es||pi;return e?t.then(this?e.bind(this):e):t}function Br(e){let t=Ee+1,s=de.length;for(;t<s;){const n=t+s>>>1,i=de[n],r=Nt(i);r<e||r===e&&i.flags&2?t=n+1:s=n}return t}function Qs(e){if(!(e.flags&1)){const t=Nt(e),s=de[de.length-1];!s||!(e.flags&2)&&t>=Nt(s)?de.push(e):de.splice(Br(t),0,e),e.flags|=1,gi()}}function gi(){es||(es=pi.then(mi))}function zr(e){F(e)?ht.push(...e):qe&&e.id===-1?qe.splice(ut+1,0,e):e.flags&1||(ht.push(e),e.flags|=1),gi()}function mn(e,t,s=Ee+1){for(;s<de.length;s++){const n=de[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;de.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function _i(e){if(ht.length){const t=[...new Set(ht)].sort((s,n)=>Nt(s)-Nt(n));if(ht.length=0,qe){qe.push(...t);return}for(qe=t,ut=0;ut<qe.length;ut++){const s=qe[ut];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}qe=null,ut=0}}const Nt=e=>e.id==null?e.flags&2?-1:1/0:e.id;function mi(e){try{for(Ee=0;Ee<de.length;Ee++){const t=de[Ee];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),kt(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ee<de.length;Ee++){const t=de[Ee];t&&(t.flags&=-2)}Ee=-1,de.length=0,_i(),es=null,(de.length||ht.length)&&mi()}}let Pe=null,yi=null;function ts(e){const t=Pe;return Pe=e,yi=e&&e.type.__scopeId||null,t}function qr(e,t=Pe,s){if(!t||e._n)return e;const n=(...i)=>{n._d&&On(-1);const r=ts(t);let o;try{o=e(...i)}finally{ts(r),n._d&&On(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function st(e,t,s,n){const i=e.dirs,r=t&&t.dirs;for(let o=0;o<i.length;o++){const l=i[o];r&&(l.oldValue=r[o].value);let f=l.dir[n];f&&(je(),Re(f,s,8,[e.el,l,e,t]),ke())}}function Gr(e,t){if(he){let s=he.provides;const n=he.parent&&he.parent.provides;n===s&&(s=he.provides=Object.create(n)),s[e]=t}}function Yt(e,t,s=!1){const n=qo();if(n||pt){let i=pt?pt._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return s&&D(t)?t.call(n&&n.proxy):t}}const Zr=Symbol.for("v-scx"),Jr=()=>Yt(Zr);function Ye(e,t,s){return bi(e,t,s)}function bi(e,t,s=J){const{immediate:n,deep:i,flush:r,once:o}=s,l=oe({},s),f=t&&n||!t&&r!=="post";let d;if(Vt){if(r==="sync"){const C=Jr();d=C.__watcherHandles||(C.__watcherHandles=[])}else if(!f){const C=()=>{};return C.stop=$e,C.resume=$e,C.pause=$e,C}}const a=he;l.call=(C,N,I)=>Re(C,a,N,I);let p=!1;r==="post"?l.scheduler=C=>{pe(C,a&&a.suspense)}:r!=="sync"&&(p=!0,l.scheduler=(C,N)=>{N?C():Qs(C)}),l.augmentJob=C=>{t&&(C.flags|=4),p&&(C.flags|=2,a&&(C.id=a.uid,C.i=a))};const x=Kr(e,t,l);return Vt&&(d?d.push(x):f&&x()),x}function Yr(e,t,s){const n=this.proxy,i=ee(e)?e.includes(".")?vi(n,e):()=>n[e]:e.bind(n,n);let r;D(t)?r=t:(r=t.handler,s=t);const o=Kt(this),l=bi(i,r.bind(n),s);return o(),l}function vi(e,t){const s=t.split(".");return()=>{let n=e;for(let i=0;i<s.length&&n;i++)n=n[s[i]];return n}}const Xr=Symbol("_vte"),Qr=e=>e.__isTeleport,eo=Symbol("_leaveCb");function en(e,t){e.shapeFlag&6&&e.component?(e.transition=t,en(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function He(e,t){return D(e)?oe({name:e.name},t,{setup:e}):e}function xi(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function yn(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const ss=new WeakMap;function Pt(e,t,s,n,i=!1){if(F(e)){e.forEach((I,Q)=>Pt(I,t&&(F(t)?t[Q]:t),s,n,i));return}if($t(n)&&!i){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Pt(e,t,s,n.component.subTree);return}const r=n.shapeFlag&4?on(n.component):n.el,o=i?null:r,{i:l,r:f}=e,d=t&&t.r,a=l.refs===J?l.refs={}:l.refs,p=l.setupState,x=j(p),C=p===J?Wn:I=>yn(a,I)?!1:k(x,I),N=(I,Q)=>!(Q&&yn(a,Q));if(d!=null&&d!==f){if(bn(t),ee(d))a[d]=null,C(d)&&(p[d]=null);else if(fe(d)){const I=t;N(d,I.k)&&(d.value=null),I.k&&(a[I.k]=null)}}if(D(f))kt(f,l,12,[o,a]);else{const I=ee(f),Q=fe(f);if(I||Q){const W=()=>{if(e.f){const L=I?C(f)?p[f]:a[f]:N()||!e.k?f.value:a[e.k];if(i)F(L)&&Ws(L,r);else if(F(L))L.includes(r)||L.push(r);else if(I)a[f]=[r],C(f)&&(p[f]=a[f]);else{const Y=[r];N(f,e.k)&&(f.value=Y),e.k&&(a[e.k]=Y)}}else I?(a[f]=o,C(f)Line truncated
|
||||
* @vue/runtime-dom v3.5.34
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/let ks;const Pn=typeof window<"u"&&window.trustedTypes;if(Pn)try{ks=Pn.createPolicy("vue",{createHTML:e=>e})}catch{}const qi=ks?e=>ks.createHTML(e):e=>e,el="http://www.w3.org/2000/svg",tl="http://www.w3.org/1998/Math/MathML",Ne=typeof document<"u"?document:null,$n=Ne&&Ne.createElement("template"),sl={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const i=t==="svg"?Ne.createElementNS(el,e):t==="mathml"?Ne.createElementNS(tl,e):s?Ne.createElement(e,{is:s}):Ne.createElement(e);return e==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:e=>Ne.createTextNode(e),createComment:e=>Ne.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ne.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,i,r){const o=s?s.previousSibling:t.lastChild;if(i&&(i===r||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),s),!(i===r||!(i=i.nextSibling)););else{$n.innerHTML=qi(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const l=$n.content;if(n==="svg"||n==="mathml"){const f=l.firstChild;for(;f.firstChild;)l.appendChild(f.firstChild);l.removeChild(f)}t.insertBefore(l,s)}return[o?o.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},nl=Symbol("_vtc");function il(e,t,s){const n=e[nl];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Fn=Symbol("_vod"),rl=Symbol("_vsh"),ol=Symbol(""),ll=/(?:^|;)\s*display\s*:/;function cl(e,t,s){const n=e.style,i=ee(s);let r=!1;if(s&&!i){if(t)if(ee(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();s[l]==null&&Et(n,l,"")}else for(const o in t)s[o]==null&&Et(n,o,"");for(const o in s){o==="display"&&(r=!0);const l=s[o];l!=null?ul(e,o,!ee(t)&&t?t[o]:void 0,l)||Et(n,o,l):Et(n,o,"")}}else if(i){if(t!==s){const o=n[ol];o&&(s+=";"+o),n.cssText=s,r=ll.test(s)}}else t&&e.removeAttribute("style");Fn in e&&(e[Fn]=r?n.display:"",e[rl]&&(n.display="none"))}const Rn=/\s*!important$/;function Et(e,t,s){if(F(s))s.forEach(n=>Et(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=fl(e,t);Rn.test(s)?e.setProperty(ct(n),s.replace(Rn,""),"important"):e[n]=s}}const Hn=["Webkit","Moz","ms"],Ms={};function fl(e,t){const s=Ms[t];if(s)return s;let n=ye(t);if(n!=="filter"&&n in e)return Ms[t]=n;n=Gn(n);for(let i=0;i<Hn.length;i++){const r=Hn[i]+n;if(r in e)return Ms[t]=r}return t}function ul(e,t,s,n){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&ee(n)&&s===n}const Dn="http://www.w3.org/1999/xlink";function Nn(e,t,s,n,i,r=dr(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Dn,t.slice(6,t.length)):e.setAttributeNS(Dn,t,s):s==null||r&&!Jn(s)?e.removeAttribute(t):e.setAttribute(t,r?"":Fe(s)?String(s):s)}function Ln(e,t,s,n,i){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?qi(s):s);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const l=r==="OPTION"?e.getAttribute("value")||"":e.value,f=s==null?e.type==="checkbox"?"on":"":String(s);(l!==f||!("_value"in e))&&(e.value=f),s==null&&e.removeAttribute(t),e._value=s;return}let o=!1;if(s===""||s==null){const l=typeof e[t];l==="boolean"?s=Jn(s):s==null&&l==="string"?(s="",o=!0):l==="number"&&(s=0,o=!0)}try{e[t]=s}catch{}o&&e.removeAttribute(i||t)}function al(e,t,s,n){e.addEventListener(t,s,n)}function dl(e,t,s,n){e.removeEventListener(t,s,n)}const Vn=Symbol("_vei");function hl(e,t,s,n,i=null){const r=e[Vn]||(e[Vn]={}),o=r[t];if(n&&o)o.value=n;else{const[l,f]=pl(t);if(n){const d=r[t]=ml(n,i);al(e,l,d,f)}else o&&(dl(e,l,o,f),r[t]=void 0)}}const jn=/(?:Once|Passive|Capture)$/;function pl(e){let t;if(jn.test(e)){t={};let n;for(;n=e.match(jn);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):ct(e.slice(2)),t]}let Is=0;const gl=Promise.resolve(),_l=()=>Is||(gl.then(()=>Is=0),Is=Date.now());function ml(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;Re(yl(n,s.value),t,5,[n])};return s.value=e,s.attached=_l(),s}function yl(e,t){if(F(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>i=>!i._stopped&&n&&n(i))}else return t}const kn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,bl=(e,t,s,n,i,r)=>{const o=i==="svg";t==="class"?il(e,n,o):t==="style"?cl(e,s,n):os(t)?ls(t)||hl(e,t,s,n,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):vl(e,t,n,o))?(Ln(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Nn(e,t,n,o,r,t!=="value")):e._isVueCE&&(xl(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!ee(n)))?Ln(e,ye(t),n,r,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Nn(e,t,n,o))};function vl(e,t,s,n){if(n)return!!(t==="inLine truncated
|
||||
<style rel="stylesheet" crossorigin>.time[data-v-fc6abe16]{font-size:66px;font-weight:200;text-shadow:0 3px 28px rgba(0,0,0,.42);letter-spacing:0;line-height:1;font-variant-numeric:tabular-nums;color:#fffffff5}.time.hourly-glow[data-v-fc6abe16]{animation:hourlyGlow 6s ease-out forwards}.date[data-v-fc6abe16]{font-size:13px;color:var(--text-soft);margin-bottom:8px;text-shadow:0 1px 6px rgba(0,0,0,.5);letter-spacing:0}@media(max-width:1500px){.time[data-v-fc6abe16]{font-size:64px}}.current-weather[data-v-c377fb97]{font-size:17px;font-weight:600;color:var(--text-main);text-shadow:0 1px 4px rgba(0,0,0,.5);margin-bottom:16px;text-align:right}.forecast-title[data-v-c377fb97]{font-size:11px;font-weight:600;color:var(--text-faint);letter-spacing:0;margin-bottom:9px;text-align:right}.weather-forecast[data-v-c377fb97]{display:grid;grid-template-columns:repeat(8,minmax(60px,1fr));gap:7px;overflow:hidden}.forecast-item[data-v-c377fb97]{background:#ffffff0e;border-radius:8px;padding:9px 8px;text-align:center;min-width:0;font-size:12px;color:var(--text-main);border:1px solid var(--card-line-soft)}.forecast-icon[data-v-c377fb97]{font-size:22px;margin:5px 0}.forecast-time[data-v-c377fb97]{color:var(--text-faint);font-size:10px}.forecast-temp[data-v-c377fb97]{font-weight:700;margin-top:2px;font-size:14px}.forecast-pop[data-v-c377fb97]{font-size:10px;color:var(--text-faint);margin-top:2px}.daily-forecast[data-v-c377fb97]{display:grid;grid-template-columns:repeat(7,minmax(64px,1fr));gap:7px;overflow:hidden}.daily-item[data-v-c377fb97]{background:#ffffff0a;border-radius:8px;padding:9px 8px;text-align:center;min-width:0;font-size:12px;color:var(--text-main);border:1px solid var(--card-line-soft)}.daily-icon[data-v-c377fb97]{font-size:22px;margin:5px 0}.weather-forecast[data-v-c377fb97]::-webkit-scrollbar,.daily-forecast[data-v-c377fb97]::-webkit-scrollbar{display:none}@media(max-width:1500px){.weather-forecast[data-v-c377fb97],.daily-forecast[data-v-c377fb97]{grid-template-columns:repeat(4,1fr)}}.zodiac-text[data-v-bcc0f377]{font-size:14px;color:var(--text-main);line-height:1.6;text-shadow:0 1px 4px rgba(0,0,0,.5)}.zodiac-title[data-v-bcc0f377]{font-size:16px;font-weight:650;margin-bottom:3px}.zodiac-date[data-v-bcc0f377]{font-size:11px;color:var(--text-faint);margin-bottom:12px}.zodiac-bar[data-v-bcc0f377]{display:flex;align-items:center;gap:10px;margin-bottom:7px;font-size:12px}.zodiac-bar-label[data-v-bcc0f377]{width:28px;color:var(--text-soft);flex-shrink:0}.zodiac-bar-track[data-v-bcc0f377]{flex:1;height:5px;background:#ffffff1a;border-radius:999px;overflow:hidden}.zodiac-bar-fill[data-v-bcc0f377]{height:100%;border-radius:999px;transition:width .6s ease}.zodiac-bar-val[data-v-bcc0f377]{width:30px;text-align:right;font-size:11px;color:var(--text-soft);flex-shrink:0}.zodiac-tags[data-v-bcc0f377]{display:flex;gap:7px;flex-wrap:wrap;margin:10px 0 9px}.zodiac-tag[data-v-bcc0f377]{font-size:10px;background:#ffffff14;padding:4px 8px;border-radius:6px;color:var(--text-soft);border:1px solid rgba(255,255,255,.05)}.zodiac-summary[data-v-bcc0f377]{font-size:12px;color:var(--text-soft);line-height:1.65;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.knowledge-header[data-v-20fd209d]{font-size:11px;color:var(--text-faint);margin-bottom:10px;display:flex;align-items:center;gap:6px;letter-spacing:0;font-weight:700}.knowledge-keyword-tag[data-v-20fd209d]{background:#ffffff17;padding:3px 8px;border-radius:6px;font-size:10px;color:var(--text-soft)}.knowledge-content[data-v-20fd209d]{font-size:16px;color:var(--text-main);line-height:1.55;text-shadow:0 1px 4px rgba(0,0,0,.5)}.ainews-header[data-v-842d17af]{font-size:11px;font-weight:700;color:var(--text-faint);letter-spacing:0;margin-bottom:14px}.ainews-item[data-v-842d17af]{display:flex;gap:14px;margin-bottom:12px;padding-bottom:12px;border-bottom:1px solid var(--card-line-soft);min-height:58px}.ainews-item[data-v-842d17af]:last-child{margin-bottom:0;padding-bottom:0;border-bottom:none}.ainews-img[data-v-842d17af]{width:92px;height:58px;border-radius:6px;-o-object-fit:cover;object-fit:cover;flex-shrink:0;opacity:.92;box-shadow:0 8px 22px #00000038}.ainews-body[data-v-842d17af]{flex:1;min-width:0}.ainews-title-row[data-v-842d17af]{display:flex;align-items:baseline;gap:10px}.ainews-title[data-v-842d17af]{font-size:14px;font-weight:650;color:var(--text-main);line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.ainews-source[data-v-842d17af]{font-size:10px;color:var(--text-faint);flex-shrink:0}.ainews-desc[data-v-842d17af]{font-size:12px;color:var(--text-soft);line-height:1.5;margin-top:5px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}#layout-single[data-v-89757d39]{display:block}#info[data-v-89757d39]{position:fixed;top:42px;right:42px;text-align:left;width:min(760px,calc(50vw - 52px));max-height:calc(100vh - 84px);z-index:10}#card-photo[data-v-32718552]{padding:16px}.photoLine truncated
|
||||
</head>
|
||||
<body class="layout-{{LAYOUT}} {{BODY_CLASSES}}">
|
||||
{{BACKGROUND}}
|
||||
|
||||
<!-- ===== SINGLE 布局 ===== -->
|
||||
<div id="layout-single">
|
||||
<div id="info" class="card">
|
||||
<div class="date" id="date">1月1日 周一</div>
|
||||
<div class="time" id="time">00:00</div>
|
||||
<div class="divider"></div>
|
||||
<div class="ainews-section">
|
||||
<div class="ainews-header">🤖 AI 资讯</div>
|
||||
<div id="ainews">加载中...</div>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div class="knowledge-section">
|
||||
<div class="knowledge-header">💡 知识卡片 <span class="knowledge-keyword-tag" id="knowledgeTag"></span></div>
|
||||
<div class="knowledge-content" id="knowledge">请设置知识关键字</div>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div>
|
||||
<div class="current-weather" id="currentWeather">加载中...</div>
|
||||
<div class="forecast-title">24小时预报</div>
|
||||
<div class="weather-forecast" id="hourlyForecast"></div>
|
||||
<div class="forecast-title" style="margin-top:12px">7日预报</div>
|
||||
<div class="daily-forecast" id="dailyForecast"></div>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div class="zodiac-text" id="zodiac">加载中...</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ===== MULTI 布局 ===== -->
|
||||
<div id="layout-multi">
|
||||
<div id="card-time" class="card">
|
||||
<div class="date" id="date2">1月1日 周一</div>
|
||||
<div class="time" id="time2">00:00</div>
|
||||
</div>
|
||||
<div id="card-zodiac" class="card">
|
||||
<div class="zodiac-text" id="zodiac2">加载中...</div>
|
||||
</div>
|
||||
<div id="card-knowledge" class="card">
|
||||
<div class="knowledge-header">💡 知识卡片 <span class="knowledge-keyword-tag" id="knowledgeTag2"></span></div>
|
||||
<div class="knowledge-content" id="knowledge2">请设置知识关键字</div>
|
||||
</div>
|
||||
<div id="card-ainews" class="card">
|
||||
<div class="ainews-header">🤖 AI 资讯</div>
|
||||
<div id="ainews2">加载中...</div>
|
||||
</div>
|
||||
<div id="card-weather" class="card">
|
||||
<div class="current-weather" id="currentWeather2">加载中...</div>
|
||||
<div class="forecast-title">24小时预报</div>
|
||||
<div class="weather-forecast" id="hourlyForecast2"></div>
|
||||
<div class="forecast-title" style="margin-top:12px">7日预报</div>
|
||||
<div class="daily-forecast" id="dailyForecast2"></div>
|
||||
</div>
|
||||
<div id="card-photo" class="card" style="display:none">
|
||||
<div class="photo-wrap">
|
||||
<img id="photoImg" src="" alt="">
|
||||
<div class="photo-info">
|
||||
<span class="photo-counter" id="photoCounter"></span>
|
||||
<div class="photo-progress"><div class="photo-progress-bar" id="photoProgress"></div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="author">绝尘</div>
|
||||
|
||||
<!-- 相册模式全屏图片 -->
|
||||
<img id="photo-frame-bg" src="" alt="">
|
||||
<img id="photo-frame-img" src="" alt="">
|
||||
<!-- 相册模式时钟 -->
|
||||
<div class="photo-frame-clock" id="photoFrameClock"></div>
|
||||
<div class="photo-frame-date" id="photoFrameDate"></div>
|
||||
|
||||
<script>
|
||||
var lastTimeStr='', lastDateStr='', lastZodiac='';
|
||||
var horoscopeInfo=null;
|
||||
|
||||
var zodiacData = {
|
||||
'白羊座':{icon:'♈',date:'3.21-4.19'},
|
||||
'金牛座':{icon:'♉',date:'4.20-5.20'},
|
||||
'双子座':{icon:'♊',date:'5.21-6.21'},
|
||||
'巨蟹座':{icon:'♋',date:'6.22-7.22'},
|
||||
'狮子座':{icon:'♌',date:'7.23-8.22'},
|
||||
'处女座':{icon:'♍',date:'8.23-9.22'},
|
||||
'天秤座':{icon:'♎',date:'9.23-10.23'},
|
||||
'天蝎座':{icon:'♏',date:'10.24-11.22'},
|
||||
'射手座':{icon:'♐',date:'11.23-12.21'},
|
||||
'摩羯座':{icon:'♑',date:'12.22-1.19'},
|
||||
'水瓶座':{icon:'♒',date:'1.20-2.18'},
|
||||
'双鱼座':{icon:'♓',date:'2.19-3.20'}
|
||||
};
|
||||
|
||||
var barColors={all:'#e0e0e0',love:'#ff6b9d',work:'#4fc3f7',money:'#ffd54f',health:'#81c784'};
|
||||
|
||||
function getUserZodiac(){ return window.userZodiac||'射手座'; }
|
||||
|
||||
function setEl(id,html){
|
||||
var e=document.getElementById(id);
|
||||
if(e) e.innerHTML=html;
|
||||
}
|
||||
function setText(id,txt){
|
||||
var e=document.getElementById(id);
|
||||
if(e) e.textContent=txt;
|
||||
}
|
||||
function escapeHTML(value){
|
||||
return String(value == null ? '' : value)
|
||||
.replace(/&/g,'&')
|
||||
.replace(/</g,'<')
|
||||
.replace(/>/g,'>')
|
||||
.replace(/"/g,'"')
|
||||
.replace(/'/g,''');
|
||||
}
|
||||
function safeImageURL(value){
|
||||
var url=String(value || '').trim();
|
||||
return /^(https?:|data:image\/)/i.test(url) ? url : '';
|
||||
}
|
||||
|
||||
function buildBar(label,val,color){
|
||||
var v=parseInt(val)||0;
|
||||
return '<div class="zodiac-bar">'+
|
||||
'<span class="zodiac-bar-label">'+label+'</span>'+
|
||||
'<div class="zodiac-bar-track"><div class="zodiac-bar-fill" style="width:'+v+'%;background:'+color+'"></div></div>'+
|
||||
'<span class="zodiac-bar-val">'+val+'%</span></div>';
|
||||
}
|
||||
|
||||
function buildZodiacHTML(name){
|
||||
var z=zodiacData[name]||{icon:'✨',date:''};
|
||||
var html='<div class="zodiac-title">'+z.icon+' '+name+'运势</div>';
|
||||
html+='<div class="zodiac-date">'+z.date+'</div>';
|
||||
if(horoscopeInfo&&horoscopeInfo.zodiac===name){
|
||||
html+=buildBar('综合',horoscopeInfo.all,barColors.all);
|
||||
html+=buildBar('爱情',horoscopeInfo.love,barColors.love);
|
||||
html+=buildBar('工作',horoscopeInfo.work,barColors.work);
|
||||
html+=buildBar('财运',horoscopeInfo.money,barColors.money);
|
||||
html+=buildBar('健康',horoscopeInfo.health,barColors.health);
|
||||
html+='<div class="zodiac-tags">';
|
||||
if(horoscopeInfo.luckyColor) html+='<span class="zodiac-tag">🎨 '+escapeHTML(horoscopeInfo.luckyColor)+'</span>';
|
||||
if(horoscopeInfo.luckyNum) html+='<span class="zodiac-tag">🔢 '+escapeHTML(horoscopeInfo.luckyNum)+'</span>';
|
||||
if(horoscopeInfo.noble) html+='<span class="zodiac-tag">⭐ '+escapeHTML(horoscopeInfo.noble)+'</span>';
|
||||
html+='</div>';
|
||||
if(horoscopeInfo.summary) html+='<div class="zodiac-summary">'+escapeHTML(horoscopeInfo.summary)+'</div>';
|
||||
} else {
|
||||
html+='<div style="opacity:0.4;font-size:12px;margin-top:8px">运势加载中...</div>';
|
||||
}
|
||||
return html;
|
||||
}
|
||||
|
||||
function updateZodiacDisplay(){
|
||||
var name=getUserZodiac();
|
||||
if(name===lastZodiac) return;
|
||||
lastZodiac=name;
|
||||
var html=buildZodiacHTML(name);
|
||||
setEl('zodiac',html);
|
||||
setEl('zodiac2',html);
|
||||
}
|
||||
|
||||
var holidays=[
|
||||
{m:1,d:1,name:'元旦'},
|
||||
{m:2,d:14,name:'情人节'},
|
||||
{m:3,d:8,name:'妇女节'},
|
||||
{m:4,d:5,name:'清明节'},
|
||||
{m:5,d:1,name:'劳动节'},
|
||||
{m:5,d:4,name:'青年节'},
|
||||
{m:6,d:1,name:'儿童节'},
|
||||
{m:7,d:1,name:'建党节'},
|
||||
{m:8,d:1,name:'建军节'},
|
||||
{m:9,d:10,name:'教师节'},
|
||||
{m:10,d:1,name:'国庆节'},
|
||||
{m:10,d:31,name:'万圣节'},
|
||||
{m:12,d:25,name:'圣诞节'}
|
||||
];
|
||||
|
||||
function getNextHoliday(now){
|
||||
var y=now.getFullYear(), results=[];
|
||||
for(var i=0;i<holidays.length;i++){
|
||||
var h=holidays[i];
|
||||
var target=new Date(y,h.m-1,h.d);
|
||||
var diff=Math.ceil((target-now)/(1000*60*60*24));
|
||||
if(diff>0&&diff<=60) results.push({diff:diff,name:h.name});
|
||||
if(diff<0){
|
||||
target=new Date(y+1,h.m-1,h.d);
|
||||
diff=Math.ceil((target-now)/(1000*60*60*24));
|
||||
if(diff>0&&diff<=60) results.push({diff:diff,name:h.name});
|
||||
}
|
||||
}
|
||||
results.sort(function(a,b){return a.diff-b.diff;});
|
||||
return results.length>0?'距'+results[0].name+'还有'+results[0].diff+'天':'';
|
||||
}
|
||||
|
||||
window.setCardVisible=function(card,visible){
|
||||
if(visible){document.body.classList.remove('hide-'+card);}
|
||||
else{document.body.classList.add('hide-'+card);}
|
||||
};
|
||||
|
||||
window.setWallpaperVisible=function(visible){
|
||||
var bg=document.getElementById('bg-layer');
|
||||
if(bg){bg.style.display=visible?'':'none';}
|
||||
};
|
||||
|
||||
window.setPhotoFrameMode=function(enabled){
|
||||
if(enabled){
|
||||
document.body.classList.add('photo-frame-mode');
|
||||
} else {
|
||||
document.body.classList.remove('photo-frame-mode');
|
||||
}
|
||||
};
|
||||
|
||||
window._showSeconds={{SHOW_SECONDS}};
|
||||
window.setShowSeconds=function(v){window._showSeconds=v; updateTime();};
|
||||
|
||||
function updateTime(){
|
||||
var now=new Date();
|
||||
var hh=String(now.getHours()).padStart(2,'0');
|
||||
var mm=String(now.getMinutes()).padStart(2,'0');
|
||||
var ss=String(now.getSeconds()).padStart(2,'0');
|
||||
var month=now.getMonth()+1;
|
||||
var day=now.getDate();
|
||||
var week=['周日','周一','周二','周三','周四','周五','周六'][now.getDay()];
|
||||
var timeStr=window._showSeconds?(hh+':'+mm+':'+ss):(hh+':'+mm);
|
||||
var dateStr=month+'月'+day+'日 '+week;
|
||||
if(timeStr!==lastTimeStr){
|
||||
setText('time',timeStr); setText('time2',timeStr); lastTimeStr=timeStr;
|
||||
if(mm==='00'&&ss==='00'){
|
||||
['time','time2'].forEach(function(id){
|
||||
var el=document.getElementById(id);
|
||||
if(el){
|
||||
el.classList.remove('hourly-glow');
|
||||
void el.offsetWidth;
|
||||
el.classList.add('hourly-glow');
|
||||
el.addEventListener('animationend',function(){ el.classList.remove('hourly-glow'); },{once:true});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
if(dateStr!==lastDateStr){
|
||||
var holiday=getNextHoliday(now);
|
||||
var displayStr=holiday?dateStr+' <span style="opacity:0.5;font-size:12px">「'+holiday+'」</span>':dateStr;
|
||||
setEl('date',displayStr); setEl('date2',displayStr); lastDateStr=dateStr;
|
||||
}
|
||||
updateZodiacDisplay();
|
||||
// 相册模式时钟
|
||||
var fc=document.getElementById('photoFrameClock');
|
||||
var fd=document.getElementById('photoFrameDate');
|
||||
if(fc) fc.textContent=timeStr;
|
||||
if(fd) fd.textContent=dateStr;
|
||||
}
|
||||
|
||||
window.updateHoroscopeFromGo=function(data){
|
||||
console.log('[horoscope] received:', typeof data, JSON.stringify(data).substring(0,100));
|
||||
if(typeof data==='string') data=JSON.parse(data);
|
||||
horoscopeInfo=data;
|
||||
lastZodiac='';
|
||||
window.userZodiac=data.zodiac;
|
||||
updateZodiacDisplay();
|
||||
};
|
||||
|
||||
window.updateAINewsFromGo=function(items){
|
||||
if(typeof items==='string') items=JSON.parse(items);
|
||||
if(!items||!items.length) return;
|
||||
var html='';
|
||||
var count=Math.min(items.length,5);
|
||||
for(var i=0;i<count;i++){
|
||||
var n=items[i];
|
||||
var time=n.ctime||'';
|
||||
if(time.length>10) time=time.substring(5,10);
|
||||
html+='<div class="ainews-item">';
|
||||
var picUrl=safeImageURL(n.picUrl);
|
||||
if(picUrl){
|
||||
html+='<img class="ainews-img" src="'+escapeHTML(picUrl)+'" loading="lazy" onerror="this.style.display=\'none\'">';
|
||||
}
|
||||
html+='<div class="ainews-body">';
|
||||
html+='<div class="ainews-title-row"><span class="ainews-title">'+escapeHTML(n.title)+'</span><span class="ainews-source">'+escapeHTML(n.source)+' · '+escapeHTML(time)+'</span></div>';
|
||||
if(n.description) html+='<div class="ainews-desc">'+escapeHTML(n.description)+'</div>';
|
||||
html+='</div></div>';
|
||||
}
|
||||
setEl('ainews',html);
|
||||
setEl('ainews2',html);
|
||||
};
|
||||
|
||||
window.updateKnowledgeFromGo=function(data){
|
||||
if(typeof data==='string') data=JSON.parse(data);
|
||||
var ids=['knowledge','knowledge2'];
|
||||
var tagIds=['knowledgeTag','knowledgeTag2'];
|
||||
ids.forEach(function(id,i){
|
||||
var el=document.getElementById(id);
|
||||
if(el) el.textContent=data.content||'';
|
||||
var tag=document.getElementById(tagIds[i]);
|
||||
if(tag) tag.textContent=data.keyword?'#'+data.keyword:'';
|
||||
});
|
||||
};
|
||||
|
||||
window.updateWeatherFromGo=function(data){
|
||||
if(typeof data==='string') data=JSON.parse(data);
|
||||
|
||||
function renderWeather(curId,hourlyId,dailyId){
|
||||
if(data.current) setText(curId,data.current);
|
||||
var fel=document.getElementById(hourlyId);
|
||||
if(fel){
|
||||
if(data.hourly&&data.hourly.length>0){
|
||||
fel.innerHTML=data.hourly.map(function(item){
|
||||
return '<div class="forecast-item"><div class="forecast-time">'+escapeHTML(item.time)+'</div><div class="forecast-icon">'+escapeHTML(item.icon)+'</div><div class="forecast-temp">'+escapeHTML(item.temp)+'</div>'+(item.pop&&item.pop!=='0'?'<div class="forecast-pop">'+escapeHTML(item.pop)+'%</div>':'')+'</div>';
|
||||
}).join('');
|
||||
} else { fel.innerHTML='<div style="font-size:11px;opacity:0.4">暂无数据</div>'; }
|
||||
}
|
||||
var del=document.getElementById(dailyId);
|
||||
if(del){
|
||||
if(data.daily&&data.daily.length>0){
|
||||
del.innerHTML=data.daily.map(function(item){
|
||||
return '<div class="daily-item"><div style="opacity:0.6;font-size:10px">'+escapeHTML(item.date)+'</div><div class="daily-icon">'+escapeHTML(item.icon)+'</div><div class="forecast-temp">'+escapeHTML(item.tempMin)+'°~'+escapeHTML(item.tempMax)+'°</div></div>';
|
||||
}).join('');
|
||||
} else { del.innerHTML='<div style="font-size:11px;opacity:0.4">暂无数据</div>'; }
|
||||
}
|
||||
}
|
||||
|
||||
renderWeather('currentWeather','hourlyForecast','dailyForecast');
|
||||
renderWeather('currentWeather2','hourlyForecast2','dailyForecast2');
|
||||
};
|
||||
|
||||
updateTime();
|
||||
setInterval(updateTime,1000);
|
||||
|
||||
window.updatePhotoFromGo=function(data){
|
||||
if(typeof data==='string') data=JSON.parse(data);
|
||||
var pfImg=document.getElementById('photo-frame-img');
|
||||
var pfBg=document.getElementById('photo-frame-bg');
|
||||
if(document.body.classList.contains('photo-frame-mode')&&pfImg){
|
||||
if(!data||!data.src) return;
|
||||
pfImg.style.opacity='0';
|
||||
pfBg.style.opacity='0';
|
||||
setTimeout(function(){
|
||||
pfBg.src=data.src;
|
||||
pfImg.src=data.src;
|
||||
pfImg.onload=function(){pfImg.style.opacity='1';pfBg.style.opacity='1';};
|
||||
},400);
|
||||
return;
|
||||
}
|
||||
var card=document.getElementById('card-photo');
|
||||
if(!card) return;
|
||||
if(!data||!data.src){card.style.display='none';return;}
|
||||
card.style.display='';
|
||||
var img=document.getElementById('photoImg');
|
||||
var counter=document.getElementById('photoCounter');
|
||||
var bar=document.getElementById('photoProgress');
|
||||
img.style.opacity='0';
|
||||
setTimeout(function(){
|
||||
img.src=data.src;
|
||||
img.onload=function(){img.style.opacity='1';};
|
||||
},300);
|
||||
if(data.counter) counter.textContent=data.counter;
|
||||
bar.style.transition='none';
|
||||
bar.style.width='0%';
|
||||
requestAnimationFrame(function(){
|
||||
requestAnimationFrame(function(){
|
||||
bar.style.transition='width '+(data.interval||15)+'s linear';
|
||||
bar.style.width='100%';
|
||||
});
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user