Skip to content

Commit

Permalink
Style note input field and individual notes
Browse files Browse the repository at this point in the history
  • Loading branch information
burakunal28 committed Aug 24, 2024
1 parent 53ae630 commit 31442d8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion css/style.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Set the background color for the entire page */
html, body {
#app-body {
background-color: #F8F0E5;
}

Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://getbootstrap.com/docs/5.3/assets/css/docs.css" rel="stylesheet">
</head>
<body id="app-body" class="font-monospace">
<body class="font-monospace" id="app-body">
<div class="container text-primary">
<!-- App title -->
<h2 class="fw-bolder">Colorful Notes</h2>
Expand Down
10 changes: 1 addition & 9 deletions js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,8 @@ const deleteAllButton = document.getElementById('deleteAllButton');
// Add event listener for delete all button
deleteAllButton.addEventListener('click', deleteAllNotes);

// Function to set the background color
function setBackgroundColor() {
const appBody = document.getElementById('app-body');
appBody.style.backgroundColor = '#F8F0E5';
}

// Call setBackgroundColor when the DOM is fully loaded
// Load saved notes when the DOM is fully loaded
window.addEventListener('DOMContentLoaded', () => {
setBackgroundColor();

const savedNotes = JSON.parse(localStorage.getItem('notes')) || [];

// If no saved notes, create default notes
Expand Down

0 comments on commit 31442d8

Please sign in to comment.