diff --git a/.gitignore b/.gitignore index e1b049b..3f73acc 100644 --- a/.gitignore +++ b/.gitignore @@ -33,4 +33,12 @@ Thumbs.db dist/ build/ +# Загруженные аватарки пользователей +public/uploads/* +!public/uploads/.gitignore + +# Временные файлы +/tmp/ +*.tmp + .cursor/ \ No newline at end of file diff --git a/app.js b/app.js deleted file mode 100644 index 25af108..0000000 --- a/app.js +++ /dev/null @@ -1,247 +0,0 @@ -const textInput = document.querySelector(".textInput"); -const btnSave = document.querySelector(".btnSave"); -const notes = document.querySelector(".notes-container"); - -// Получаем кнопки -const boldBtn = document.getElementById("boldBtn"); -const italicBtn = document.getElementById("italicBtn"); -const headerBtn = document.getElementById("headerBtn"); -const listBtn = document.getElementById("listBtn"); -const quoteBtn = document.getElementById("quoteBtn"); -const codeBtn = document.getElementById("codeBtn"); -const linkBtn = document.getElementById("linkBtn"); - -function getFormattedDateTime() { - let now = new Date(); - let day = String(now.getDate()).padStart(2, "0"); - let month = String(now.getMonth() + 1).padStart(2, "0"); - let year = now.getFullYear(); - let hours = String(now.getHours()).padStart(2, "0"); - let minutes = String(now.getMinutes()).padStart(2, "0"); - - return { - date: `${day}.${month}.${year}`, - time: `${hours}:${minutes}`, - }; -} - -// Сохранить заметки в localStorage -function saveNotesToLocalStorage(notesArr) { - localStorage.setItem("notes", JSON.stringify(notesArr)); -} - -// Получить заметки из localStorage -function getNotesFromLocalStorage() { - return JSON.parse(localStorage.getItem("notes")) || []; -} - -// Обновить функцию renderNotes -function renderNotes() { - const notesArr = getNotesFromLocalStorage(); - notes.innerHTML = ""; // Очищаем контейнер перед рендерингом - - notesArr.forEach(function (content, index) { - const noteHtml = ` -