Files
charlie f3bdaa4e88 feat: add TypeScript lessons and learning panel
- Introduced a new script to check TypeScript lesson files for errors.
- Created a main TypeScript file to render lessons and their details.
- Added lesson definitions with starter and answer codes.
- Implemented a user interface for navigating and running lessons.
- Styled the application with CSS for a better user experience.
- Updated README to reflect the new TypeScript section and usage instructions.
2026-03-19 10:06:11 +08:00

87 lines
2.0 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>input 实时预览</title>
<style>
body {
margin: 0;
padding: 32px;
font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
background: #f6f8fb;
}
.page {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 18px;
max-width: 960px;
margin: 0 auto;
}
.panel {
padding: 24px;
border-radius: 18px;
background: #ffffff;
border: 1px solid #dce4ef;
}
label {
display: grid;
gap: 8px;
margin-top: 12px;
}
input,
textarea,
select {
padding: 10px 12px;
font: inherit;
}
.badge {
display: inline-block;
padding: 6px 12px;
border-radius: 999px;
background: #dbeafe;
color: #1d4ed8;
}
</style>
</head>
<body>
<main class="page">
<section class="panel">
<h1>编辑资料</h1>
<label for="nickname-input">
昵称
<input id="nickname-input" type="text" placeholder="输入你的昵称" />
</label>
<label for="goal-input">
学习目标
<textarea id="goal-input" rows="4" placeholder="输入今天的学习目标"></textarea>
</label>
<label for="stage-select">
学习阶段
<select id="stage-select">
<option value="入门阶段">入门阶段</option>
<option value="DOM 阶段">DOM 阶段</option>
<option value="异步阶段">异步阶段</option>
</select>
</label>
</section>
<section class="panel">
<p class="badge" id="preview-stage">入门阶段</p>
<h2 id="preview-name">未填写昵称</h2>
<p id="preview-goal">这里会显示你的学习目标。</p>
</section>
</main>
<script src="./starter.js"></script>
</body>
</html>