further ui improvements (alignment & keyboard shortcuts)
authorAndrew Lorimer <andrew@charles.cortex>
Thu, 15 Aug 2019 12:34:50 +0000 (22:34 +1000)
committerAndrew Lorimer <andrew@charles.cortex>
Thu, 15 Aug 2019 12:34:50 +0000 (22:34 +1000)
admin.js
colours.js
newtab.html
options.css [new file with mode: 0644]
options.html
sites.js
style.css
index 0c9e0d44660a6ecc8191f41aadf1e1182b52a13b..386da741d7c81a7059fbc09c7aca81e69172a316 100644 (file)
--- a/admin.js
+++ b/admin.js
 var mainlist;
 var mainlist;
-
-//chrome.tabs.create({ url: chrome.extension.getURL("newtab.html") });
-//window.close();
-
+var rmspan = ["<span class='remove' id='delete-", "'>–</span>"]
 document.addEventListener("DOMContentLoaded", function() {
 document.addEventListener("DOMContentLoaded", function() {
-       chrome.storage.sync.get(
-{"lists": [
-    [
+  chrome.storage.sync.get(
+    {"lists": [
+      [
         ["Github", "https://github.com"],
         ["Wikipedia", "https://en.wikipedia.org"],
         ["Gmail", "https://mail.google.com"]
         ["Github", "https://github.com"],
         ["Wikipedia", "https://en.wikipedia.org"],
         ["Gmail", "https://mail.google.com"]
-    ],
-    [
+      ],
+      [
         ["Desmos", "https://www.desmos.com/calculator"],
         ["Wolfram", "https://wolframalpha.com"],
         ["Hacker News", "https://news.ycombinator.com"]
         ["Desmos", "https://www.desmos.com/calculator"],
         ["Wolfram", "https://wolframalpha.com"],
         ["Hacker News", "https://news.ycombinator.com"]
-    ],
-    [
+      ],
+      [
         ["Reddit", "https://www.reddit.com"],
         ["YouTube", "https://youtube.com"],
         ["Instagram", "https://instagram.com"]
         ["Reddit", "https://www.reddit.com"],
         ["YouTube", "https://youtube.com"],
         ["Instagram", "https://instagram.com"]
-    ]
-],
+      ]
+    ],
 "l1name": "General",
 "l2name": "Productivity",
 "l3name": "Social"},
 "l1name": "General",
 "l2name": "Productivity",
 "l3name": "Social"},
-       userListsCallback);
+    userListsCallback);
 });
 
 });
 
