This repository has been archived by the owner on Nov 30, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
header.php
64 lines (63 loc) · 3.75 KB
/
header.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<!DOCTYPE HTML>
<html class="hola-html-reset hola-var">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta charset="<?php $this->options->charset(); ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
<!--默认使用极速内核:针对国内浏览器产商-->
<meta name="renderer" content="webkit">
<title><?php if ($this->is('index')){$this->options->title();}elseif($this->is('page')){$this->archiveTitle('','',' - ');$this->options->title();}elseif($this->is('category')){$this->archiveTitle('','',' - ');$this->options->title();}elseif($this->is('tag')){$this->archiveTitle('','Tag: ',' - ');$this->options->title();}elseif($this->is('archive')){$this->archiveTitle('年','存档: ','月 - ');$this->options->title();}else{$this->archiveTitle('','','');}?></title>
<?php if ($this->options->favicon) { ?><link rel="icon" href="<?php $this->options->favicon(); ?>" /><?php } ?>
<?php if ($this->options->iosicon) { ?><link rel="apple-touch-icon" href="<?php $this->options->iosicon(); ?>"><?php } ?>
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/2.10.0/github-markdown.min.css">
<link rel="stylesheet" href="<?php $this->options->themeUrl('/assets/css/holakit.css?v=1'); ?>">
<link rel="stylesheet" href="<?php $this->options->themeUrl('/assets/css/style.min.css?v=2'); ?>">
<link rel="stylesheet" href="<?php $this->options->themeUrl('/assets/css/font-awesome/css/font-awesome.min.css'); ?>">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/data-tip.css">
<script src="https://cdn.bootcss.com/twemoji/2.7.0/twemoji.min.js"></script>
<style>
.markdown-body {
box-sizing: border-box;
min-width: 200px;
max-width: 980px;
margin: 0 auto;
padding: .6rem .0rem;
}
@media (max-width: 767px) {
.markdown-body {
padding: .4rem .0rem;
}
}
<?php $this->options->header_css(); ?>
.hola-var, :root {
<?php if ($this->options->primary_color) { ?>
--hola-primary-color: <?php $this->options->primary_color() ?>
<?php } ?>
}
</style>
<?php $this->options->header_code(); ?>
<?php if (!$this->is('index') && !empty($this->options->post_show) && in_array('code_light', $this->options->post_show)) { ?><link rel="stylesheet" type="text/css" href="<?php $this->options->themeUrl('/assets/css/Prism/prism.css?v=1'); ?>" /><script src="<?php $this->options->themeUrl('/assets/js/Prism/prism.js?v=1'); ?>" type="text/javascript"></script><?php } ?>
<?php $this->header(); ?>
</head>
<body class="hola-body-typography hola-grey-bg">
<div id="container">
<?php if ($this->is('index')) { ?>
<header class="hola-navbar hola-navbar-transparent hola-navbar-darkbg">
<?php }else{ ?>
<header class="hola-navbar hola-navbar-white hola-navbar-lightbg">
<?php } ?>
<div class="hola-container">
<nav class="hola-navbar-main">
<a href="<?php $this->options->siteUrl(); ?>" class="hola-navbar-brand"><?php $this->options->title() ?></a>
</nav>
<input type="checkbox" class="hola-navbar-toggle" id="navbar-toggle">
<label for="navbar-toggle" class="hola-navbar-toggle-label"></label>
<nav class="hola-navbar-sub">
<a href="<?php $this->options->siteUrl(); ?>">首页</a>
<?php $this->widget('Widget_Contents_Page_List')
->parse('<a href="{permalink}">{title}</a>'); ?>
</nav>
</div>
</header>