mirror of
https://github.com/wassname/template.git
synced 2026-07-06 03:09:56 +08:00
Add interstitial splash screen for use with in-review posts on drafts.distill.pub
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user