feat: add template

This commit is contained in:
li
2025-11-28 17:41:44 +08:00
parent 1c85d6b85f
commit b58f529ce0
2 changed files with 167 additions and 0 deletions

View File

@@ -119,6 +119,10 @@
bottom: 20px;
right: 20px;
text-align: right;
text-shadow: -1px -1px 0 #ddd,
1px -1px 0 #ddd,
-1px 1px 0 #ddd,
1px 1px 0 #ddd;
}
</style>
</head>

View File

@@ -0,0 +1,163 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="template:media-width" content="1024">
<meta name="template:media-height" content="1024">
<meta name="viewport" content="width=1080, height=1920">
<title>疗愈 动态 - 1080x1920</title>
<!-- Google Fonts - 中文字体 -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600&family=Ma+Shan+Zheng&family=ZCOOL+KuaiLe&display=swap"
rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html,
body {
width: 1080px;
height: 1920px;
overflow: hidden;
}
body {
font-family: 'Noto Serif SC', serif;
color: #2a2a2a;
position: relative;
background: transparent;
display: flex;
flex-direction: column;
}
/* 背景遮罩层 */
/* body::before {
content: '';
position: absolute;
inset: 0;
background: rgba(232, 229, 224, 0.85);
backdrop-filter: blur(5px);
-webkit-backdrop-filter: blur(5x);
z-index: 0;
} */
/* Video overlay - 相对于main-container居中 */
.video-overlay {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 100%;
height: 100%;
/* background: #f00; */
z-index: -1;
}
/* 顶部标题 */
.title {
position: absolute;
width: 500px;
top: 40%;
transform: translateY(-50%);
right: 60px;
z-index: 1;
}
.title-content {
font-size: 80px;
font-weight: 600;
font-family: 'Ma Shan Zheng', 'ZCOOL KuaiLe', cursive;
color: #2a2a2a;
letter-spacing: 8px;
text-align: right;
padding-bottom: 15px;
border-bottom: 2px solid #2a2a2a;
text-shadow: -1px -1px 0 #ddd,
1px -1px 0 #ddd,
-1px 1px 0 #ddd,
1px 1px 0 #ddd;
}
/* 作者 */
.author {
z-index: 1;
text-align: right;
font-size: 32px;
font-family: 'Noto Serif SC', serif;
color: #2a2a2a;
font-weight: 400;
text-shadow: -1px -1px 0 #ddd,
1px -1px 0 #ddd,
-1px 1px 0 #ddd,
1px 1px 0 #ddd;
}
/* 正文区域 */
.text {
width: 100%;
position: absolute;
font-size: 46px;
font-weight: 400;
line-height: 2.0;
font-family: 'Liu Jian Mao Cao', 'ZCOOL KuaiLe', cursive;
color: #ffffff;
text-align: justify;
text-indent: 2em;
letter-spacing: 1px;
white-space: pre-line;
top: 70%;
text-align: center;
text-shadow: -1px -1px 0 #222,
1px -1px 0 #222,
-1px 1px 0 #222,
1px 1px 0 #222;
padding: 0 100px;
}
.signature {
position: absolute;
font-size: 24px;
color: #333;
bottom: 20px;
right: 20px;
text-align: right;
text-shadow: -1px -1px 0 #ddd,
1px -1px 0 #ddd,
-1px 1px 0 #ddd,
1px 1px 0 #ddd;
}
</style>
</head>
<body>
<div class="video-overlay">
</div>
<div class="title">
<div class="title-content">{{title}}</div>
</div>
<!-- 正文内容 -->
<div class="text">{{text}}</div>
<!-- 署名 -->
<div class="signature">{{signature=@Pixelle.AI}}</div>
<script>
const index = Number("{{index}}");
document.addEventListener('DOMContentLoaded', () => {
const titleElement = document.querySelector('.title');
titleElement.style.display = index > 1 ? 'none' : 'block';
});
</script>
</body>
</html>