1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Checklist</title>
- <style>
- body {
- background-color: #1F2933;
- color: #CBD2D9;
- }
- a {
- color: #E4E7EB;
- }
- .button {
- padding: 8px 12px;
- margin: 3px;
- border: none;
- border-radius: 5px;
- background-color: #52606D;
- color: white;
- cursor: pointer;
- text-decoration: none;
- display: inline-block;
- border-radius: 12px;
- box-shadow: 0 9px #999;
- }
- .button:hover {
- background-color: #616E7C;
- }
- .button:active {
- background-color: #9AA5B1;
- box-shadow: 0 5px #666;
- transform: translateY(4px);
- }
- </style>
- <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" class="button">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>
- <form action="{{ url_for('list') }}" method="get" style="display: inline;">
- <button type="submit" class="button">View List</button>
- </form>
- <form action="{{ url_for('clear') }}" method="get" style="display: inline;">
- <button type="submit" class="button">Clear List</button>
- </form>
- </body>
- </html>
|