forked from daixl2010/Typecho-Nesoft-Theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
executable file
·91 lines (90 loc) · 4.17 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! -->
<meta charset="<?php $this->options->charset(); ?>">
<meta name="renderer" content="webkit">
<title><?php $this->archiveTitle(array(
'category' => _t('分类 %s 下的文章'),
'search' => _t('包含关键字 %s 的文章'),
'tag' => _t('标签 %s 下的文章'),
'author' => _t('%s 发布的文章')
), '', ' - '); ?><?php $this->options->title(); ?></title>
<!-- 使用url函数转换相关路径 -->
<link rel="stylesheet" href="<?php $this->options->themeUrl('inc/bootstrap/css/bootstrap.min.css'); ?>">
<link rel="stylesheet" href="<?php $this->options->themeUrl('inc/font-awesome/css/font-awesome.min.css'); ?>">
<link rel="stylesheet" href="<?php $this->options->themeUrl('style.css'); ?>">
<?php if($this->options->seo_zdts) : ?>
<?php echo $this->options->seo_zdts; ?>
<?php endif; ?>
<?php if($this->options->seo_analysis_yb) : ?>
<?php echo $this->options->seo_analysis_yb; ?>
<?php endif; ?>
<!-- 通过自有函数输出HTML头部信息 -->
<?php $this->header(); ?>
</head>
<header id="header" class="clearfix">
<div class="container header-main">
<nav class="navigation_mobile navigation_mobile_main">
<div class="navigation_mobile_click"><i class="fa fa-align-justify"></i></div>
<ul></ul>
</nav><!-- End navigation_mobile -->
<div class="site-name">
<a id="logo" href="<?php $this->options->siteUrl(); ?>">
<?php if ($this->options->logoUrl): ?>
<img src="<?php $this->options->logoUrl() ?>" alt="<?php $this->options->title() ?>" />
<?php endif; ?>
<?php $this->options->title() ?>
</a>
</div>
<nav id="nav-menu" class="navigation" role="navigation">
<ul class="nav navbar-nav">
<li<?php if($this->is('index')): ?> class="active"<?php endif; ?>><a href="<?php $this->options->siteUrl(); ?>"><?php _e('首页'); ?></a></li>
<?php $this->widget('Widget_Metas_Category_List')->to($category); ?>
<?php while($category->next()): ?>
<?php if(count($category->children)):?>
<li class="dropdown">
<a href="<?php $category->permalink(); ?>" data-target="#" class="dropdown-toggle" data-toggle="dropdown">
<?php echo $category->name?>
<b class="caret"></b></a>
<ul class="dropdown-menu">
<?php foreach($category->children as $k=>$v):?>
<li><a href="<?php echo $v['permalink'] ?>"><?php echo $v['name'] ?></a></li>
<?php endforeach; ?>
</ul>
</li>
<?php else:?>
<?php if($category->levels == 0):?>
<li
<?php if ($this->is('category', $category->slug)): ?>
class="active"
<?php endif; ?> style="<?php print_r($category->children) ?> ">
<a href="<?php $category->permalink(); ?>" title="<?php $category->name(); ?>">
<?php $category->name(); ?>
</a>
</li>
<?php endif;?>
<?php endif;?>
<?php endwhile; ?>
<?php $this->widget('Widget_Contents_Page_List')->to($pages); ?>
<?php while($pages->next()): ?>
<li><a<?php if($this->is('page', $pages->slug)): ?> class="current"<?php endif; ?> href="<?php $pages->permalink(); ?>" title="<?php $pages->title(); ?>"><?php $pages->title(); ?></a></li>
<?php endwhile; ?>
</ul>
</nav>
<div class="site-search">
<form id="search" method="post" action="./" role="search">
<label for="s" class="sr-only"><?php _e('搜索关键字'); ?></label>
<input type="text" name="s" class="text" placeholder="<?php _e('输入关键字搜索'); ?>" />
<button type="submit" class="submit"><?php _e('搜索'); ?></button>
</form>
</div>
<div class="notice">
<strong class="global_notice"><i class="fa fa-volume-up"></i></strong>
<?php echo $this->options->global_notice; ?>
</div>
</div>
</header><!-- end #header -->