add footer

This commit is contained in:
Bruno Rybársky 2024-02-06 17:09:28 +01:00
parent 4a8c122645
commit e495c31ed5
3 changed files with 7 additions and 0 deletions

@ -127,6 +127,8 @@ function getPage($site_name_in = null, $page_name_in = null): string
$skeleton = file_get_contents($routerConfig["template_dir"] . "skeleton.html");
$footer = file_get_contents($routerConfig["template_dir"] . "footer.html");
if(!empty($pageMetadata["parameters"]["page_title"])){
$page_title = $pageMetadata["parameters"]["page_title"];
}
@ -146,6 +148,7 @@ function getPage($site_name_in = null, $page_name_in = null): string
$out = $skeleton;
$out = str_replace("__TEMPLATE__NAV__", $navigation, $out);
$out = str_replace("__TEMPLATE__PAGE__", $page, $out);
$out = str_replace("__TEMPLATE__FOOTER__", $footer, $out);
$out = str_replace("__TEMPLATE__DYNAMIC__SCRIPT__", $dynamic_script, $out);
$out = str_replace("__TEMPLATE__DYNAMIC__STYLE__", $dynamic_style, $out);
if($routerConfig["inlining"]) {

1
templates/footer.html Normal file

@ -0,0 +1 @@
<p>Toto nie je oficiálna stránka Adlerky, jedná sa o neoficiálnu študentskú stránku</p>

@ -18,5 +18,8 @@
<div id="pagearea">
__TEMPLATE__PAGE__
</div>
<div id="footer">
__TEMPLATE__FOOTER__
</div>
</body>
</html>