Calculator Tools Calculator Tools
Create

NoteKeeper - Keep Notes and Reminders

Dec 31, 2023

About this app

NoteKeeper is a simple and intuitive app to keep notes and reminders in reverse chronological order.

NoteKeeper - Keep Notes and Reminders NoteKeeper Keep notes and reminders in reverse chronological order. Add Note

Related apps

Put this on your site

Source

                    <html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">

<title>NoteKeeper - Keep Notes and Reminders</title>
<meta name="description" content="NoteKeeper is a simple and intuitive app to keep notes and reminders in reverse chronological order.">
<meta name="keywords" content="notekeeper, notes, reminders, reverse chronological order">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.

// This will run when the DOM is ready.
document.addEventListener("DOMContentLoaded", function() {
// Store the notes and reminders in an array
var notes = [];

// Function to add a new note
function addNote() {
var noteText = $("#note-input").val();
if (noteText) {
var note = {
text: noteText,
timestamp: new Date().getTime()
};
notes.unshift(note);
renderNotes();
$("#note-input").val("");
}
}

// Function to render the notes on the page
function renderNotes() {
var notesContainer = $("#notes-container");
notesContainer.empty();
for (var i = 0; i < notes.length; i++) {
var note = notes[i];
var noteElement = $("<div class='note'><span class='note-text'>" + note.text + "</span><span class='note-timestamp'>" + formatDate(note.timestamp) + "</span></div>");
notesContainer.append(noteElement);
}
}

// Function to format the timestamp
function formatDate(timestamp) {
var date = new Date(timestamp);
var options = { year: 'numeric', month: 'long', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric' };
return date.toLocaleDateString('en-US', options);
}

// Add event listener to the add note button
$("#add-note-btn").click(function() {
addNote();
});

// Add event listener to the enter key on the note input field
$("#note-input").keypress(function(event) {
if (event.which == 13) {
addNote();
}
});
});

} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>

<style>
body {
background-color: #f8f9fa;
font-family: 'Open Sans', sans-serif;
}

.container {
padding-top: 40px;
}

.notes-container {
margin-top: 20px;
}

.note {
background-color: #ffffff;
padding: 10px;
margin-bottom: 10px;
border-radius: 5px;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
}

.note-text {
font-size: 16px;
font-weight: 500;
}

.note-timestamp {
font-size: 12px;
color: #888888;
}

.input-container {
display: flex;
margin-bottom: 20px;
}

.input-container input {
flex: 1;
padding: 10px;
font-size: 16px;
border-radius: 5px;
border: none;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
}

.input-container button {
margin-left: 10px;
padding: 10px 20px;
font-size: 16px;
border-radius: 5px;
border: none;
background-color: #007bff;
color: #ffffff;
cursor: pointer;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
}
</style>
</head>
<body>
<div id="main-container" class="container">
<h1>NoteKeeper</h1>
<p>Keep notes and reminders in reverse chronological order.</p>
<div class="input-container">
<input type="text" id="note-input" placeholder="Enter your note">
<button id="add-note-btn">Add Note</button>
</div>
<div id="notes-container" class="notes-container"></div>
</div>
</body>
</html>