From 7c9a6df7016c4c264419f52aaf0993f2d76dc951 Mon Sep 17 00:00:00 2001 From: Silica163 <96188282+Silica163@users.noreply.github.com> Date: Sun, 4 Jun 2023 16:27:52 +0700 Subject: [PATCH] Change List editor and page Style. --- css/board.css | 2 +- css/editor.css | 5 +++++ index.html | 8 ++++++-- src/editor.js | 14 ++++++++++++++ 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/css/board.css b/css/board.css index 27b1a53..84c0d8c 100644 --- a/css/board.css +++ b/css/board.css @@ -19,7 +19,7 @@ .item > pre{ white-space:pre-wrap; overflow-y:auto; - max-height:80%; + max-height:75%; } .item > .del { diff --git a/css/editor.css b/css/editor.css index 2fe99f2..cd9c2af 100644 --- a/css/editor.css +++ b/css/editor.css @@ -1,3 +1,8 @@ +/*create new item*/ +.newbtn{ + padding:0.5em; +} + /*editor section*/ #blur_board{ diff --git a/index.html b/index.html index 066791d..a18fb97 100644 --- a/index.html +++ b/index.html @@ -20,10 +20,14 @@

Task - Note

- -
+ +
+ +
+ +
diff --git a/src/editor.js b/src/editor.js index 09310c3..b5e7d6b 100644 --- a/src/editor.js +++ b/src/editor.js @@ -20,6 +20,11 @@ note.children['cancelbtn'].addEventListener('click',resetNoteData); const note_comp = note.children; +function newNote(){ + note.setAttribute("status","active"); + bb.setAttribute("status","active"); +} + function resetNoteData(){ note_comp['title'].value = ""; note_comp['title'].disabled = false; @@ -60,6 +65,11 @@ list.children['savebtn'].addEventListener('click',save); const list_comp = list.children; +function newList(){ + list.setAttribute("status","active"); + bb.setAttribute("status","active"); +} + function getListData(){ const listboard = list_comp['task']; var data = { @@ -82,6 +92,8 @@ function resetListData(){ list_comp['title'].disabled = false; list_comp['task'].innerHTML = ""; list_comp['add_list'].children[0].value = ""; + list.setAttribute("status",""); + bb.setAttribute("status",""); } function editList(id){ @@ -89,6 +101,8 @@ function editList(id){ list_comp["title"].value = id; list_comp['title'].disabled = true; + list.setAttribute("status","active"); + bb.setAttribute("status","active"); const listBoard = list_comp["task"]; listBoard.innerHTML = "";