9 Star 21 Fork 6

shrekuu / typecho-bootstrap-theme

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
header.php 4.58 KB
一键复制 编辑 原始数据 按行查看 历史
shrekuu 提交于 2021-12-07 12:54 . 增加 bootstrap js
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<!DOCTYPE HTML>
<html class="no-js">
<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>
<link href="//cdn.staticfile.org/normalize/2.1.3/normalize.min.css" rel="stylesheet" >
<link href="//cdn.staticfile.org/twitter-bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
<!-- 使用url函数转换相关路径 -->
<link rel="stylesheet" href="<?php $this->options->themeUrl('css/style.css'); ?>">
<!--[if lt IE 9]>
<script src="http://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="http://cdn.staticfile.org/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<!-- 通过自有函数输出HTML头部信息 -->
<?php $this->header(); ?>
<style>
/* override the font that is not within the theme but affects the theme
* copied from style.scss
*/
html, body, button, input, select, textarea {
font-family: "Helvetica neue",Helvetica,Tahoma,"lantinghei sc", "Hiragino Sans GB","Microsoft Yahei", sans-serif;
-webkit-font-smoothing: antialiased;
}
</style>
<!-- 目测只能放这了 -->
<script src="//cdn.staticfile.org/jquery/1.12.4/jquery.min.js"></script>
<script src="//cdn.staticfile.org/twitter-bootstrap/3.3.4/js/bootstrap.min.js"></script>
</head>
<body>
<!--[if lt IE 8]>
<div class="browsehappy" role="dialog"><?php _e('当前网页 <strong>不支持</strong> 你正在使用的浏览器. 为了正常的访问, 请 <a href="http://browsehappy.com/">升级你的浏览器</a>'); ?>.</div>
<![endif]-->
<header id="header" class="clearfix">
<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<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" href="<?php $this->options->siteUrl(); ?>"><?php $this->options->title() ?></a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="<?php if($this->is('index')) echo 'active' ?>">
<a href="<?php $this->options->siteUrl(); ?>"><?php _e('首页'); ?></a>
</li>
<?php $this->widget('Widget_Contents_Page_List')->to($pages); ?>
<?php while($pages->next()): ?>
<li class="<?php echo $this->is('page', $pages->slug)?'active':'' ?>">
<a href="<?php $pages->permalink(); ?>" title="<?php $pages->title(); ?>"><?php $pages->title(); ?></a>
</li>
<?php endwhile; ?>
</ul>
<form class="navbar-form navbar-right" role="search" method="post" action="./">
<div class="input-group">
<label for="s" class="sr-only"><?php _e('搜索关键字'); ?></label>
<input type="text" name="s" class="form-control" placeholder="<?php _e('输入关键字搜索'); ?>">
<span class="input-group-btn">
<button type="submit" class="submit btn btn-default" title="<?php _e('搜索'); ?>"><i class="glyphicon glyphicon-search"></i></button>
</span>
</div>
</form>
</div><!-- /.navbar-collapse -->
</div><!-- /.container -->
</nav>
</header><!-- end #header -->
<div id="body">
<div class="container-fluid">
<div class="row">
1
https://gitee.com/shrekuu/typecho-bootstrap-theme.git
git@gitee.com:shrekuu/typecho-bootstrap-theme.git
shrekuu
typecho-bootstrap-theme
typecho-bootstrap-theme
master

搜索帮助