Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion Style/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ header {
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#heading {
position: relative;
font-size: 5vh;
Expand Down Expand Up @@ -173,7 +174,7 @@ header {
padding: auto;
}
#emp-nonemp {
margin: auto 16px;
/* margin: auto; */

cursor: pointer;
outline: 0;
Expand Down Expand Up @@ -303,3 +304,29 @@ div.cont {
color: #fff;
outline: none;
}

.active {
background-color: #fae588;
}

button {
padding: 0.3rem 0.5rem;
}

#deleteAll,
#save {
width: 100px;
font-size: 0.7rem;
padding: 0.3rem 0;
font-weight: bold;
}

#style {
display: flex;
align-items: center;
justify-content: space-around;
}

#emp-nonemp {
display: flex;
}
12 changes: 12 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,21 +96,33 @@ document.addEventListener("DOMContentLoaded", function () {

bold.addEventListener("click", function () {
textArea.style.fontWeight = "bold";
bold.classList.add("active");
plain.classList.remove("active");
});
underline.addEventListener("click", function () {
textArea.style.textDecoration = "underline";
underline.classList.add("active");
normal.classList.remove("active");
});
emphasized.addEventListener("click", function () {
textArea.style.fontStyle = "italic";
emphasized.classList.add("active");
unemphasized.classList.remove("active");
});
plain.addEventListener("click", function () {
textArea.style.fontWeight = "";
plain.classList.add("active");
bold.classList.remove("active");
});
normal.addEventListener("click", function () {
textArea.style.textDecoration = "";
normal.classList.add("active");
underline.classList.remove("active");
});
unemphasized.addEventListener("click", function () {
textArea.style.fontStyle = "";
unemphasized.classList.add("active");
emphasized.classList.remove("active");
});

$(document).on("click", "#files li", function (e) {
Expand Down