commit 41297ec234a7437bb0f1d2ff84ba9a0bd495cb2a
Author: ffff:198.176.81.33 <ffff:198.176.81.33@hub.scroll.pub>
Date: 2024-12-29 09:52:38 +0000
Subject: updated index.scroll
diff --git a/index.scroll b/index.scroll
index 0c27676..4ae1075 100644
--- a/index.scroll
+++ b/index.scroll
@@ -1,4 +1,102 @@
-buildHtml
-theme roboto
+<!DOCTYPE html>
+<html lang="zh">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>逐行单词听写程序</title>
+ <style>
+ body {
+ font-family: Arial, sans-serif;
+ text-align: center;
+ margin: 50px;
+ background-color: #f0f8ff;
+ }
+ #inputSection, #dictationSection, #resultSection {
+ margin: 20px;
+ display: none;
+ }
+ #submitButton, #dictateButton {
+ padding: 15px 30px;
+ font-size: 20px;
+ cursor: pointer;
+ border: none;
+ border-radius: 50%;
+ background-color: #4CAF50;
+ color: white;
+ }
+ #dictateButton {
+ background-color: #2196F3;
+ }
+ #dictateButton:hover, #submitButton:hover {
+ opacity: 0.8;
+ }
+ #wordList {
+ margin-top: 20px;
+ font-size: 18px;
+ }
+ </style>
+</head>
+<body>
-Hello World my name is Peter LU NUS
\ No newline at end of file
+<h1>逐行单词听写程序 🎤</h1>
+
+<div id="inputSection">
+ <h2>提交听写内容</h2>
+ <textarea id="wordInput" rows="10" cols="30" placeholder="每行一个单词"></textarea><br>
+ <button id="submitButton">提交</button>
+</div>
+
+<div id="dictationSection">
+ <h2>逐行听写</h2>
+ <button id="dictateButton">🔊 听写下一个单词</button>
+ <div id="wordList"></div>
+</div>
+
+<div id="resultSection">
+ <h2>听写完成,请核对 ✅</h2>
+ <div id="results"></div>
+</div>
+
+<script>
+ const submitButton = document.getElementById('submitButton');
+ const dictateButton = document.getElementById('dictateButton');
+ const wordInput = document.getElementById('wordInput');
+ const wordListDiv = document.getElementById('wordList');
+ const resultSection = document.getElementById('resultSection');
+ const resultsDiv = document.getElementById('results');
+
+ let words = [];
+ let currentIndex = 0;
+
+ // 显示输入框
+ document.getElementById('inputSection').style.display = 'block';
+
+ submitButton.addEventListener('click', () => {
+ words = wordInput.value.split('\n').map(word => word.trim()).filter(word => word);
+ if (words.length > 0) {
+ wordInput.value = '';
+ document.getElementById('inputSection').style.display = 'none';
+ document.getElementById('dictationSection').style.display = 'block';
+ wordListDiv.innerHTML = `待听写单词数量: ${words.length}`;
+ } else {
+ alert('请至少输入一个单词!');
+ }
+ });
+
+ dictateButton.addEventListener('click', () => {
+ if (currentIndex < words.length) {
+ const word = words[currentIndex];
+ const utterance = new SpeechSynthesisUtterance(word);
+ speechSynthesis.speak(utterance);
+ currentIndex++;
+ wordListDiv.innerHTML = `待听写单词数量: ${words.length - currentIndex}`;
+ } else {
+ document.getElementById('dictationSection').style.display = 'none';
+ resultSection.style.display = 'block';
+ resultsDiv.innerHTML = words.map((word, index) => `<p>${index + 1}. ${word}</p>`).join('');
+ }
+ });
+</script>
+
+</body>
+</html>
\ No newline at end of file
commit da473e5c13ff28a844585ed9e60d9d417aa3d7f6
Author: ffff:198.176.81.33 <ffff:198.176.81.33@hub.scroll.pub>
Date: 2024-12-29 09:51:51 +0000
Subject: updated index.scroll
diff --git a/index.scroll b/index.scroll
index 4442ed6..0c27676 100644
--- a/index.scroll
+++ b/index.scroll
@@ -1,4 +1,4 @@
buildHtml
theme roboto
-Hello World my name is
\ No newline at end of file
+Hello World my name is Peter LU NUS
\ No newline at end of file
commit fda54dbff1d85c5169aabaa592b849be690002f2
Author: ffff:12.186.22.250 <ffff:12.186.22.250@hub.scroll.pub>
Date: 2024-12-22 18:15:33 +0000
Subject: updated .gitignore
diff --git a/.gitignore b/.gitignore
index bd1a52d..43b9694 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,4 +5,5 @@
*.css
*.js
*.csv
+.*
requests.scroll
\ No newline at end of file
commit 93e43037b7794c5d3de89eaf6afe3e3d561d8df3
Author: root <root@hub.scroll.pub>
Date: 2024-11-10 20:12:15 +0000
Subject: initial blank_template template
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..bd1a52d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+.DS_Store
+*.html
+*.txt
+*.xml
+*.css
+*.js
+*.csv
+requests.scroll
\ No newline at end of file
diff --git a/index.scroll b/index.scroll
new file mode 100644
index 0000000..4442ed6
--- /dev/null
+++ b/index.scroll
@@ -0,0 +1,4 @@
+buildHtml
+theme roboto
+
+Hello World my name is
\ No newline at end of file