你的项目根目录/
├─ index.html ← 首页文件(新建/覆盖)
└─ assets/
├─ style.css ← 样式文件(新建)
└─ image/
├─ site-logo.png ← 站点 Logo(你已有)
├─ hero.jpg ← 横幅背景(自备/可先用任意占位图)
└─ teacher.jpg ← 内容区左侧图片(自备/可先用占位图)
如果暂时没有 hero.jpg、teacher.jpg,可以先把任意图片拷贝到 assets/image/ 并用同名文件名替换;或把下面 CSS/HTML 中对应图片路径换成你现有的文件。
index.html(最小可执行整合版)<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>前端成长工坊 – 记录 · 呈现 · 看见</title>
<link rel="stylesheet" href="assets/style.css" />
</head>
<body>
<!-- ===== 标题区(Header + Nav) ===== -->
<header class="site-header">
<div class="container header-inner">
<a class="brand" href="index.html" aria-label="前端成长工坊 首页">
<img src="assets/image/site-logo.png" alt="前端成长工坊 Logo" class="brand__logo" />
<span class="brand__name">前端成长工坊</span>
</a>
<nav class="site-nav" aria-label="主导航">
<ul>
<li><a href="index.html" aria-current="page">首页</a></li>
<!-- 分类:教学日志 / 学生作品;外链:学习资源;联系:表单页 -->
<li><a href="#posts">教学日志</a></li>
<li><a href="#works">学生作品</a></li>
<li><a href="<https://example.com/resources>" target="_blank" rel="noopener">学习资源</a></li>
<li><a href="#contact">联系</a></li>
</ul>
</nav>
</div>
</header>
<!-- ===== 横幅区(Hero) ===== -->
<section class="hero" role="region" aria-label="横幅">
<div class="hero__bg" aria-hidden="true"></div>
<div class="container hero__inner">
<!-- 可留空:此处仅负责留出横幅视觉空间 -->
</div>
</section>
<!-- ===== 标语区(Tagline) ===== -->
<section class="tagline" role="region" aria-label="标语">
<div class="container">
<h2 class="tagline__text">点亮课堂瞬间,我们一起见证学生成长每一步</h2>
</div>
</section>
<!-- ===== 内容区(Content) ===== -->
<main class="site-main container" id="content" role="main">
<section class="intro" aria-label="关于我与搜索">
<div class="intro__grid">
<!-- 左:图片 -->
<figure class="intro__media">
<img src="assets/image/teacher.jpg" alt="在课堂上讲授 Web 前端的老师与学生" />
</figure>
<!-- 右:文字 + 搜索 -->
<div class="intro__body">
<p>作为一名教师,我始终相信——真正的课堂,不止是知识传授,更是陪伴学生成为更好的自己。</p>
<p>在这个博客中,我将记录教学中的点滴观察、课堂的精彩瞬间,也展示学生在学习过程中真实的成长与成果。</p>
<p>我们正站在技术与教育的交汇点上,愿在这里,看见每一位学生,走出自己的独特路径。</p>
<form class="search" role="search" aria-label="站内搜索" onsubmit="return false;">
<label class="visually-hidden" for="q">搜索关键词</label>
<input id="q" name="q" type="search" placeholder="搜索…" />
<button type="submit">搜索</button>
</form>
</div>
</div>
</section>
<!-- 示例锚点:与导航“教学日志 / 学生作品 / 联系”对应 -->
<section id="posts" aria-label="教学日志" class="anchor-space"></section>
<section id="works" aria-label="学生作品" class="anchor-space"></section>
<section id="contact" aria-label="联系" class="anchor-space"></section>
</main>
<!-- ===== 页脚区(Footer) ===== -->
<footer class="site-footer" role="contentinfo">
<div class="container footer__inner">
<a class="footer__brand" href="index.html">
<img src="assets/image/site-logo.png" alt="" aria-hidden="true" />
<span class="footer__title">前端成长工坊</span>
</a>
<p class="footer__meta">E-mail: [email protected]</p>
<p class="footer__copy">© <span id="year"></span> 前端成长工坊 · 记录 · 呈现 · 看见</p>
</div>
</footer>
<script>
// 小增强:自动年份
document.getElementById('year').textContent = new Date().getFullYear();
</script>
</body>
</html>
assets/style.css(最小样式)/* ===== 基础与布局 ===== */
:root{
--c-text:#111;
--c-muted:#666;
--c-brand:#1f2937;
--c-accent:#d1562f;
--c-bg:#fff;
--c-hero-top:#bfc2c5; /* 横幅上渐变(灰) */
--c-hero-bottom:#f6f6f6; /* 横幅下渐变(白) */
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
font:16px/1.6 system-ui,-apple-system,Segoe UI,Roboto,Arial,Helvetica,sans-serif;
color:var(--c-text);
background:var(--c-bg);
}
.container{
width:min(1080px,92%);
margin-inline:auto;
}
/* ===== 标题区 ===== */
.site-header{
position:sticky; top:0; z-index:10;
background:#fff;
border-bottom:1px solid #eee;
}
.header-inner{
display:flex; align-items:center; justify-content:space-between;
gap:16px; padding:14px 0;
}
.brand{display:flex; align-items:center; gap:12px; text-decoration:none; color:inherit}
.brand__logo{width:40px;height:40px;object-fit:contain}
.brand__name{font-weight:700; font-size:20px}
.site-nav ul{display:flex; gap:28px; list-style:none; margin:0; padding:0}
.site-nav a{
text-decoration:none; color:#111; font-weight:700; letter-spacing:.02em;
}
.site-nav a[aria-current="page"]{color:var(--c-accent)}
/* ===== 横幅区 ===== */
.hero{position:relative; isolation:isolate}
.hero__bg{
min-height:200px; /* 只负责留空间 */
background:
linear-gradient(180deg,var(--c-hero-top),var(--c-hero-bottom)),
url("image/hero.jpg") center/cover no-repeat;
filter:saturate(.9) contrast(.98);
}
/* ===== 标语区 ===== */
.tagline{padding:24px 0}
.tagline__text{
margin:0; text-align:center; font-size:clamp(20px,3.6vw,40px);
color:var(--c-accent); letter-spacing:.03em; font-weight:800;
}
/* ===== 内容区 ===== */
.site-main{padding:28px 0 40px}
.intro__grid{
display:grid; grid-template-columns: 1.2fr 1fr; gap:28px;
}
.intro__media img{width:100%; height:auto; display:block; border-radius:6px}
.intro__body p{margin:0 0 14px}
.search{display:flex; gap:10px; margin-top:12px}
.search input{
flex:1; padding:10px 12px; border:1px solid #ddd; border-radius:6px; font-size:16px;
}
.search button{
padding:10px 18px; border:0; border-radius:6px; font-weight:700; cursor:pointer;
background:var(--c-accent); color:#fff;
}
.anchor-space{height:1px;}
/* ===== 页脚区 ===== */
.site-footer{
border-top:1px solid #eee; background:#fafafa; margin-top:24px;
}
.footer__inner{
display:flex; align-items:center; gap:18px; padding:16px 0; flex-wrap:wrap;
}
.footer__brand{display:flex; align-items:center; gap:10px; text-decoration:none; color:inherit}
.footer__brand img{width:28px;height:28px;object-fit:contain}
.footer__title{font-weight:700}
.footer__meta{margin:0 0 0 auto; color:var(--c-muted)}
.footer__copy{flex-basis:100%; margin:4px 0 0; color:var(--c-muted); font-size:14px}
/* ===== 可访问性小工具 ===== */
.visually-hidden{
position:absolute !important; width:1px; height:1px; padding:0; margin:-1px;
overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}
/* ===== 响应式 ===== */
@media (max-width: 900px){
.intro__grid{grid-template-columns: 1fr}
.footer__meta{margin:0}
}
assets/image/site-logo.png(你已放好)。assets/image/hero.jpg(自备或用占位图)。assets/image/teacher.jpg(自备或占位图)。
如文件名不同,请把 HTML/CSS 里的路径改为你的实际文件名。#posts / #works / #contact)。后续你也可以:
posts.html、works.html…),或style.css 里继续为各区块加细节(阴影、动画、卡片栅格等),不会破坏结构。如果你把上述两个文件照路径放好,直接打开 index.html 就能看到一个版式接近原博客的首页雏形。需要我把“教学日志卡片”“学生作品卡片”也做成占位数据一起接到内容区吗?我可以在这套结构上继续帮你补齐。