commit fd4ff32c834411abf1da94eafc6852bb573f50e1
Author: root <root@hub.scroll.pub> Date: 2024-12-27 08:38:33 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..c55eb85 --- /dev/null +++ b/body.html @@ -0,0 +1,40 @@ +<header> + <h1>Daily Work Log</h1> + <p>Fill out your daily work report and generate a JSON output.</p> +</header> + +<main> + <form id="workLogForm"> + <div class="form-group"> + <label for="date">Date:</label> + <input type="date" id="date" name="date" required> + </div> + + <div class="form-group"> + <label for="tasks">Tasks Completed:</label> + <textarea id="tasks" name="tasks" rows="4" required></textarea> + </div> + + <div class="form-group"> + <label for="hours">Hours Worked:</label> + <input type="number" id="hours" name="hours" min="0" step="0.5" required> + </div> + + <div class="form-group"> + <label for="notes">Additional Notes:</label> + <textarea id="notes" name="notes" rows="4"></textarea> + </div> + + <button type="submit">Generate JSON</button> + </form> + + <div id="output" class="hidden"> + <h2>Generated JSON</h2> + <pre><code id="jsonOutput"></code></pre> + <button id="copyButton">Copy to Clipboard</button> + </div> +</main> + +<footer> + <p>Keep track of your daily work progress.</p> +</footer> \ No newline at end of file diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..d09c794 --- /dev/null +++ b/index.scroll @@ -0,0 +1,8 @@ +buildHtml +baseUrl https://dailylog.scroll.pub +metaTags +editButton /edit.html +title Daily Work Log +style.css +body.html +script.js \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..c64a63b --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# dailylog.scroll.pub +Website generated by DeepSeek from prompt: 制作一个网页用来填写每日工作日报 记录内容如下json 记录后生成同样格式的json可用于复制 \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..5b97c9f --- /dev/null +++ b/script.js @@ -0,0 +1,21 @@ +document.getElementById('workLogForm').addEventListener('submit', function (e) { + e.preventDefault(); + + const formData = { + date: document.getElementById('date').value, + tasks: document.getElementById('tasks').value.split('\n').filter(task => task.trim() !== ''), + hours: parseFloat(document.getElementById('hours').value), + notes: document.getElementById('notes').value + }; + + const jsonOutput = JSON.stringify(formData, null, 2); + document.getElementById('jsonOutput').textContent = jsonOutput; + document.getElementById('output').classList.remove('hidden'); +}); + +document.getElementById('copyButton').addEventListener('click', function () { + const jsonOutput = document.getElementById('jsonOutput').textContent; + navigator.clipboard.writeText(jsonOutput).then(() => { + alert('JSON copied to clipboard!'); + }); +}); \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..4cf7c74 --- /dev/null +++ b/style.css @@ -0,0 +1,109 @@ +:root { + --primary-color: #2563eb; + --secondary-color: #1e40af; + --background-color: #f8fafc; + --text-color: #1e293b; + --border-radius: 8px; + --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); +} + +body { + font-family: 'Segoe UI', system-ui, sans-serif; + line-height: 1.6; + margin: 0; + padding: 0; + background-color: var(--background-color); + color: var(--text-color); +} + +header { + background-color: var(--primary-color); + color: white; + padding: 2rem; + text-align: center; + margin-bottom: 2rem; +} + +main { + max-width: 800px; + margin: 0 auto; + padding: 0 1rem; +} + +.form-group { + margin-bottom: 1.5rem; +} + +label { + display: block; + margin-bottom: 0.5rem; + font-weight: 600; +} + +input, +textarea { + width: 100%; + padding: 0.75rem; + border: 1px solid #e2e8f0; + border-radius: var(--border-radius); + font-size: 1rem; + transition: border-color 0.2s; +} + +input:focus, +textarea:focus { + outline: none; + border-color: var(--primary-color); + box-shadow: var(--box-shadow); +} + +button { + background-color: var(--primary-color); + color: white; + padding: 0.75rem 1.5rem; + border: none; + border-radius: var(--border-radius); + font-size: 1rem; + cursor: pointer; + transition: background-color 0.2s; +} + +button:hover { + background-color: var(--secondary-color); +} + +#output { + margin-top: 2rem; + padding: 1.5rem; + background-color: white; + border-radius: var(--border-radius); + box-shadow: var(--box-shadow); +} + +.hidden { + display: none; +} + +pre { + background-color: #f1f5f9; + padding: 1rem; + border-radius: var(--border-radius); + overflow-x: auto; +} + +footer { + text-align: center; + padding: 2rem; + margin-top: 2rem; + color: #64748b; +} + +@media (max-width: 768px) { + header { + padding: 1.5rem; + } + + main { + padding: 0 0.5rem; + } +} \ No newline at end of file