+function columnToArray(list) {
+  var l = [];
+  var elem = list.getElementsByClassName("item");
+  for (var i = 0; i < elem.length; ++i) {
+    l[i] = [elem[i].innerText, elem[i].getAttribute("href")];
+  }
+  return l;
+}
+
 function listToArray(list) {
 function listToArray(list) {
-       var l = [];
-       var elem = list.getElementsByTagName("li");
-       for (var i = 0; i < elem.length; ++i) {
-         l[i] = [elem[i].getElementsByTagName("a")[0].innerText, elem[i].getElementsByTagName("a")[0].getAttribute("href")];
-       }
-       return l;
+  var l = [];
+  var elem = list.getElementsByTagName("li");
+  for (var i = 0; i < elem.length; ++i) {
+    l[i] = [elem[i].getElementsByTagName("a")[0].innerText, elem[i].getElementsByTagName("a")[0].getAttribute("href")];
+  }
+  return l;
 }
 
 var userListsCallback = function(lists) {
 }
 
 var userListsCallback = function(lists) {
-       mainlist = [lists["l1name"],lists["l2name"],lists["l3name"]]
-       for(var i=0;i<lists["lists"].length;i++) {
-               var div = document.createElement("div");
-               div.setAttribute("class", "favorites-list users-list");
-               document.getElementById("links").appendChild(div);
-
-               var ul = document.createElement("ul");
-               ul.setAttribute("id", mainlist[i]);
-               div.appendChild(ul);
-
-               var title = document.createElement("div");
-               title.setAttribute("class", "title");
-               ul.appendChild(title);
-
-               var p = document.createElement("p");
-               p.innerText = mainlist[i];
-               title.appendChild(p);
-
-               title.insertAdjacentHTML("beforeend", "<span id='add-"+mainlist[i]+"'>+</span>");
-
-               var list = lists["lists"][i];
-               for(var j=0;j<lists["lists"][i].length;j++) {
-                       var li = document.createElement("li");
-                       li.setAttribute("id", mainlist[i]+"-"+j);
-                       var siteurl = list[j][1];
-                       var name = list[j][0];
-                       // ronmurphy change start
-                       var img = document.createElement("img");
-                                               img.className = "icon";
-                                               img.src = "http://www.google.com/s2/favicons?domain="+siteurl+"";
-                       li.insertAdjacentHTML("beforeend", "<a href="+siteurl+"> <img src="+img.src+" alt="+extractDomain(siteurl,1)+"/> "+name+"</a>");
-                       // ronmurphy end
-                       //li.insertAdjacentHTML("beforeend", "<a href="+siteurl+">"+name+"</a>");
-                       li.insertAdjacentHTML("beforeend", "<span id='delete-"+j+"-"+mainlist[i]+"'>&#10799;</span>");
-                       ul.appendChild(li);
-               }
-
-               var sortable = Sortable.create(ul, {
-                       group: "userlists",
-                       onUpdate: function (evt) {
-                               save();
-                       }
-               });
-       }
-
-       menu();
+  mainlist = [lists["l1name"],lists["l2name"],lists["l3name"]]
+  for(var i=0;i<lists["lists"].length;i++) {
+    var ul = document.createElement("ul");
+    ul.setAttribute("id", mainlist[i]);
+    document.getElementById("links").appendChild(ul);
+
+    var title = document.createElement("div");
+    title.setAttribute("class", "title");
+    ul.appendChild(title);
+
+    var p = document.createElement("p");
+    p.innerText = mainlist[i];
+    title.appendChild(p);
+
+    title.insertAdjacentHTML("beforeend", "<span class='add' id='add-"+mainlist[i]+"'>+</span>");
+
+    var list = lists["lists"][i];
+    for(var j=0;j<lists["lists"][i].length;j++) {
+      var li = document.createElement("li");
+      li.setAttribute("id", mainlist[i]+"-"+j);
+      var siteurl = list[j][1];
+      var name = list[j][0];
+      var img = document.createElement("img");
+      img.className = "icon";
+      img.src = "http://www.google.com/s2/favicons?domain="+siteurl+"";
+      li.insertAdjacentHTML("beforeend", "<a class='item' href="+siteurl+"><img src="+img.src+" alt="+extractDomain(siteurl,1)+"/> "+name+"</a>");
+      li.insertAdjacentHTML("beforeend", rmspan[0] + j + "-" + mainlist[i] + rmspan[1]);
+      ul.appendChild(li);
+    }
+
+    var sortable = Sortable.create(ul, {
+      group: "userlists",
+      onUpdate: function (evt) {
+        save();
+      }
+    });
+  }
+
+  menu();
 
 };
 
 
 };
 
