feat: 添加深色极简风格 Hello 页面
This commit is contained in:
+156
@@ -0,0 +1,156 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Hello</title>
|
||||||
|
<style>
|
||||||
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||||
|
|
||||||
|
body {
|
||||||
|
min-height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background: #0a0a0a;
|
||||||
|
color: #ededed;
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
|
||||||
|
"Microsoft YaHei", sans-serif;
|
||||||
|
padding: 32px;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 520px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label {
|
||||||
|
font-size: 0.7rem;
|
||||||
|
letter-spacing: 0.28em;
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: #4a4a4a;
|
||||||
|
margin-bottom: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: clamp(2.5rem, 9vw, 4rem);
|
||||||
|
font-weight: 200;
|
||||||
|
letter-spacing: -0.03em;
|
||||||
|
line-height: 1.05;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 span {
|
||||||
|
display: inline-block;
|
||||||
|
width: 6px;
|
||||||
|
height: 6px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: #ededed;
|
||||||
|
vertical-align: middle;
|
||||||
|
margin-left: 10px;
|
||||||
|
transform: translateY(-6px);
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
font-size: 0.95rem;
|
||||||
|
line-height: 1.7;
|
||||||
|
font-weight: 300;
|
||||||
|
color: #6f6f6f;
|
||||||
|
margin-bottom: 44px;
|
||||||
|
max-width: 34ch;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
letter-spacing: 0.16em;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #ededed;
|
||||||
|
background: transparent;
|
||||||
|
border: 1px solid #2a2a2a;
|
||||||
|
border-radius: 999px;
|
||||||
|
padding: 13px 30px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover {
|
||||||
|
border-color: #ededed;
|
||||||
|
background: #ededed;
|
||||||
|
color: #0a0a0a;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:active {
|
||||||
|
opacity: 0.75;
|
||||||
|
}
|
||||||
|
|
||||||
|
#output {
|
||||||
|
margin-top: 36px;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
font-weight: 300;
|
||||||
|
letter-spacing: 0.02em;
|
||||||
|
color: #9a9a9a;
|
||||||
|
min-height: 1.6em;
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(4px);
|
||||||
|
transition: opacity 0.4s ease, transform 0.4s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
#output.show {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(-9px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.glow {
|
||||||
|
position: fixed;
|
||||||
|
top: -30vh;
|
||||||
|
right: -20vw;
|
||||||
|
width: 70vw;
|
||||||
|
height: 70vh;
|
||||||
|
background: radial-gradient(circle, rgba(120, 130, 255, 0.14) 0%, transparent 62%);
|
||||||
|
pointer-events: none;
|
||||||
|
filter: blur(20px);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="glow"></div>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<div class="label">Gitea · Demo</div>
|
||||||
|
<h1>Hello<span></span></h1>
|
||||||
|
<p>一个深色极简风格的静态页面,保持克制、留白与清晰的层级。</p>
|
||||||
|
<button id="greetBtn">Say hello</button>
|
||||||
|
<div id="output"></div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const greetings = [
|
||||||
|
"你好,世界。",
|
||||||
|
"Hello, World.",
|
||||||
|
"Bonjour le monde.",
|
||||||
|
"Hola Mundo.",
|
||||||
|
"こんにちは、世界。",
|
||||||
|
"안녕하세요, 세계.",
|
||||||
|
"Hallo Welt."
|
||||||
|
];
|
||||||
|
|
||||||
|
let index = 0;
|
||||||
|
const button = document.getElementById("greetBtn");
|
||||||
|
const output = document.getElementById("output");
|
||||||
|
|
||||||
|
button.addEventListener("click", () => {
|
||||||
|
output.classList.remove("show");
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
output.textContent = greetings[index % greetings.length];
|
||||||
|
output.classList.add("show");
|
||||||
|
index++;
|
||||||
|
}, 150);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user