Generate clean, minimalist Muji-style HTML presentations. The output is a single self-contained HTML file with embedded CSS and JS, ready to open in any browser.
#F5F4F0), dark ink (#1A1A1A), muted gray (#6B6B6B), faint rule lines (#D8D5CE)Support these slide layouts (use the most appropriate one for each slide):
→) between stepsGenerate a complete self-contained HTML file. Use this structure:
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>[User's Title]</title>
<style>
/* ── CSS Variables ── */
:root {
--bg: #F5F4F0;
--ink: #1A1A1A;
--ink-light: #6B6B6B;
--ink-faint: #B8B4AC;
--rule: #D8D5CE;
--white: #FAFAF8;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
background: #1C1C1C;
display: flex; flex-direction: column;
align-items: center; justify-content: center;
min-height: 100vh; padding: 20px 0;
}
.deck { width: 1035px; }
.slide {
width: 1035px; height: 582px;
background: var(--bg);
position: relative; overflow: hidden;
display: none; flex-direction: column;
padding: 60px 90px;
}
.slide.active { display: flex; }
.slide-num {
position: absolute; bottom: 32px; right: 46px;
font-size: 13px; letter-spacing: 0.15em;
color: var(--ink-faint); font-weight: 300;
}
/* Navigation */
.nav { display: flex; align-items: center; justify-content: center;
gap: 23px; margin-top: 21px; }
.nav button {
background: none; border: 1px solid #555;
color: #aaa; padding: 9px 32px; font-size: 15px;
letter-spacing: 0.1em; cursor: pointer; transition: all 0.2s;
font-family: inherit;
}
.nav button:hover { border-color: #aaa; color: #eee; }
.nav button:disabled { opacity: 0.25; cursor: default; }
.nav .counter {
font-size: 14px; color: #666;
letter-spacing: 0.12em; min-width: 69px; text-align: center;
}
/* Section tag */
.section-tag {
font-size: 12px; letter-spacing: 0.3em;
text-transform: uppercase; color: var(--ink-faint);
margin-bottom: 16px; display: flex; align-items: center; gap: 12px;
}
.section-tag::before {
content: ''; display: inline-block;
width: 28px; height: 1px; background: var(--ink-faint);
}
/* Typography */
h1, h2, h3 { font-weight: 300; color: var(--ink); line-height: 1.2; }
strong { font-weight: 700; }
/* Keyboard hint */
.key-hint {
font-size: 13px; color: #444;
text-align: center; margin-top: 12px; letter-spacing: 0.1em;
}
</style>
</head>
<body>
<div class="deck" id="deck">
<!-- Slides go here -->
</div>
<div class="nav">
<button id="prev" disabled>← 上一页</button>
<div class="counter" id="counter">1 / N</div>
<button id="next">下一页 →</button>
</div>
<div class="key-hint">← → 方向键翻页</div>
<script>
const slides = document.querySelectorAll('.slide');
let cur = 0;
function goto(n) {
slides[cur].classList.remove('active');
cur = n;
slides[cur].classList.add('active');
document.getElementById('counter').textContent = (cur+1) + ' / ' + slides.length;
document.getElementById('prev').disabled = cur === 0;
document.getElementById('next').disabled = cur === slides.length - 1;
}
document.getElementById('prev').onclick = () => { if(cur>0) goto(cur-1); };
document.getElementById('next').onclick = () => { if(cur<slides.length-1) goto(cur+1); };
document.addEventListener('keydown', e => {
if(e.key==='ArrowRight'||e.key==='ArrowDown') { if(cur<slides.length-1) goto(cur+1); }
if(e.key==='ArrowLeft'||e.key==='ArrowUp') { if(cur>0) goto(cur-1); }
});
</script>
</body>
</html>
inside .deck
共 1 个版本