+document.onkeyup=function(e){
+  var e = e || window.event; // for IE to cover IEs window event-object
+  fields = document.getElementsByClassName("new");
+  if(e.which == 27 && fields != null) {
+    fields[fields.length-1].remove();
+    return false;
+  }
+  if(e.which == 27 && fields != null) {
+    fields[fields.length-1].remove();
+    return false;
+  }
+}
+
 function listen(li) {
 function listen(li) {
-       li.addEventListener('click', function(event){
-               var r = event.target.id.split("-");
-               if (r[0] == "delete") {
-                       var el = document.getElementById(r[2]+"-"+r[1]);
-                       el.outerHTML = "";
-                       delete el;
-                       save();
-               } else {
-                       var ul = document.getElementById(r[1]);
-                       ul.insertAdjacentHTML("beforeend", "<div class='inp' id='div-"+listToArray(ul).length.toString()+"'><input style='width:35%' type='text' class='name' value='' placeholder='name'><input style='width:47%' type='text' class='url' value='' placeholder='url' id='form-"+listToArray(ul).length.toString()+"'><a id='input-"+listToArray(ul).length.toString()+"'>&#x2714;</a></div>");
-                       var inp = document.getElementById("div-"+listToArray(ul).length.toString());
-                       var span = document.getElementById("input-"+listToArray(ul).length.toString());
-                       var form = document.getElementById("form-"+listToArray(ul).length.toString());
-
-                       form.addEventListener('keyup', function(event){
-                               if (event.keyCode == 13) {
-                                       span.click();
-                               }
-                       });
-
-                       span.addEventListener('click', function(event){
-                               inp.outerHTML = "";
-                               delete inp;
-
-                               if (inp.getElementsByClassName("name")[0].value != "" || inp.getElementsByClassName("url")[0].value != "") {
-                                       var li = document.createElement("li");
-                                       li.setAttribute("id",r[1]+"-"+listToArray(ul).length.toString());
-                                       //var splitted = splitHostname(inp.getElementsByClassName("url")[0].value); fix later
-                                       var siteurl = addhttp(inp.getElementsByClassName("url")[0].value);
-                                       var name = inp.getElementsByClassName("name")[0].value;
-
-                                       li.insertAdjacentHTML("beforeend", "<a href="+siteurl+">"+name+"</a>");
-                                       li.insertAdjacentHTML("beforeend", "<span id='delete-"+listToArray(ul).length.toString()+"-"+r[1]+"'>-</span>");
-                                       document.getElementById(r[1]).appendChild(li);
-                                       save();
-                                       listen(li);
-                               }
-                       });
-               }
-       }, false);
+  li.addEventListener('click', function(event){
+    var r = event.target.id.split("-");
+    if (r[0] == "delete") {
+      var el = document.getElementById(r[2]+"-"+r[1]);
+      el.outerHTML = "";
+      delete el;
+      save();
+    } else {
+      var ul = document.getElementById(r[1]);
+      var li = document.createElement("li");
+      li.setAttribute("class", "new");
+      li.insertAdjacentHTML("beforeend", "<span class='save' tabindex='3' id='input-"+columnToArray(li).length.toString()+"'>&#x2714;</span><input type='text' class='name' value='' placeholder='name' tabindex='1'><br /><input type='text' class='url' value='' placeholder='url' tabindex='2' id='form-"+columnToArray(li).length.toString()+"'>");
+      ul.appendChild(li);
+      var span = document.getElementById("input-"+columnToArray(li).length.toString());
+      var form = document.getElementById("form-"+columnToArray(li).length.toString());
+      var name = document.getElementsByClassName("name")[0].focus();
+      span.addEventListener('click', function(event){
+        var li = document.getElementsByClassName("new")[0]
+        var ul = li.parentNode;
+        if (li.getElementsByClassName("name")[0].value != "" || li.getElementsByClassName("url")[0].value != "") {
+          var newli = document.createElement("li");
+          newli.setAttribute("id",r[1]+"-"+columnToArray(ul).length.toString());
+          var siteurl = addhttp(li.getElementsByClassName("url")[0].value);
+          var name = li.getElementsByClassName("name")[0].value;
+          li.remove()
+          delete li;
+
+          newli.insertAdjacentHTML("beforeend", "<a href="+siteurl+">"+name+"</a>");
+          newli.insertAdjacentHTML("beforeend", rmspan[0]+columnToArray(ul).length.toString()+"-"+r[1]+rmspan[1]);
+          document.getElementById(r[1]).appendChild(newli);
+          save();
+          listen(newli);
+        }
+      });
+      span.addEventListener('keypress', function(e) {
+        if (e.keyCode == 13) {
+          span.click();
+        }
+      });
+    }
+  }, false);
 }
 
 function menu() {
 }
 
 function menu() {
-       var allUserLi = document.querySelectorAll('.users-list > ul > li > span, .users-list > ul > .title > span');
+  var allUserLi = document.querySelectorAll('.remove, .add');
 
 
-       allUserLi.forEach(function(li, p_index){
-       listen(li);
-    });
+  allUserLi.forEach(function(li, p_index){
+    listen(li);
+  });
 }
 
 function save(l) {
 }
 
 function save(l) {
-       var set = l || JSON.parse(JSON.stringify(mainlist));
-       d = []
-       d = set;
-       for (var i = 0; i < set.length; ++i) {
-               e = document.getElementById(set[i]);
-               d[i] = listToArray(e);
-       }
-       chrome.storage.sync.set( {"lists": d} );
+  var set = l || JSON.parse(JSON.stringify(mainlist));
+  d = []
+  d = set;
+  console.log("Saving settings");
+  for (var i = 0; i < set.length; ++i) {
+    d[i] = listToArray(document.getElementById(set[i]));
+  }
+  chrome.storage.sync.set( {"lists": d} );
 }
 }
