commit 0799a2a68862263ce0e2ba8010edc770fe6ea62d
Author: root <root@hub.scroll.pub>
Date: 2025-01-02 13:53:07 +0000
Subject: Initial commit
diff --git a/body.html b/body.html
new file mode 100644
index 0000000..75e377f
--- /dev/null
+++ b/body.html
@@ -0,0 +1,30 @@
+<header>
+ <h1>Subtitle</h1>
+ <p>Effortlessly add Chinese subtitles to your videos.</p>
+</header>
+
+<main>
+ <section id="upload-section">
+ <h2>Upload Your Video</h2>
+ <input type="file" id="video-upload" accept="video/*">
+ <p class="file-info">No file selected</p>
+ </section>
+
+ <section id="video-section" class="hidden">
+ <video id="video-player" controls></video>
+ <div id="subtitle-editor">
+ <h3>Add Subtitles</h3>
+ <textarea id="subtitle-input" placeholder="Enter your Chinese subtitles here..."></textarea>
+ <button id="add-subtitle">Add Subtitle</button>
+ </div>
+ </section>
+
+ <section id="download-section" class="hidden">
+ <h2>Download Your Video</h2>
+ <button id="download-btn">Download Subtitled Video</button>
+ </section>
+</main>
+
+<footer>
+ <p>Made with ❤️ for video creators</p>
+</footer>
\ No newline at end of file
diff --git a/index.scroll b/index.scroll
new file mode 100644
index 0000000..e0ec6b1
--- /dev/null
+++ b/index.scroll
@@ -0,0 +1,8 @@
+buildHtml
+baseUrl https://subtitle.scroll.pub
+metaTags
+editButton /edit.html
+title Subtitle - Add Chinese Subtitles to Videos
+style.css
+body.html
+script.js
\ No newline at end of file
diff --git a/prompt.json b/prompt.json
new file mode 100644
index 0000000..feea1c6
--- /dev/null
+++ b/prompt.json
@@ -0,0 +1,25 @@
+{
+ "id": "a218bbcd-9e96-4be2-b52a-0854bd0571fc",
+ "object": "chat.completion",
+ "created": 1735825965,
+ "model": "deepseek-chat",
+ "choices": [
+ {
+ "index": 0,
+ "message": {
+ "role": "assistant",
+ "content": "---domain---\nsubtitle.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://subtitle.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Subtitle - Add Chinese Subtitles to Videos\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <h1>Subtitle</h1>\n <p>Effortlessly add Chinese subtitles to your videos.</p>\n</header>\n\n<main>\n <section id=\"upload-section\">\n <h2>Upload Your Video</h2>\n <input type=\"file\" id=\"video-upload\" accept=\"video/*\">\n <p class=\"file-info\">No file selected</p>\n </section>\n\n <section id=\"video-section\" class=\"hidden\">\n <video id=\"video-player\" controls></video>\n <div id=\"subtitle-editor\">\n <h3>Add Subtitles</h3>\n <textarea id=\"subtitle-input\" placeholder=\"Enter your Chinese subtitles here...\"></textarea>\n <button id=\"add-subtitle\">Add Subtitle</button>\n </div>\n </section>\n\n <section id=\"download-section\" class=\"hidden\">\n <h2>Download Your Video</h2>\n <button id=\"download-btn\">Download Subtitled Video</button>\n </section>\n</main>\n\n<footer>\n <p>Made with ❤️ for video creators</p>\n</footer>\n---style.css---\n:root {\n --primary-color: #ff6b6b;\n --secondary-color: #4ecdc4;\n --background-color: #f7fff7;\n --text-color: #2d3436;\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: 'Segoe UI', sans-serif;\n line-height: 1.6;\n color: var(--text-color);\n background-color: var(--background-color);\n padding: 2rem;\n max-width: 1200px;\n margin: 0 auto;\n}\n\nheader {\n text-align: center;\n margin-bottom: 2rem;\n}\n\nh1 {\n font-size: 3rem;\n color: var(--primary-color);\n margin-bottom: 0.5rem;\n}\n\np {\n font-size: 1.2rem;\n}\n\nsection {\n margin-bottom: 2rem;\n padding: 1.5rem;\n background: white;\n border-radius: 10px;\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);\n}\n\ninput[type=\"file\"] {\n display: none;\n}\n\n.file-info {\n margin-top: 1rem;\n font-style: italic;\n}\n\n#video-player {\n width: 100%;\n max-height: 500px;\n border-radius: 10px;\n margin-bottom: 1rem;\n}\n\n#subtitle-editor {\n margin-top: 1.5rem;\n}\n\ntextarea {\n width: 100%;\n min-height: 100px;\n padding: 0.8rem;\n border: 1px solid #ddd;\n border-radius: 5px;\n resize: vertical;\n margin-bottom: 1rem;\n}\n\nbutton {\n background-color: var(--primary-color);\n color: white;\n border: none;\n padding: 0.8rem 1.5rem;\n border-radius: 5px;\n cursor: pointer;\n transition: background-color 0.3s ease;\n}\n\nbutton:hover {\n background-color: var(--secondary-color);\n}\n\n.hidden {\n display: none;\n}\n\nfooter {\n text-align: center;\n margin-top: 2rem;\n padding: 1rem;\n border-top: 1px solid #ddd;\n}\n\n@media (max-width: 768px) {\n h1 {\n font-size: 2rem;\n }\n\n p {\n font-size: 1rem;\n }\n\n section {\n padding: 1rem;\n }\n}\n---script.js---\nconst videoUpload = document.getElementById('video-upload');\nconst videoPlayer = document.getElementById('video-player');\nconst fileInfo = document.querySelector('.file-info');\nconst uploadSection = document.getElementById('upload-section');\nconst videoSection = document.getElementById('video-section');\nconst downloadSection = document.getElementById('download-section');\nconst subtitleInput = document.getElementById('subtitle-input');\nconst addSubtitleBtn = document.getElementById('add-subtitle');\nconst downloadBtn = document.getElementById('download-btn');\n\nlet videoFile = null;\n\nvideoUpload.addEventListener('change', (e) => {\n videoFile = e.target.files[0];\n if (videoFile) {\n fileInfo.textContent = `Selected file: ${videoFile.name}`;\n videoPlayer.src = URL.createObjectURL(videoFile);\n uploadSection.classList.add('hidden');\n videoSection.classList.remove('hidden');\n downloadSection.classList.remove('hidden');\n }\n});\n\naddSubtitleBtn.addEventListener('click', () => {\n const subtitles = subtitleInput.value.trim();\n if (subtitles) {\n // Here you would add the logic to add subtitles to the video\n alert('Subtitles added successfully!');\n } else {\n alert('Please enter some subtitles.');\n }\n});\n\ndownloadBtn.addEventListener('click', () => {\n if (videoFile) {\n // Here you would add the logic to download the subtitled video\n alert('Your video with subtitles is ready for download!');\n } else {\n alert('Please upload a video first.');\n }\n});\n---end---"
+ },
+ "logprobs": null,
+ "finish_reason": "stop"
+ }
+ ],
+ "usage": {
+ "prompt_tokens": 244,
+ "completion_tokens": 1202,
+ "total_tokens": 1446,
+ "prompt_cache_hit_tokens": 0,
+ "prompt_cache_miss_tokens": 244
+ },
+ "system_fingerprint": "fp_f1afce2943"
+}
\ No newline at end of file
diff --git a/readme.scroll b/readme.scroll
new file mode 100644
index 0000000..854365d
--- /dev/null
+++ b/readme.scroll
@@ -0,0 +1,2 @@
+# subtitle.scroll.pub
+Website generated by DeepSeek from prompt: 帮我创建一个可以添加中文字幕的视频翻译网站
\ No newline at end of file
diff --git a/script.js b/script.js
new file mode 100644
index 0000000..43bc624
--- /dev/null
+++ b/script.js
@@ -0,0 +1,41 @@
+const videoUpload = document.getElementById('video-upload');
+const videoPlayer = document.getElementById('video-player');
+const fileInfo = document.querySelector('.file-info');
+const uploadSection = document.getElementById('upload-section');
+const videoSection = document.getElementById('video-section');
+const downloadSection = document.getElementById('download-section');
+const subtitleInput = document.getElementById('subtitle-input');
+const addSubtitleBtn = document.getElementById('add-subtitle');
+const downloadBtn = document.getElementById('download-btn');
+
+let videoFile = null;
+
+videoUpload.addEventListener('change', (e) => {
+ videoFile = e.target.files[0];
+ if (videoFile) {
+ fileInfo.textContent = `Selected file: ${videoFile.name}`;
+ videoPlayer.src = URL.createObjectURL(videoFile);
+ uploadSection.classList.add('hidden');
+ videoSection.classList.remove('hidden');
+ downloadSection.classList.remove('hidden');
+ }
+});
+
+addSubtitleBtn.addEventListener('click', () => {
+ const subtitles = subtitleInput.value.trim();
+ if (subtitles) {
+ // Here you would add the logic to add subtitles to the video
+ alert('Subtitles added successfully!');
+ } else {
+ alert('Please enter some subtitles.');
+ }
+});
+
+downloadBtn.addEventListener('click', () => {
+ if (videoFile) {
+ // Here you would add the logic to download the subtitled video
+ alert('Your video with subtitles is ready for download!');
+ } else {
+ alert('Please upload a video first.');
+ }
+});
\ No newline at end of file
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..df26a28
--- /dev/null
+++ b/style.css
@@ -0,0 +1,114 @@
+:root {
+ --primary-color: #ff6b6b;
+ --secondary-color: #4ecdc4;
+ --background-color: #f7fff7;
+ --text-color: #2d3436;
+}
+
+* {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+}
+
+body {
+ font-family: 'Segoe UI', sans-serif;
+ line-height: 1.6;
+ color: var(--text-color);
+ background-color: var(--background-color);
+ padding: 2rem;
+ max-width: 1200px;
+ margin: 0 auto;
+}
+
+header {
+ text-align: center;
+ margin-bottom: 2rem;
+}
+
+h1 {
+ font-size: 3rem;
+ color: var(--primary-color);
+ margin-bottom: 0.5rem;
+}
+
+p {
+ font-size: 1.2rem;
+}
+
+section {
+ margin-bottom: 2rem;
+ padding: 1.5rem;
+ background: white;
+ border-radius: 10px;
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
+}
+
+input[type="file"] {
+ display: none;
+}
+
+.file-info {
+ margin-top: 1rem;
+ font-style: italic;
+}
+
+#video-player {
+ width: 100%;
+ max-height: 500px;
+ border-radius: 10px;
+ margin-bottom: 1rem;
+}
+
+#subtitle-editor {
+ margin-top: 1.5rem;
+}
+
+textarea {
+ width: 100%;
+ min-height: 100px;
+ padding: 0.8rem;
+ border: 1px solid #ddd;
+ border-radius: 5px;
+ resize: vertical;
+ margin-bottom: 1rem;
+}
+
+button {
+ background-color: var(--primary-color);
+ color: white;
+ border: none;
+ padding: 0.8rem 1.5rem;
+ border-radius: 5px;
+ cursor: pointer;
+ transition: background-color 0.3s ease;
+}
+
+button:hover {
+ background-color: var(--secondary-color);
+}
+
+.hidden {
+ display: none;
+}
+
+footer {
+ text-align: center;
+ margin-top: 2rem;
+ padding: 1rem;
+ border-top: 1px solid #ddd;
+}
+
+@media (max-width: 768px) {
+ h1 {
+ font-size: 2rem;
+ }
+
+ p {
+ font-size: 1rem;
+ }
+
+ section {
+ padding: 1rem;
+ }
+}
\ No newline at end of file