Files
nl-blogs/client/src/templates/pixel/pixel.css
2026-08-24 13:06:04 +08:00

311 lines
6.2 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* ============================================================
PIXEL template — 8-bit 游戏机风格
黑底 + 霓虹绿 #39ff14 + 橙 #ff9f00像素字体8-bit 边框;扫描线
============================================================ */
.pixel-root {
/* art-* 变量覆盖:未重写组件(回退经典页)自动适配本模板配色 */
--art-bg: 10 10 10;
--art-surface: 18 18 18;
--art-text: 232 255 232;
--art-muted: 143 170 143;
--art-accent: 57 255 20;
--art-border: rgba(255,255,255,0.08);
--p-bg: #0a0a0a;
--p-surface: #121212;
--p-card: #161616;
--p-text: #e8ffe8;
--p-muted: #8faa8f;
--p-green: #39ff14;
--p-orange: #ff9f00;
--p-red: #e95420;
--p-blue: #4fc3f7;
--p-border: #2a2a2a;
font-family: 'JetBrains Mono', 'Noto Sans SC', monospace;
background: var(--p-bg);
color: var(--p-text);
min-height: 100vh;
position: relative;
}
/* 扫描线背景 */
.pixel-root::before {
content: '';
position: fixed;
inset: 0;
pointer-events: none;
z-index: 5;
background: repeating-linear-gradient(
to bottom,
transparent 0 2px,
rgba(0, 0, 0, 0.18) 2px 4px
);
opacity: 0.5;
}
/* 像素字体标题 */
.pixel-title {
font-family: 'JetBrains Mono', 'Noto Sans SC', monospace;
color: var(--p-green);
text-shadow: 2px 2px 0 rgba(57, 255, 20, 0.3);
}
/* 8-bit 边框(阶梯阴影) */
.pixel-box {
background: var(--p-card);
border: 2px solid var(--p-green);
box-shadow: 4px 4px 0 rgba(57, 255, 20, 0.25);
image-rendering: pixelated;
}
.pixel-box-orange {
border-color: var(--p-orange);
box-shadow: 4px 4px 0 rgba(255, 159, 0, 0.25);
}
/* 像素按钮 */
.pixel-btn {
display: inline-block;
font-family: 'JetBrains Mono', 'Noto Sans SC', monospace;
font-size: 11px;
color: #0a0a0a;
background: var(--p-green);
border: 2px solid #0a0a0a;
box-shadow: 0 4px 0 #0a0a0a, 4px 4px 0 rgba(57, 255, 20, 0.35);
padding: 10px 16px;
cursor: pointer;
text-decoration: none;
text-transform: uppercase;
transition: transform 0.06s, box-shadow 0.06s;
letter-spacing: 0.04em;
}
.pixel-btn:hover {
transform: translate(1px, 1px);
box-shadow: 0 3px 0 #0a0a0a, 3px 3px 0 rgba(57, 255, 20, 0.35);
}
.pixel-btn:active {
transform: translate(2px, 2px);
box-shadow: 0 1px 0 #0a0a0a;
}
.pixel-btn-secondary {
background: var(--p-orange);
box-shadow: 0 4px 0 #0a0a0a, 4px 4px 0 rgba(255, 159, 0, 0.3);
}
/* 导航 */
.pixel-nav {
display: flex;
align-items: center;
justify-content: space-between;
padding: 14px 20px;
border-bottom: 3px solid var(--p-green);
background: var(--p-surface);
position: sticky;
top: 0;
z-index: 40;
}
.pixel-nav-logo {
font-family: 'JetBrains Mono', 'Noto Sans SC', monospace;
font-size: 14px;
color: var(--p-green);
text-decoration: none;
text-shadow: 2px 2px 0 rgba(57, 255, 20, 0.4);
}
.pixel-nav-links {
display: flex;
gap: 4px;
flex-wrap: wrap;
}
.pixel-nav-link {
font-family: 'JetBrains Mono', 'Noto Sans SC', monospace;
font-size: 9px;
color: var(--p-text);
text-decoration: none;
padding: 8px 10px;
border: 2px solid transparent;
transition: all 0.15s;
}
.pixel-nav-link:hover,
.pixel-nav-link.active {
color: #0a0a0a;
background: var(--p-green);
border-color: var(--p-green);
}
/* 页脚 */
.pixel-footer {
border-top: 3px solid var(--p-green);
background: var(--p-surface);
padding: 20px;
text-align: center;
font-size: 9px;
color: var(--p-muted);
font-family: 'JetBrains Mono', 'Noto Sans SC', monospace;
line-height: 1.9;
}
/* 内容容器 */
.pixel-main {
max-width: 1100px;
margin: 0 auto;
padding: 24px 16px 60px;
position: relative;
z-index: 10;
}
/* 列表行STAGE 关卡式) */
.pixel-stage-row {
display: flex;
align-items: center;
gap: 14px;
background: var(--p-card);
border: 2px solid var(--p-border);
box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.6);
padding: 14px 16px;
margin-bottom: 12px;
cursor: pointer;
text-decoration: none;
transition: all 0.12s;
}
.pixel-stage-row:hover {
border-color: var(--p-green);
box-shadow: 4px 4px 0 rgba(57, 255, 20, 0.3);
transform: translate(-1px, -1px);
}
.pixel-stage-no {
font-family: 'JetBrains Mono', 'Noto Sans SC', monospace;
font-size: 11px;
color: var(--p-orange);
min-width: 58px;
}
.pixel-stage-title {
font-size: 12px;
color: var(--p-text);
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
letter-spacing: 0.03em;
}
.pixel-stage-meta {
font-size: 8px;
color: var(--p-muted);
flex-shrink: 0;
}
/* 状态文本 */
.pixel-info {
color: var(--p-muted);
font-size: 9px;
font-family: 'JetBrains Mono', 'Noto Sans SC', monospace;
line-height: 2;
}
.pixel-error {
color: var(--p-red);
}
/* 表单输入(像素化) */
.pixel-input {
font-family: inherit;
font-size: 11px;
background: var(--p-surface);
border: 2px solid var(--p-green);
color: var(--p-text);
padding: 10px 12px;
outline: none;
}
.pixel-input:focus {
box-shadow: 0 0 0 2px rgba(57, 255, 20, 0.3);
}
/* 详情页 markdown 适配 */
.pixel-md h1,
.pixel-md h2,
.pixel-md h3 {
font-family: 'JetBrains Mono', 'Noto Sans SC', monospace;
color: var(--p-green);
margin: 1.4em 0 0.6em;
line-height: 1.6;
}
.pixel-md h1 {
font-size: 18px;
border-bottom: 3px solid var(--p-green);
padding-bottom: 0.4em;
}
.pixel-md h2 {
font-size: 14px;
}
.pixel-md h3 {
font-size: 11px;
}
.pixel-md p {
color: var(--p-text);
line-height: 2;
font-size: 12px;
}
.pixel-md a {
color: var(--p-orange);
text-decoration: underline;
}
.pixel-md pre {
background: var(--p-surface);
border: 2px solid var(--p-green);
padding: 14px;
overflow-x: auto;
font-size: 11px;
line-height: 1.8;
}
.pixel-md code {
font-family: 'JetBrains Mono', monospace;
color: var(--p-green);
}
.pixel-md img {
max-width: 100%;
image-rendering: pixelated;
border: 2px solid var(--p-border);
}
.pixel-md blockquote {
border-left: 4px solid var(--p-orange);
padding-left: 14px;
color: var(--p-muted);
margin: 1em 0;
}
.pixel-md table th,
.pixel-md table td {
border: 1px solid var(--p-border);
padding: 8px;
font-size: 11px;
}
.pixel-md table th {
color: var(--p-green);
}
/* 博客详情页不限制最大宽度 */
.pixel-main.full { max-width: none; }