index 714faa04d39da9f38bbde6df1318df7b72f05bca..49b166e054ea6b08060ff8ef109af307eb6293d5 100644 (file)
@@ -1,16 +1,7 @@
 document.addEventListener("DOMContentLoaded", function() {
        chrome.storage.sync.get({"bgvalue": "#2E3440"}, bgCallback);
 document.addEventListener("DOMContentLoaded", function() {
        chrome.storage.sync.get({"bgvalue": "#2E3440"}, bgCallback);
-});
-var bgCallback = function(list) {
-var color = list["bgvalue"];
-console.log(color);
-document.body.style.background = color;
-};
-document.addEventListener("DOMContentLoaded", function() {
        chrome.storage.sync.get({"fgvalue": "#ECEFF4"}, fgCallback);
 });
        chrome.storage.sync.get({"fgvalue": "#ECEFF4"}, fgCallback);
 });
-var fgCallback = function(list) {
-var color = list["fgvalue"];
-console.log(color);
-document.body.style.color = color;
-};
+
+var bgCallback = function(colourPref) { document.body.style.background = colourPref["bgvalue"]; };
+var fgCallback = function(colourPref) { document.body.style.color = colourPref["fgvalue"]; };
index 743ce02650f58a62884cc53824606c5705a670ba..d8e25a6df0904ec964c7a3976616a3139865ad4f 100644 (file)
@@ -15,8 +15,6 @@
 </head>
 
 <body style="background: #222222;">
 </head>
 
 <body style="background: #222222;">
-  <div class="container">
-    
-    <div class="favorites" id="links" style="min-height: 283px;"></div>
+  <div class="favorites" id="links" style="min-height: 283px;"></div>
 </body>
 </html>
 </body>
 </html>
diff --git a/options.css b/options.css
new file mode 100644 (file)
index 0000000..6aa53eb
--- /dev/null
@@ -0,0 +1,13 @@
+body {
+  padding-left: 65px;
+  padding-right: 65px;
+}
+
+button {
+  float: right;
+  width: 65px;
+}
+
+table {
+  text-align: right;
+}
index 42f1117b06516d07884130896ded1d21fae64294..582a242f011ddb3222220aa7d71404c81baa1bf9 100644 (file)
@@ -1,41 +1,37 @@
 <!DOCTYPE html>
 <html>
 
 <!DOCTYPE html>
 <html>
 
-    <head>
-        <title>newtab</title>
-        <script src="options.js"></script>
-    </head>
+  <head>
+    <title>newtab</title>
+    <script src="options.js"></script>
+    <link rel="stylesheet" href="options.css">
+  </head>
+    
 
 
-    <body style="padding: 10px; padding-left: 65px; padding-right: 65px;">
-        <table>
-            <tr>
-                <td>Column 1</td>
-                <td><input type="text" id="l1"></td>
-                <input type="checkbox" id="l1show" value="Bike"> I have a bike<br>
-            </tr>
-            <tr>
-                <td>Column 2</td>
-                <td><input type="text" id="l2show"></td>
-            </tr>
-            <tr>
-                <td>Column 3</td>
-                <td><input type="text" id="l3"></td>
-            </tr>
-            <tr>
-                <td>bg</td><td><input type="text" id="bg"></td>
-            </tr>
-            <tr>
-                <td>fg</td><td><input type="text" id="fg"></td>
-            </tr>
-        </table>
+  <body>
+    <table>
+      <tr>
+        <td>Column 1</td>
+        <td><input type="text" id="l1"></td>
+      </tr>
+      <tr>
+        <td>Column 2</td>
+        <td><input type="text" id="l2"></td>
+      </tr>
+      <tr>
+        <td>Column 3</td>
+        <td><input type="text" id="l3"></td>
+      </tr>
+      <tr>
+        <td>Background</td><td><input type="text" id="bg"></td>
+      </tr>
+      <tr>
+        <td>Foreground</td><td><input type="text" id="fg"></td>
+      </tr>
+    </table>
 
 
-        <table>
-            <tr>
-                <td style="width: 135px;"><button id="save" style="width: 65px;">Save</button><div id="status"></div></td>
-                <td style="width: 65px;"><div style="text-align: right;">Made by <a href="https://git.lorimer.id.au/newtab.git">Andrew Lorimer</a></div></td>
-            </td>
-        </table>
-        
-        <script src="options.js"></script>
-</body>
+    <button id="save">Save</button>
+    <p>Made by<br /><a href="https://git.lorimer.id.au/newtab.git">Andrew Lorimer</a></p>
+    <script src="options.js"></script>
+  </body>
 </html>
 </html>
