Skip to content

Commit

Permalink
Change List editor and page Style.
Browse files Browse the repository at this point in the history
  • Loading branch information
Silica163 committed Jun 4, 2023
1 parent 2950d05 commit 7c9a6df
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
2 changes: 1 addition & 1 deletion css/board.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
.item > pre{
white-space:pre-wrap;
overflow-y:auto;
max-height:80%;
max-height:75%;
}

.item > .del {
Expand Down
5 changes: 5 additions & 0 deletions css/editor.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*create new item*/
.newbtn{
padding:0.5em;
}

/*editor section*/

#blur_board{
Expand Down
8 changes: 6 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@
<body>
<h1>Task - Note</h1>

<!-- VIEWER -->
<section id=board>
<!-- CREATE NEW ITEM -->
<section id=newItem>
<button onclick="newList()" value="New List" class=newbtn>New List</button>
<button onclick="newNote()" value="New Note" class=newbtn>New Note</button>
</section>

<!-- VIEWER -->
<section id=board></section>

<!-- EDITOR -->
<section id=note_editor>
Expand Down
14 changes: 14 additions & 0 deletions src/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 = {
Expand All @@ -82,13 +92,17 @@ 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){
const {type,data} = local.get(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 = "";
Expand Down

0 comments on commit 7c9a6df

Please sign in to comment.