mirror of
https://github.com/suk-ws/ph-Bookshelf.git
synced 2025-01-19 15:25:03 +08:00
Eyre_S
f79060f32f
- support page config define in front matter - support `title`, which can set HTML title. - if `title` is not set, then HTML title will try find page title defined in book.xml - if `title` is set but <h1> title not set, it will generated a <h1> title using the value of `title` - support `configurations` which can set page level configs here. - now can open page that has .md file but not defined in book.xml (must in a book defined) - old.title.gen is not supported yet.
40 lines
1.5 KiB
PHP
40 lines
1.5 KiB
PHP
<?php use SukWs\Bookshelf\Data\SiteConfig\ConfigName; ?>
|
|
<?php use SukWs\Bookshelf\Data\SiteMeta; ?>
|
|
<?php use SukWs\Bookshelf\Data\PageMeta; ?>
|
|
<!DOCTYPE HTML>
|
|
<html lang="<?= "" // TODO Page language ?>">
|
|
<head>
|
|
<!-- Static Meta -->
|
|
<meta charset="UTF-8">
|
|
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
|
<meta name="HandheldFriendly" content="true" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
<meta name="generator" content="<?= SiteMeta::get_frontpage_generate_version() ?>">
|
|
<!-- Page Meta -->
|
|
<link rel="shortcut icon" href="<?= SiteMeta::getGlobalIcon() ?>">
|
|
<title><?= PageMeta::getHtmlTitle() ?></title>
|
|
<meta name="description" content="<?= PageMeta::getDescription() ?>">
|
|
<!-- Assets(css) --><?php
|
|
foreach (SiteMeta::getStylesheetsList() as $item) {
|
|
if ($item==null) continue;
|
|
echo "\n\t\t";
|
|
echo "<link rel=\"stylesheet\" href=\"$item\">";
|
|
}
|
|
echo "\n";
|
|
?>
|
|
<!-- Customs(css) -->
|
|
<style>
|
|
:root {
|
|
--bcm-color-codeblock-background: <?= PageMeta::getConfigurationLevelPage(ConfigName::codeblock_bg) ?>;
|
|
--bcm-color-codeblock-foreground: <?= PageMeta::getConfigurationLevelPage(ConfigName::codeblock_fg) ?>;
|
|
}
|
|
pre code {
|
|
tab-size: <?= PageMeta::getConfigurationLevelPage(ConfigName::codeblock_tab_size) ?>;
|
|
}
|
|
</style>
|
|
<style><?= SiteMeta::getCustomCssContent("custom") ?></style>
|
|
</head>
|
|
<body>
|