index 6c9565cc717751789a3dba2ec2baffb658691ab1..1598be378367f43a39cf73330358f8614c45f807 100644 (file)
--- a/sites.js
+++ b/sites.js
@@ -1,39 +1,49 @@
 function extractDomain(url, y) {
 function extractDomain(url, y) {
-    var domain;
-    
-    //remove protocol
-    if (url.indexOf("://") > -1) { domain = url.split('/')[2]; }
-        else { domain = url.split('/')[0]; }
-        
-        //remove port number
-        domain = domain.split(':')[0];
-        
-        
-        if (y == 1) {
-            d = splitHostname(domain);
-            if (d.subdomain != "www" && d.subdomain != "") {
-                return d.subdomain;
-            }
-            else {
-                return d.domain;
-            }
-        } else {
-            return domain;
-        }
+  var domain;
+
+  //remove protocol
+  if (url.indexOf("://") > -1) {
+    domain = url.split('/')[2];
+  }
+  else {
+    domain = url.split('/')[0];
+  }
+
+  //remove port number
+  domain = domain.split(':')[0];
+
+  if (y == 1) {
+
+    d = splitHostname(domain);
+
+    if (d.subdomain != "www" && d.subdomain != "") {
+      return d.subdomain;
+    }
+    else {
+      return d.domain;
+    }
+
+  } else {
+    return domain;
+  }
 }
 
 function addhttp(url) {
 }
 
 function addhttp(url) {
-    if (!/^(f|ht)tps?:\/\//i.test(url)) {
-        url = "http://" + url;
-    }
-    return url;
+  if (!/^(f|ht)tps?:\/\//i.test(url)) {
+    url = "http://" + url;
+  }
+  return url;
 }
 
 function splitHostname(h) {
 }
 
 function splitHostname(h) {
-    var result = {};
-    var urlParts = new RegExp('([a-z\-0-9]{2,63})\.([a-z\.]{2,5})$').exec(h);
-    result.domain = urlParts[1];
-    result.type = urlParts[2];
-    result.subdomain = h.replace(result.domain + '.' + result.type, '').slice(0, -1);;
-    return result;
-}
\ No newline at end of file
+  var result = {};
+  var urlParts = new RegExp('([a-z\-0-9]{2,63})\.([a-z\.]{2,5})$').exec(h);
+  if (urlParts == null) {
+    console.log("Error formatting link " + h);
+    return "";
+  }
+  result.domain = urlParts[1];
+  result.type = urlParts[2];
+  result.subdomain = h.replace(result.domain + '.' + result.type, '').slice(0, -1);;
+  return result;
+}
index 2f484f1a797bac96fbfa1c099f514c14bf3c8fac..409724a27b5a42829def86f228a4236a90caecbc 100644 (file)
--- a/style.css
+++ b/style.css
-img {
-  float: left;
-  margin-top: 1px;
-  padding-right: 3px;
-}
-
-#search-form > input#search-box:-webkit-autofill {
-  -webkit-box-shadow: 0 0 0 1000px #222 inset !important;
-  -webkit-text-fill-color: #b5b5a4 !important;
-}
-
-#callback {
-  bottom: 0;
-  position: absolute;
-  height: 115px;
-  width: 31.1rem;
-}
-
-#search3 {
-  margin-top: -1.5rem;
-}
-
-#wikires > a {
-  white-space: nowrap;
-  text-overflow: ellipsis;
-  overflow: hidden;
-  margin-bottom: 0.5em;
-  height: 19px;
-  display: block;
-  color: inherit;
-  text-decoration: none;
-}
-
-#duckduckres > a {
-  margin-bottom: 0.5em;
-  display: block;
-  color: inherit;
-  text-decoration: none;
+html, body {
+  font-size: 16px !important;
+  width: 100%;
+  height: 100%;
 }
 
 }
 
