update themes
Vercel Deploy / deploy (push) Successful in 1m0s

This commit is contained in:
2026-03-25 20:16:44 +08:00
Unverified
parent b98c6da3a6
commit cd157c4e27
2 changed files with 196 additions and 6 deletions
+182
View File
@@ -0,0 +1,182 @@
/* ===========================================
1. 通用响应式底座 (所有样式均需依赖)
=========================================== */
:root {
--text-color: #333;
--paper-bg: #fff;
--wish-color: #333;
--border-color: #ddd;
--font-family-base: "Noto Serif SC", serif;
--font-family-sig: "Noto Serif SC", serif; /* 默认署名字体 */
}
body {
margin: 0;
padding: 20px;
background-color: #f6f6f6; /* 默认外背景 */
font-family: var(--font-family-base);
color: var(--text-color);
display: flex;
justify-content: center;
transition: background 0.3s;
}
/* 自适应容器 */
.letter-container {
width: 100%;
max-width: 800px;
min-height: 85vh;
padding: 5% 7%;
box-sizing: border-box;
position: relative;
box-shadow: 0 4px 15px rgba(0,0,0,0.05);
background-color: var(--paper-bg);
border: 1px solid var(--border-color);
transition: all 0.3s ease;
}
/* 手机端适配 */
@media (max-width: 600px) {
body { padding: 10px; }
.letter-container { padding: 35px 20px; }
}
/* 传统书信格式公共逻辑 */
.salutation {
font-size: 1.2rem;
margin-top: 0;
margin-bottom: 1.5rem;
font-weight: bold;
}
.content p {
text-indent: 2em; /* 首行缩进 */
line-height: 1.8;
text-align: justify;
margin-bottom: 1rem;
}
.closing { margin-top: 2.5rem; }
.wish-prefix { text-indent: 2em; margin: 0; color: var(--wish-color); }
.wish-suffix { font-weight: bold; margin-top: 5px; color: var(--wish-color); }
.footer {
text-align: right;
margin-top: 4rem;
line-height: 1.6;
}
.signature {
font-size: 1.1em;
font-family: var(--font-family-sig);
}
/* ===========================================
2. 原始场景皮肤 (Modern, Traditional, Vintage)
=========================================== */
/* ... (保留你之前的定义,此处略以节省空间,直接写新的) ... */
.theme-modern { --paper-bg: #fff; border-top: 4px solid #333; }
.theme-traditional { --paper-bg: #fdfaf2; writing-mode: vertical-rl; height: 650px; }
@media (max-width: 600px) { .theme-traditional { writing-mode: horizontal-tb; height: auto; } }
.theme-vintage { --paper-bg: #fff; border: 2px solid #b71c1c; background-image: repeating-linear-gradient(transparent, transparent 31px, rgba(183, 28, 28, 0.1) 31px, rgba(183, 28, 28, 0.1) 32px); line-height: 32px; --text-color: #b71c1c; --wish-color: #b71c1c; }
/* ===========================================
3. [新增] 青春与多样场景皮肤
=========================================== */
/* --- A. 青春派对 (Youthful) --- */
/* 特点:明亮多彩、活力、柔和 */
.theme-youth {
--paper-bg: #fff;
--text-color: #4a4a4a;
--wish-color: #ff6b6b; /* 鲜艳的颜色 */
--border-color: #ffe0e0;
font-family: "PingFang SC", "Microsoft YaHei", sans-serif; /* 使用现代无衬线字体 */
border-radius: 15px; /* 圆角增加亲和力 */
border: 3px solid #ffe0e0;
}
/* 装饰:顶部和底部加点彩色条纹 */
.theme-youth::before {
content: "";
position: absolute;
top: 0; left: 0; right: 0; height: 8px;
background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb, #ff9f43);
border-radius: 15px 15px 0 0;
}
.theme-youth .salutation { color: #222; }
.theme-youth .content p { text-indent: 0; text-align: left; background-color: #fcfcfc; padding: 10px; border-radius: 8px; margin-bottom: 1.2rem; } /* 类似气泡感 */
.theme-youth .wish-prefix { text-indent: 0; padding-left: 1rem; } /* 青春风不一定强制缩进 */
.theme-youth .wish-suffix { font-weight: 800; font-size: 1.1rem; }
.theme-youth .footer { color: #888; }
.theme-youth .signature { color: #333; font-weight: bold; }
/* --- B. 青葱校园 (Campus) --- */
/* 特点:数学格子纸、怀旧、清爽蓝调 */
.theme-campus {
--paper-bg: #fdfdfd;
--text-color: #3e3e3e;
--wish-color: #2980b9; /* 校园蓝 */
--border-color: #87ceeb;
font-family: "SimSun", serif; /* 怀旧宋体 */
/* 模拟蓝格子纸 */
background-image:
linear-gradient(rgba(135, 206, 235, 0.3) 1px, transparent 1px),
linear-gradient(90deg, rgba(135, 206, 235, 0.3) 1px, transparent 1px);
background-size: 25px 25px; /* 格子大小 */
}
/* 顶部加一个类似书签或校徽的圆 */
.theme-campus::after {
content: "CAMPUS";
position: absolute;
top: -15px; right: 30px;
background-color: #2980b9;
color: white;
padding: 5px 15px;
border-radius: 20px;
font-size: 0.8rem;
font-family: sans-serif;
}
.theme-campus .content p { line-height: 1.6; text-indent: 2em; }
.theme-campus .closing { border-top: 1px dashed rgba(135, 206, 235, 0.5); padding-top: 1rem; }
.theme-campus .footer .date { color: #888; }
/* --- C. 极简和风 (Wabi-Sabi / Minimalist) --- */
/* 特点:淡雅、素净、极低对比度、高端商务或长辈 */
.theme-wabi {
--paper-bg: #fafafa;
--text-color: #555;
--wish-color: #777;
--border-color: transparent; /* 无边框 */
font-family: "Source Han Serif SC", serif; /* 高质量宋体 */
background-color: #fff;
padding: 8% 10%; /* 更宽松的内边距 */
border-radius: 0;
box-shadow: none; /* 去掉阴影,极度扁平 */
}
/* 手机端去掉过于宽松的内边距 */
@media (max-width: 600px) {
.theme-wabi { padding: 40px 20px; }
}
/* 装饰:只在底部加一条极淡的灰线 */
.theme-wabi .footer {
text-align: right;
border-top: 1px solid #f0f0f0;
padding-top: 1.5rem;
}
.theme-wabi .salutation { font-weight: normal; font-size: 1.2rem; color: #333; }
.theme-wabi .content p { text-indent: 2em; line-height: 2; color: #666; font-size: 0.95rem; }
.theme-wabi .wish-suffix { font-weight: normal; color: #777; }
.theme-wabi .signature { font-family: "Zhi Mang Xing", cursive; font-size: 1.8rem; color: #333; } /* 使用Google Font书法字体 */
+14 -6
View File
@@ -2,15 +2,21 @@
<html lang="zh-CN"> <html lang="zh-CN">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<link rel="stylesheet" href="./css/vintage.css"> <title>书信预览</title> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>多彩场景信函</title>
<link href="https://fonts.googleapis.com/css2?family=Zhi+Mang+Xing&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./css/style.css">
</head> </head>
<body> <body>
<div class="letter-container">
<h2 class="salutation">尊敬的[姓名/称谓]</h2> <div class="letter-container theme-campus">
<h2 class="salutation">亲爱的[朋友/同学姓名]</h2>
<div class="content"> <div class="content">
<p>展信佳。自上次一别,已有数月之久。每念及过往共同探讨之时光,心中倍感亲切。今日致信,旨在询问近况,并就此前所述之合作事宜,希望能有进一步之探讨。</p> <p>好久不见!最近过得怎么样?</p>
<p>岁序更新,愿君事事顺遂,阖家安康</p> <p>转眼间夏天就要到了,还记得那时候我们一起在操场上挥洒汗水、在教室里畅谈未来的日子吗?那段时光,真的就像昨天刚发生一样</p>
<p>这次致信,是想告诉你一个好消息。下周六我要举办一个久违的聚会,希望你一定要来!哪怕只是聊聊天,喝杯茶,也是极好的。时光易逝,友情常驻。愿你每天都充满活力,事事顺心!</p>
</div> </div>
<div class="closing"> <div class="closing">
@@ -19,9 +25,11 @@
</div> </div>
<div class="footer"> <div class="footer">
<p class="signature">[您的署名] 敬上</p> <p class="signature">[您的署名]</p>
<p class="date">2026年3月25日</p> <p class="date">2026年3月25日</p>
</div> </div>
</div> </div>
</body> </body>
</html> </html>