forked from Dreamer-Paul/Single
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathheader.php
64 lines (64 loc) · 3.12 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>
<head>
<meta charset="UTF-8">
<title><?php $this -> archiveTitle(array(
'category' => _t('%s'),
'search' => _t('含关键词 %s 的文章'),
'tag' => _t('标签 %s 下的文章'),
'author' => _t('%s 发布的文章')
), '', ' - '); $this -> options -> title(); ?></title>
<?php if($this -> options -> favicon): ?>
<link rel="icon" href="<?php $this -> options -> favicon(); ?>" sizes="192x192"/>
<?php else: ?>
<link rel="icon" href="<?php $this -> options -> themeUrl('img/icon.png'); ?>" sizes="192x192"/>
<?php endif; ?>
<link href="<?php $this -> options -> themeUrl('static/kico.css'); ?>" rel="stylesheet" type="text/css"/>
<link href="<?php $this -> options -> themeUrl('static/single.css'); ?>" rel="stylesheet" type="text/css"/>
<link href="<?php $this->options->themeUrl('static/custom.css'); ?>" rel="stylesheet" type="text/css"/>
<link href="<?php $this->options->themeUrl('static/prism.css'); ?>" rel="stylesheet" type="text/css"/>
<link href="https://fastly.jsdelivr.net/npm/[email protected]/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
<meta name="viewport" content="width=device-width, maximum-scale=1, initial-scale=1"/>
<?php if($this -> options -> background): ?>
<style>body:before{content: ''; background-image: url(<?php $this -> options -> background(); ?>)}</style>
<?php endif; ?>
<?php if($this -> options -> custom_css): ?>
<style><?php $this -> options -> custom_css(); ?></style>
<?php endif; ?>
<meta property="og:site_name" content="<?php $this -> options -> title(); ?>">
<meta property="og:title" content="<?php $this -> archiveTitle(array(
'category' => _t('%s'),
'search' => _t('含关键词 %s 的文章'),
'tag' => _t('标签 %s 下的文章'),
'author' => _t('%s 发布的文章')
), ""); ?>"/>
<?php $this -> header('generator=&template=&pingback=&xmlrpc=&wlw='); ?>
</head>
<body <?php Single::is_night($this -> options -> widget_home_category == 1) ?>>
<header>
<div class="head-title">
<h4><?php $this -> options -> title(); ?></h4>
</div>
<div class="head-action">
<div class="toggle-btn"></div>
<div class="light-btn"></div>
<div class="search-btn"></div>
</div>
<form class="head-search" method="post">
<input type="text" name="s" placeholder="搜索什么?">
</form>
<nav class="head-menu">
<a href="<?php $this -> options -> siteUrl(); ?>">首页</a>
<!-- <div class="has-child">
<a>分类</a>
<div class="sub-menu">
<?php $this -> widget('Widget_Metas_Category_List') -> parse('<a href="{permalink}">{name}</a>'); ?>
</div>
</div> -->
<?php $this -> widget('Widget_Contents_Page_List') -> parse('<a href="{permalink}">{title}</a>'); ?>
<?php if($this -> user -> hasLogin()): ?>
<a href="<?php $this -> options -> adminUrl(); ?>" target="_blank">进入后台</a>
<?php endif; ?>
</nav>
</header>