-#topsites-list {
-  display: none;
+body {
+  margin: 0;
+  color: #D8DEE9;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
 }
 
 }
 
-#search1.active {
-  margin-bottom: 2em;
+.favorites {
+  display: flex;
+  flex-direction: row;
+  display: -webkit-flex;
+  -webkit-flex-direction: row;
 }
 
 }
 
-#search2.active {
-  margin-top: 2em;
+ul {
+  list-style: none;
+  padding: 0;
+  width: 10rem;
+  margin: 0.5rem 2em 2em 2em;
 }
 
 }
 
-.name {
-  white-space: nowrap;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  width: 63px;
+img {
+  float: left;
+  margin-top: 1px;
+  padding-right: 3px;
 }
 
 }
 
-.url {
-  width: 100px;
+input {
+  font-size: 16px !important;
+  padding: 0;
+  height: 18.5px;
+  width: 112px;
+  margin: 5px;
 }
 
 }
 
-.inp {
-  width: 200px;
-  padding: 10px 0;
+input.name {
+  margin-bottom: 2.5px
 }
 
 }
 
-.inp > input {
-  font-size: 16px !important;
+input.url {
+  margin-top: 2.5px
 }
 
 }
 
-.users-list > ul > li > span {
-  width: 10px;
-  height: 25px;
-  padding: 4px 5px 0 10px;
+.remove {
+/*  width: 9px;
+  height: 29px;
+  padding: 6px 10px 0 10px;*/
+  width: 29px;
+  height: 35px;
+  padding: 0;
   background: #434C5E;
   float: right;
   background: #434C5E;
   float: right;
-  display: none;
+  text-align: center;
+  justify-content: center;
+  align-items: center;
   cursor: pointer;
   cursor: pointer;
-  padding-top: 10px;
-}
-
-.users-list > ul > li > span:hover {
-  background: #BF616A;
+  font-family: monospace;
+  display: flex;
 }
 
 }
 
-.users-list > ul > .inp > a {
-  width: 10px;
-  height: 18px;
-  display: inline-block;
-  background: #434C5E;
-  padding: 3px 6px 3px 3px;
+.save {
+  padding-left: 8px;
+  float: right;
+  height: 60px;
+  width: 21px;
+  display: flex;
+  text-align: center;
+  align-items: center;
   cursor: pointer;
 }
 
   cursor: pointer;
 }
 
-.users-list > ul > .inp > a:hover, .users-list > ul > .inp > a:focus {
+.save:hover, .save:focus, .save:focus-within {
   background: #A3BE8C;
 }
 
   background: #A3BE8C;
 }
 
-.users-list > ul > li:hover > span {
-  display: inline-block;
-}
-
-.users-list > ul > .title:hover > span  {
-  display: inline-block;
-}
-
-.users-list > ul {
-  margin: 0;
+.remove:hover {
+  background: #BF616A;
 }
 
 }
 
-.users-list > ul > .title > span {
+.add {
+  background-color: #434C5E;
   margin-top: 14px;
   margin-top: 14px;
-  font-size: 75% !Important;
-  font-weight: normal;
-  color: black;
-  width: 10px;
-  content: "+";
-  padding: 6px 6px 5px 9px;
-  background: #b5b5a4;
+  width: 29px;
+  height: 29px;
+  padding: 0;
+  justify-content: center;
+  align-items: center;
   float: right;
   display: none;
   cursor: pointer;
 }
 
   float: right;
   display: none;
   cursor: pointer;
 }
 
