sky/header.php

159 lines
8.1 KiB
PHP
Raw Normal View History

2021-07-25 09:12:40 +08:00
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="<?php $this->options->charset(); ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title><?php $this->archiveTitle(array(
'category' => '分类 %s 下的文章',
'search' => '包含关键字 %s 的文章',
'tag' => '标签 %s 下的文章',
'author' => '%s 发布的文章'
2021-07-25 09:12:40 +08:00
), '', ' - '); ?><?php $this->options->title(); ?></title>
2021-08-30 21:39:25 +08:00
<link rel="apple-touch-icon" href="<?php $this->options->logoUrl() ?>">
<link rel="shortcut icon" href="<?php $this->options->themeUrl('/assets/favicon.ico')?>" />
<link rel="bookmark" href="<?php $this->options->themeUrl('/assets/favicon.ico')?>" type="image/x-icon"/>
2021-07-25 09:12:40 +08:00
<!-- FontAwesome Icons -->
2021-11-11 23:21:35 +08:00
<link href="//cdn.staticfile.org/font-awesome/5.15.3/css/all.css" rel="stylesheet">
2021-09-25 09:41:04 +08:00
2021-07-25 09:12:40 +08:00
<!-- JS: jQuery & popper & bootstrap -->
2021-09-25 09:41:04 +08:00
<!-- <script src="<?php #$this->options->themeUrl('/assets/js/core/jquery.min.js');?>"></script> -->
2021-11-11 23:21:35 +08:00
<script src="//cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js"></script>
2021-07-25 09:12:40 +08:00
<script src="<?php $this->options->themeUrl('/assets/js/core/popper.min.js');?>"></script>
2021-09-25 09:41:04 +08:00
<!-- <script src="<?php #$this->options->themeUrl('/assets/js/core/bootstrap.min.js');?>"></script> -->
2021-11-11 23:21:35 +08:00
<script src="//cdn.jsdelivr.net/npm/bootstrap@4.3.1/dist/js/bootstrap.min.js"></script>
2021-07-25 09:12:40 +08:00
2021-09-25 09:41:04 +08:00
<!-- lately.js -->
<script src="<?php $this->options->themeUrl('/assets/js/lately.js');?>"></script>
2021-08-04 20:25:56 +08:00
2021-09-25 09:41:04 +08:00
<!-- Argon Theme CSS & JS-->
<link type="text/css" href="<?php $this->options->themeUrl('/assets/css/argon-design-system.css')?>" rel="stylesheet">
2021-07-25 09:12:40 +08:00
<script src="<?php $this->options->themeUrl('/assets/js/argon-design-system.min.js');?>"></script>
2021-09-25 09:41:04 +08:00
<!-- Sky CSS-->
<link type="text/css" href="<?php $this->options->themeUrl('/assets/style.css')?>" rel="stylesheet">
2021-07-25 09:12:40 +08:00
<!-- Highlight.js via jsDelivr -->
2021-11-11 23:21:35 +08:00
<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@latest/build/styles/atom-one-dark.min.css">
<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@latest/build/highlight.min.js"></script>
2021-07-25 09:12:40 +08:00
<script>hljs.highlightAll();</script>
2021-09-24 21:40:14 +08:00
<!-- Darkreader.js via jsDelivr -->
2021-11-11 23:21:35 +08:00
<script src="//cdn.jsdelivr.net/npm/darkreader@latest/darkreader.min.js"></script>
2021-09-24 21:40:14 +08:00
<script>DarkReader.auto({brightness:100, contrast:90, sepia:10});</script>
2021-10-22 18:50:52 +08:00
<!-- KaTeX css via jsDelivr-->
2021-11-11 23:21:35 +08:00
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/katex@latest/dist/katex.min.css">
2021-10-22 18:50:52 +08:00
<!-- fancybox js&css via jsDelivr-->
<script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css">
<?php $this->options->headerCode(); ?>
2021-12-03 14:39:05 +08:00
<style><?php $this->options->cutsomCSS(); ?></style>
2021-07-25 09:12:40 +08:00
<?php $this->header(); ?>
</head>
<!--[if lt IE 8]>
当前网页不支持你正在使用的浏览器。为了正常访问, 请升级你的浏览器!
2021-07-25 09:12:40 +08:00
<![endif]-->
<body>
2021-09-24 18:51:43 +08:00
<?php if ($this->user->hasLogin()): ?>
<nav class="container fixed-bottom p-2 navbar navbar-light">
<div>
欢迎,<a href="<?php $this->options->profileUrl(); ?>"><?php $this->user->screenName(); ?></a>
<?php if ($this->is('post')): ?>
<a class="badge badge-primary ml-1 mr-1" href="<?php $this->options->siteUrl();?>admin/write-post.php?cid=<?php $this->cid();?>" title="Edit">
<i class="far fa-edit"></i>编辑此文
2021-09-24 18:51:43 +08:00
</a>
<?php endif; ?>
<?php if ($this->is('page')): ?>
2021-09-24 22:48:39 +08:00
<a class="badge badge-primary ml-1 mr-1" href="<?php $this->options->siteUrl();?>admin/write-page.php?cid=<?php $this->cid();?>" title="Edit">
<i class="far fa-edit"></i>编辑此页
2021-09-24 18:51:43 +08:00
</a>
<?php endif; ?>
2021-11-17 15:41:40 +08:00
<a class="badge badge-default ml-1 mr-1" href="<?php $this->options->siteUrl('admin/manage-posts.php?status=draft'); ?>" title="Drafts">
<i class="far fa-edit"></i>草稿箱
2021-11-17 15:41:40 +08:00
</a>
2021-09-24 18:51:43 +08:00
<a class="badge badge-default ml-1 mr-1" href="<?php $this->options->siteUrl('admin'); ?>" title="Backstage">
<i class="fas fa-user-cog"></i>网站后台
2021-09-24 18:51:43 +08:00
</a>
<a class="badge badge-default ml-1 mr-1" href="<?php $this->options->siteUrl('admin/options-theme.php'); ?>" title="Settings">
<i class="far fa-cog"></i>主题设置
2021-09-24 18:51:43 +08:00
</a>
2021-11-17 15:41:40 +08:00
<a class="badge badge-secondary ml-1 mr-1" href="#" onclick="javascript:location.reload();" title="Refresh">
<i class="fas fa-redo"></i>刷新
2021-09-24 18:51:43 +08:00
</a>
2021-11-17 15:41:40 +08:00
<a class="badge badge-secondary ml-1 mr-1" href="<?php $this->options->logoutUrl(); ?>" title="Logout">
<i class="fas fa-sign-out-alt"></i>退出
2021-09-24 18:51:43 +08:00
</a>
</div>
</nav>
<?php endif; ?>
2021-07-25 09:12:40 +08:00
<header id="header" class="clearfix mt-5 mb-4">
<div class="container">
<div class="row">
<div class="col">
2021-07-25 09:12:40 +08:00
<div class="text-center">
<img src="<?php $this->options->logoUrl() ?>" class="site-avatar shadow rounded-circle mx-auto d-block" alt="<?php $this->options->title() ?>" width=128 height=128>
<h2 class="mt-3 font-weight-bold text-default"><?php $this->options->title() ?></h2>
<p class="description"><?php $this->options->description() ?></p>
</div>
</div>
</div><!-- end .row -->
</div>
</header><!-- end #header -->
2021-09-28 20:44:33 +08:00
<nav class="container navbar navbar-light navbar-expand-lg sticky-top">
<a></a> <!-- 十分简陋的处理方式 -->
2021-08-09 22:57:24 +08:00
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
<i class="fa fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="collapsibleNavbar">
2021-09-28 20:44:33 +08:00
<div class="navbar-collapse-header">
<div class="row">
<div class="col-6 collapse-brand">Menu</div>
<div class="col-6 collapse-close">
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#collapsibleNavbar" aria-controls="collapsibleNavbar" aria-expanded="true" aria-label="Toggle navigation">
<!-- Argon 里默认用两根竖线拼成 × 符号,默认这里的元素会被旋转 45 -->
<i class="fas fa-times" style="transform: none"></i>
</button>
</div>
</div>
</div>
2021-08-04 20:47:28 +08:00
<ul class="col navbar-nav justify-content-center pr-0">
2021-07-25 09:12:40 +08:00
<li class="nav-item">
2021-08-01 22:02:11 +08:00
<a class="nav-link nav-link-icon <?php if ($this->is('index')){echo 'text-default';}else{echo 'text-gray';}?>" href="<?php $this->options->siteUrl();?>">
<i class="fa fa-home"></i> 首页
2021-07-25 09:12:40 +08:00
</a>
</li>
<?php if (strpos($this->options->frontPage, 'file') !== FALSE) {?>
<li class="nav-item">
2021-08-02 20:51:33 +08:00
<a class="nav-link nav-link-icon <?php if ($this->is('archive')){echo 'text-default';}else{echo 'text-gray';}?>" href="<?php echo $this->options->siteUrl.$this->options->routingTable['archive']['url'] ?>">
<i class="fa fa-book"></i> 文章
2021-07-25 09:12:40 +08:00
</a>
</li>
<?php } ?>
<?php $this->widget('Widget_Contents_Page_List')->to($pagelist);
while ($pagelist->next()): ?>
<li class="nav-item">
2021-08-01 22:02:11 +08:00
<a class="nav-link nav-link-icon <?php if ($this->is('page', $pagelist->slug)){echo 'text-default';}else{echo 'text-gray';}?>" href="<?php echo $pagelist->permalink ?>">
2021-07-25 09:12:40 +08:00
<?php if ($pagelist->fields->pageIcon != '') {?>
2021-08-04 21:39:46 +08:00
<i class="<?php echo $pagelist->fields->pageIcon ?>"></i>
2021-07-25 09:12:40 +08:00
<?php } ?>
<?php echo $pagelist->title ?>
</a>
</li>
<?php endwhile;?>
</ul>
</div>
</nav>
<div id="body">
<div class="container">
<div class="row">