summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
62b5ff3)
Introduce $Page->head for html head output.
Allows editor setup before running other javascript.
<?php } ?>
<meta property="og:type" content="<?= $Page->meta['og:type'] ?? 'website' ?>" />
<meta property="og:url" content="https://<?= $_SERVER['HTTP_HOST'] . '/' . htmlspecialchars($Page->link) ?>" />
<?php } ?>
<meta property="og:type" content="<?= $Page->meta['og:type'] ?? 'website' ?>" />
<meta property="og:url" content="https://<?= $_SERVER['HTTP_HOST'] . '/' . htmlspecialchars($Page->link) ?>" />
+<?php if (isset($Page->head)) print $Page->head; ?>
+if ($User and $User->admin("edit {$Page->link}")) {
+ $ckesrc = '/lib/ckeditor'; # local install
+ if (!file_exists(DOCROOT . $ckesrc)) {
+ $ckesrc = '//cdn.ckeditor.com/4.15.1/full-all'; # remote fallback
+ }
+ ob_start();
+ printf("<script>var ckesrc = '%s'</script>\n", "$ckesrc/ckeditor.js");
+ print '<script src="/edit/page.js"></script>'."\n";
+ $Page->head = ob_get_clean();
+}
+
include_once 'head.inc.php';
print "<header>\n";
include_once 'head.inc.php';
print "<header>\n";
print '<footer>';
@include 'footer.inc.html';
print "</footer>\n";
print '<footer>';
@include 'footer.inc.html';
print "</footer>\n";
-
- global $User, $Page;
- if ($User and $User->admin("edit {$Page->link}")) {
- $ckesrc = '/lib/ckeditor'; # local install
- if (!file_exists(DOCROOT . $ckesrc)) {
- $ckesrc = '//cdn.ckeditor.com/4.15.1/full-all'; # remote fallback
- }
- printf("<script>var ckesrc = '%s'</script>\n", "$ckesrc/ckeditor.js");
- print '<script src="/edit/page.js"></script>'."\n";
- }
-
print "</body></html>\n";
});
print "</body></html>\n";
});