This repository has been archived by the owner on Feb 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
header.php
93 lines (89 loc) · 4.97 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
92
<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
<meta charset="<?php $this->options->charset(); ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title><?php $this->archiveTitle(array(
'category' => _t('分类 %s 下的文章'),
'search' => _t('包含关键字 %s 的文章'),
'tag' => _t('标签 %s 下的文章'),
'author' => _t('%s 发布的文章')
), '', ' - '); ?><?php $this->options->title(); ?></title>
<?php if ($this->options->siteIcon): ?>
<link rel="Shortcut Icon" href="<?php $this->options->siteIcon() ?>" />
<link rel="Bootmark" href="<?php $this->options->siteIcon() ?>" />
<?php endif; ?>
<?php $this->header(); ?>
<link rel="stylesheet" href="<?php $this->options->themeUrl('css/bootstrap.min.css'); ?>">
<link rel="stylesheet" href="<?php $this->options->themeUrl('css/material.min.css'); ?>">
<link rel="stylesheet" href="<?php $this->options->themeUrl('css/ripples.min.css'); ?>">
<link rel="stylesheet" href="<?php $this->options->themeUrl('css/roboto.min.css'); ?>">
<link rel="stylesheet" href="<?php $this->options->themeUrl('css/customs.css'); ?>">
<!-- 将您的favicon图标放在主题目录下的img文件夹下,然后取消下面两句的注释 -->
<link rel="icon" type="image/x-icon" href="<?php $this->options->themeUrl('img/favicon.ico'); ?>">
<link rel="shortcut icon" type="image/x-icon" href="<?php $this->options->themeUrl('img/favicon.ico'); ?>">
<link rel="apple-touch-icon" type="image/x-icon" href="<?php $this->options->themeUrl('img/icon.png'); ?>">
</head>
<header>
<div class="navbar navbar-fixed-top navbar-inverse">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" id="logo" href="<?php $this->options->siteUrl(); ?>"><?php $this->options->title() ?></a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav">
<li<?php if($this->is('index')): ?> class="active"<?php endif; ?>><a href="<?php $this->options->siteUrl(); ?>"><span class="glyphicon glyphicon-fire" aria-hidden="true"></span> <?php $this->options->title() ?></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">
<li><a href="<?php echo $category->permalink(); ?>"><?php echo $category->name ?></a></li>
<?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<?php if($this->is('page', $pages->slug)): ?> class="active"<?php endif; ?>><a href="<?php $pages->permalink(); ?>" title="<?php $pages->title(); ?>"><?php $pages->title(); ?></a></li>
<?php endwhile; ?>
</ul>
<?php if ( !empty($this->options->misc) && in_array('ShowLogin', $this->options->misc) ) : ?>
<ul class="nav navbar-nav navbar-right">
<?php if($this->user->hasLogin()): ?>
<li><a href="<?php $this->options->adminUrl(); ?>"><?php $this->user->screenName(); ?></a></li>
<li><a href="<?php $this->options->logoutUrl(); ?>">Logout</a></li>
<?php else: ?>
<li><a href="<?php $this->options->adminUrl('login.php'); ?>">登录</a></li>
<?php endif; ?>
</ul>
<?php endif; ?>
</div>
</div>
</div>
</header>