Browse Source

Upload files to ''

Template files
deadtom 1 day ago
parent
commit
23f4a9e801
1 changed files with 30 additions and 0 deletions
  1. 30 0
      index.html

+ 30 - 0
index.html

@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Checklist</title>
+    <script>
+        // Function to focus on the input field
+        function focusInput() {
+            document.getElementById('itemInput').focus();
+        }
+    </script>
+</head>
+<body onload="focusInput()">
+    <h1>Checklist</h1>
+    <form method="POST" onsubmit="focusInput()">
+        <input type="text" id="itemInput" name="item" placeholder="Add a new item" required>
+        <button type="submit">Add</button>
+    </form>
+    <ul>
+        {% for item in items %}
+            <li style="text-decoration: {{ 'line-through' if item.checked else 'none' }};">
+                {{ item.name }}
+                <a href="{{ url_for('check', item_id=loop.index0) }}">[Check]</a>
+            </li>
+        {% endfor %}
+    </ul>
+    <a href="{{ url_for('list') }}">View List</a>
+</body>
+</html>