2025-03-06 20:11:54 +08:00
|
|
|
|
<!DOCTYPE html>
|
2025-03-07 00:00:11 +08:00
|
|
|
|
<html lang="zh-CN">
|
2025-03-06 20:11:54 +08:00
|
|
|
|
<head>
|
|
|
|
|
|
<meta charset="UTF-8">
|
2025-03-07 00:00:11 +08:00
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
2025-03-07 12:11:16 +08:00
|
|
|
|
<title>Ai-Teacher - AI教学助手</title>
|
2025-03-07 00:00:11 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- 引入Bootstrap CSS -->
|
|
|
|
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 引入PDF.js -->
|
|
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.4.120/pdf.min.js"></script>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 引入Live2D相关库 -->
|
2025-03-07 12:11:16 +08:00
|
|
|
|
<script src="src/live2d.min.js"></script>
|
|
|
|
|
|
<script src="src/live2dcubismcore.min.js"></script>
|
|
|
|
|
|
|
2025-03-09 16:15:13 +08:00
|
|
|
|
<link rel="stylesheet" href="./css/style.css">
|
2025-03-06 20:11:54 +08:00
|
|
|
|
</head>
|
|
|
|
|
|
<body>
|
2025-03-07 00:00:11 +08:00
|
|
|
|
<div class="container">
|
|
|
|
|
|
<div class="header">
|
2025-03-07 12:11:16 +08:00
|
|
|
|
<!-- <h1>Ai-Teacher</h1> -->
|
2025-03-07 00:00:11 +08:00
|
|
|
|
<p>AI教学助手 - 交互式PDF学习体验</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="main-content">
|
|
|
|
|
|
<div class="pdf-container">
|
|
|
|
|
|
<div class="controls">
|
|
|
|
|
|
<div class="page-controls">
|
|
|
|
|
|
<button id="prev-page" class="btn btn-sm btn-outline-primary">上一页</button>
|
|
|
|
|
|
<input type="number" id="page-num" class="form-control form-control-sm" style="width: 60px;" value="1" min="1">
|
|
|
|
|
|
<span> / </span>
|
|
|
|
|
|
<span id="page-count">0</span>
|
|
|
|
|
|
<button id="next-page" class="btn btn-sm btn-outline-primary">下一页</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="zoom-controls">
|
|
|
|
|
|
<button id="zoom-out" class="btn btn-sm btn-outline-secondary">-</button>
|
|
|
|
|
|
<button id="zoom-reset" class="btn btn-sm btn-outline-secondary">100%</button>
|
|
|
|
|
|
<button id="zoom-in" class="btn btn-sm btn-outline-secondary">+</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<label for="pdf-upload" class="btn btn-sm btn-outline-primary">选择PDF</label>
|
|
|
|
|
|
<input type="file" id="pdf-upload" accept="application/pdf" style="display: none;">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<canvas id="pdf-canvas"></canvas>
|
2025-03-09 16:15:13 +08:00
|
|
|
|
<div id="live2d-container" class="live2d-container"></div>
|
2025-03-07 00:00:11 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="sidebar">
|
|
|
|
|
|
|
|
|
|
|
|
<div class="explanation-container">
|
|
|
|
|
|
<div class="explanation-header">
|
|
|
|
|
|
<h5>AI讲解</h5>
|
2025-03-07 22:17:52 +08:00
|
|
|
|
<div class="d-flex gap-2">
|
|
|
|
|
|
<button id="explain-btn" class="btn btn-sm btn-primary">生成讲解</button>
|
|
|
|
|
|
<button id="play-btn" class="btn btn-sm btn-success" disabled>
|
|
|
|
|
|
<i class="bi bi-play-fill"></i> 播放
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="voice-selector">
|
2025-03-08 23:58:44 +08:00
|
|
|
|
<label for="voice-selector">选择语音:</label>
|
|
|
|
|
|
<select id="voice-selector" class="form-select form-select-sm">
|
|
|
|
|
|
<option value="zf_xiaoxiao">小小</option>
|
|
|
|
|
|
<option value="zf_xiaoyun">小妮</option>
|
|
|
|
|
|
<option value="zf_xiaogang">小贝</option>
|
|
|
|
|
|
<option value="zf_xiaole">Heart</option>
|
2025-03-07 22:17:52 +08:00
|
|
|
|
</select>
|
2025-03-08 23:58:44 +08:00
|
|
|
|
</div>
|
2025-03-09 16:15:13 +08:00
|
|
|
|
|
|
|
|
|
|
<div class="voice-selector">
|
|
|
|
|
|
<label for="model-select">选择模型:</label>
|
|
|
|
|
|
<select id="model-select" class="form-select form-select-sm">
|
|
|
|
|
|
<option value="Mao">Mao</option>
|
|
|
|
|
|
<option value="Haru">Haru</option>
|
|
|
|
|
|
<option value="Hiyori">Hiyori</option>
|
|
|
|
|
|
<option value="Mark">Mark</option>
|
|
|
|
|
|
<option value="Natori">Natori</option>
|
|
|
|
|
|
<option value="Rice">Rice</option>
|
|
|
|
|
|
<option value="Wanko">Wanko</option>
|
2025-03-09 18:25:31 +08:00
|
|
|
|
<option value="狐狸2.00">Fox</option>
|
2025-03-09 16:15:13 +08:00
|
|
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2025-03-08 23:58:44 +08:00
|
|
|
|
<div class="voice-selector">
|
|
|
|
|
|
<div class="d-flex align-items-center">
|
|
|
|
|
|
<label for="speed-range" class="form-label mb-0 me-2">语速:</label>
|
|
|
|
|
|
<input type="range" class="form-range me-2" id="speed-range" min="0.5" max="2.0" step="0.1" value="1.5" style="width: 120px;">
|
|
|
|
|
|
<span id="speed-value" class="badge bg-primary">1.5x</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="voice-selector mb-3">
|
|
|
|
|
|
<div class="form-check">
|
|
|
|
|
|
<input class="form-check-input" type="checkbox" id="auto-nav-checkbox" checked>
|
|
|
|
|
|
<label class="form-check-label" for="auto-nav-checkbox">
|
|
|
|
|
|
自动翻页
|
|
|
|
|
|
</label>
|
|
|
|
|
|
</div>
|
2025-03-07 00:00:11 +08:00
|
|
|
|
</div>
|
2025-03-07 22:17:52 +08:00
|
|
|
|
|
2025-03-07 00:00:11 +08:00
|
|
|
|
<div id="explanation-text" class="p-3">
|
|
|
|
|
|
点击"生成讲解"按钮,AI将为您讲解当前页面的内容。
|
|
|
|
|
|
</div>
|
2025-03-07 22:17:52 +08:00
|
|
|
|
|
|
|
|
|
|
<audio id="audio-player" controls style="display: none;"></audio>
|
2025-03-07 00:00:11 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2025-03-09 16:15:13 +08:00
|
|
|
|
|
2025-03-07 00:00:11 +08:00
|
|
|
|
</div>
|
2025-03-06 20:11:54 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
2025-03-07 00:00:11 +08:00
|
|
|
|
<div id="status-message"></div>
|
|
|
|
|
|
|
2025-03-07 22:17:52 +08:00
|
|
|
|
<!-- 引入Bootstrap JS 和 Icons -->
|
2025-03-07 00:00:11 +08:00
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
2025-03-07 22:17:52 +08:00
|
|
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css">
|
2025-03-07 00:00:11 +08:00
|
|
|
|
<script type="module" src="js/main.js"></script>
|
2025-03-06 20:11:54 +08:00
|
|
|
|
</body>
|
|
|
|
|
|
</html>
|