diff --git a/asset/style.css b/asset/style.css index f3aa370..81a3ae6 100644 --- a/asset/style.css +++ b/asset/style.css @@ -35,7 +35,7 @@ body { padding:20px; min-height:2.4em; float:left; - + box-sizing: border-box; } .grid-item:hover { background:#bbb; diff --git a/logic/main.js b/logic/main.js index c828131..fad4549 100644 --- a/logic/main.js +++ b/logic/main.js @@ -26,10 +26,10 @@ function Main() this.start = function() { - this.load(window.document.location.hash == "" ? 'Home' : window.document.location.hash); + this.load(window.document.location.hash == "" ? 'home' : window.document.location.hash); } - this.load = function(target = "Home") + this.load = function(target = "home") { target = target.substr(0,1) == "#" ? target.substr(1,target.length-1) : target target = target.trim() == "" ? "home" : target @@ -48,7 +48,9 @@ function Main() { console.log('home'); + this.grid.innerHTML = ''; this.displayEntries(this.database); + this.msnry.reloadItems(); this.msnry.layout(); console.log(this.database); @@ -79,6 +81,7 @@ function Main() this.grid.innerHTML = ''; this.displayEntries(tempDatabase); + this.msnry.reloadItems(); this.msnry.layout(); } else if (splitTarget[0] == 'type') @@ -259,6 +262,7 @@ function Main() entry += ``; this.grid.innerHTML += entry; + // this.msnry.appended( entry ); } // this.doPagination = function()