Add interstitial splash screen for use with in-review posts on drafts.distill.pub

This commit is contained in:
Ludwig Schubert
2017-10-02 17:10:20 -07:00
parent e6202c5442
commit db254c3366
5 changed files with 144 additions and 15 deletions
+7
View File
@@ -10,6 +10,13 @@
export default function(dom, data) {
const article = dom.querySelector('d-article');
let interstitial = dom.querySelector('d-interstitial');
if (!interstitial && data.password) {
interstitial = dom.createElement('d-interstitial');
interstitial.password = data.password;
dom.body.insertBefore(interstitial, article);
}
let h1 = dom.querySelector('h1');
if (h1) {
if (!data.title) {