Improve interstitial behavior

Remove if no password during pre-render
Remove if no password during onFrontMatterChanged
Remove self if on production host
This commit is contained in:
Ludwig Schubert
2018-03-06 16:13:05 -08:00
parent 0bc2ce69da
commit 7ff8796266
3 changed files with 37 additions and 9 deletions
+2
View File
@@ -50,6 +50,8 @@ export default function(dom, data) {
interstitial.password = data.password;
body.insertBefore(interstitial, body.firstChild);
}
} else if (!hasPassword && interstitial) {
interstitial.parentElement.removeChild(this);
}
let appendix = dom.querySelector('d-appendix');