mirror of
https://github.com/wassname/template.git
synced 2026-07-14 11:18:56 +08:00
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:
+5
-1
@@ -120,7 +120,11 @@ export const Controller = {
|
||||
|
||||
const interstitial = document.querySelector('d-interstitial');
|
||||
if (interstitial) {
|
||||
interstitial.password = frontMatter.password;
|
||||
if (typeof frontMatter.password !== 'undefined') {
|
||||
interstitial.password = frontMatter.password;
|
||||
} else {
|
||||
interstitial.parentElement.removeChild(interstitial);
|
||||
}
|
||||
}
|
||||
|
||||
const prerendered = document.body.hasAttribute('distill-prerendered');
|
||||
|
||||
Reference in New Issue
Block a user