diff --git a/src/index.html b/src/index.html
index d0edd09..25285ed 100644
--- a/src/index.html
+++ b/src/index.html
@@ -354,6 +354,7 @@
.saved-item-tile {
padding: 20px;
background-color: #2f302b;
+ position: relative;
/*border: 1px solid rgba(255,255,255,0.1);*/
margin: 20px 0;
display: block;
@@ -363,6 +364,12 @@
.saved-item-tile:hover {
background: rgba(255,255,255,0.1);
}
+ .saved-item-tile__close-btn {
+ padding: 20px;
+ position: absolute;
+ right: -5px;
+ top: -5px;
+ }
.saved-items-pane__container {
overflow-y: scroll;
max-height: calc(100vh - 90px);
@@ -472,6 +479,7 @@
padding: 10px;
background: #9f3b4e;
border-radius: 3px;
+ z-index: 6;
transform: translateY(-100%);
transition: 0.3s ease;
}
diff --git a/src/script.js b/src/script.js
index 57adf61..f5fef85 100644
--- a/src/script.js
+++ b/src/script.js
@@ -115,7 +115,7 @@
} else {
options.sizes = [ 33.33, 33.33, 33.33 ];
}
- console.log('reset spliiting', options.sizes)
+ utils.log('reset spliiting', options.sizes)
codeSplitInstance = Split(['#js-html-code', '#js-css-code', '#js-js-code'], options);
mainSplitInstance = Split(['#js-code-side', '#js-demo-side' ], {
direction: (currentLayoutMode === 2 ? 'vertical' : 'horizontal'),
@@ -125,7 +125,7 @@
}
function toggleLayout(mode) {
if (currentLayoutMode === mode) {
- console.log('setsize', currentItem.sizes || [ 33.33, 33.33, 33.33 ]);
+ utils.log('setsize', currentItem.sizes || [ 33.33, 33.33, 33.33 ]);
codeSplitInstance.setSizes(currentItem.sizes || [ 33.33, 33.33, 33.33 ]);
currentLayoutMode = mode;
return;
@@ -165,7 +165,7 @@
chrome.storage.local.set({
items: result.items
});
- })
+ });
}
}
@@ -204,16 +204,20 @@
}
function populateItemsInSavedPane(items) {
- if (!items || !items.length) { return; }
var html = '';
- // TODO: sort desc. by updation date
- items.sort(function (a, b) {
- return b.updatedOn - a.updatedOn;
- });
- items.forEach(function (item) {
- html += ''
- + '' + item.title + '
Last updated: ' + item.updatedOn + '';
- })
+ if (items.length) {
+ // TODO: sort desc. by updation date
+ items.sort(function (a, b) {
+ return b.updatedOn - a.updatedOn;
+ });
+ items.forEach(function (item) {
+ html += '