gpt-3.5-turbo-0613· OpenAI
WildChat-4.8M (AI2)
Add a timestamp to every note done, and add a delete function <!DOCTYPE html> <html…
- User
Add a timestamp to every note done, and add a delete function
<!-- Import Google Fonts using @import --> <style> @import url("https://fonts.googleapis.com/css2?family=Roboto&display=swap"); </style> <style> /* CSS styles for Progresspad */ body { background-color: #f5f5f5; font-family: "Roboto", sans-serif; margin: 0; padding: 0; } .container { max-width: 600px; margin: 40px auto; background-color: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); padding: 20px; border-radius: 5px; } .container h1 { text-align: center; margin-bottom: 20px; } .note { border: 1px solid #ccc; padding: 10px; margin-bottom: 10px; border-radius: 5px; cursor: pointer; } /* Hover effect to highlight colors */ .note:hover { background-color: #f2f2f2; } /* JS to display current date and time */ #date-time { text-align: right; font-size: 12px; color: #999; margin-top: 5px; } /* CSS styles for new note form */ .new-note-form { display: flex; margin-bottom: 10px; } .new-note-form input { flex-grow: 1; padding: 10px; margin-right: 10px; border-radius: 5px; border: 1px solid #ccc; } .new-note-form button { padding: 10px 20px; background-color: #4caf50; border: none; color: #fff; border-radius: 5px; cursor: pointer; } </style> <script> // JavaScript to display current date and time setInterval(() => { const dateTime = new Date().toLocaleString(); document.getElementById("date-time").innerHTML = dateTime; }, 1000); // JavaScript to add a new note function addNote() { const noteText = document.getElementById("note-input").value; if (noteText) { const noteElement = document.createElement("div"); noteElement.className = "note"; noteElement.contentEditable = true; noteElement.innerText = noteText; document.getElementById("notes-container").appendChild(noteElement); document.getElementById("note-input").value = ""; } } </script><div id="date-time"></div> </div> - Assistant