-.users-list > ul > .title > span {
-  background-color: #434C5E;
-}
-
-.users-list > ul > .title > span:hover {
+.add:hover {
   background-color: #A3BE8C !important;
 }
 
   background-color: #A3BE8C !important;
 }
 
-.users-list > ul > li > a, .users-list > ul > .title > p {
-  width: calc(100% - 45px);
-  display: inline-block;
-}
-
-div#apps {
-  overflow-x: scroll;
+.title:hover > .add {
   display: flex;
   display: flex;
-  width: 907px;
-  align-content: flex-start;
-  justify-content: flex-start;
 }
 
 }
 
-::-webkit-scrollbar
-{
-  width: 12px;  /* for vertical scrollbars */
-  height: 12px; /* for horizontal scrollbars */
-}
-
-::-webkit-scrollbar-track
-{
-  background: rgba(0, 0, 0, 0);
-}
-
-::-webkit-scrollbar-thumb
-{
-  background: rgba(0, 0, 0, 0.2);
-}
-
-li.sortable-chosen.sortable-ghost > a {
-  background-color: white;
-  color: #2A313B !important;
-}
-
-
-.title > p {
-  width: 160px;
-  margin-left: 0.5rem;
-  margin-bottom: 0.5rem !important;
-}
-.app {
-  cursor: pointer;
-  text-align: center;
-  margin: 16px;
-}
-
-.app > .image {
-  width: 64px;
-  padding: 8px;
-}
-
-html, body {
-  font-family: Roboto !important;
-  font-size: 16px !important;
-  width: 100vw;
-  height: 100vh;
-}
-
-body {
-  width: 100%;
-  height: 100%;
-  margin: 0;
-  color: #D8DEE9;
-}
-
-.container {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  justify-content: center;
-  width: 100%;
-  height: 100%;
-}
-
-.favorites {
+.title:hover .add:not(:hover),
+li:hover > .remove:not(:hover) {
   display: flex;
   display: flex;
-  flex-direction: row;
+  background-color: #434c5e;
 }
 
 }
 
-.favorites-list {
-  width: 10rem;
-  margin: 0.5rem 2em 2em 2em;
+li:hover > a, li > a:focus, li > a:focus-within {
+  display: inline-block;
+  background-color: #434c5e;
 }
 
 }
 
-ul {
-  list-style: none;
-  padding: 0;
+li:hover {
+  background-color: #434c5e;
 }
 
 }
 
-.title {
-  margin-bottom: 0.5rem;
-  font-weight: bold;
-  text-align: left;
-  border-bottom: 1px solid #434C5E;
-}
-
-ul > li > a {
+a {
   color: inherit;
   outline: none;
   display: block;
   text-decoration: none;
   padding: 0.5rem;
   color: inherit;
   outline: none;
   display: block;
   text-decoration: none;
   padding: 0.5rem;
+  height: 19px;
 }
 
 }
 
-ul > li > a:hover {
-  background-color: #434C5E;
-}
-
-.search.active {
-  width: 30rem;
-  padding: 0.5rem;
-  border: 1px solid #434C5E;
+.remove:not(:hover) {
+  display: none;
 }
 
 }
 
-#search-box {
-  font-size: inherit;
-  width: 100%;
-  margin: auto;
-  padding: 0;
-  background-color: rgba(0, 0, 0, 0);
-  color: #434C5E;
-  border: none;
+a, ul > .title > p {
+  width: calc(100% - 45px);
+  display: inline-block;
 }
 
 }
 
-#search-box:focus {
-  outline: none;
+li.sortable-chosen.sortable-ghost > a {
+  background-color: white;
+  color: #2A313B !important;
 }
 
 }
 
-
-/* webkit compat */
-
-.container {
-  display: -webkit-flex;
-  -webkit-flex-direction: column;
-  -webkit-align-items: center;
-  -webkit-justify-content: center;
+.title {
+  margin-bottom: 0.5rem;
+  font-weight: bold;
+  text-align: left;
+  border-bottom: 1px solid #434C5E;
 }
 
 }
 
-.favorites {
-  display: -webkit-flex;
-  -webkit-flex-direction: row;
+.title p {
+  width: 160px;
+  margin-left: 0.5rem;
+  margin-bottom: 0.5rem !important;
 }
 }