1
0
mirror of https://github.com/suk-ws/ph-Bookshelf.git synced 2025-01-19 07:22:26 +08:00
ph-Bookshelf/template/header.php
Eyre_S e4db1984b9
支持了 gitbook 字体主题切换,修复 git 的二进制换行符问题
- 修复(重写)了 gitbook 字体主题的切换面板
- 添加了字体主题的 cookie 储存(默认30天过期)
- 为添加的元素新增了主题颜色的支持
  - 同时修复了“搜索框”的主题不匹配问题
- 修改 .gitattributes 使其能够正常识别 PNG 图片和常见字体文件(ttf,otf,woff&2)为二进制文件
2021-05-27 16:22:48 +08:00

31 lines
1.4 KiB
PHP

<?php require_once "./src/Data/SiteMeta.php" ?>
<?php require_once "./src/Data/PageMeta.php" ?>
<!DOCTYPE HTML>
<html lang="<?= "" // TODO Page language ?>">
<head>
<!-- Gitbook Meta -->
<meta charset="UTF-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="HandheldFriendly" content="true" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<!-- Page Meta -->
<link rel="shortcut icon" href="<?= SiteMeta::getGlobalIcon() ?>" type="image/x-icon">
<!-- Unused: <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png"> -->
<title><?= PageMeta::getPageTitle() ?></title>
<meta name="description" content="<?= PageMeta::getDescription() ?>">
<meta name="generator" content="<?= SiteMeta::get_frontpage_generate_version() ?>">
<!-- Gitbook Assets(css) -->
<?php
foreach (SiteMeta::getGitbookStylesheetsList() as $item) {
echo "<link rel=\"stylesheet\" href=\"$item\">";
}
?>
<!-- Customs(css) -->
<style><?= SiteMeta::getCustomCssContent("custom") ?></style>
</head>
<body>
<div class="book <?= SiteMeta::getUserThemes() ?>">