upload all
This commit is contained in:
161
config/header.php
Normal file
161
config/header.php
Normal file
@@ -0,0 +1,161 @@
|
||||
<?php
|
||||
/**
|
||||
|
||||
_ _ __ _ ____ _ _ ___
|
||||
/ \ | |/ / / \ / ___|| | | |_ _|
|
||||
/ _ \ | ' / / _ \ \___ \| |_| || |
|
||||
/ ___ \| . \ / ___ \ ___) | _ || |
|
||||
/_/ \_\_|\_\/_/ \_\____/|_| |_|___|
|
||||
|
||||
* [Romanticism]
|
||||
* header.php 页首文件
|
||||
* @version 2.1
|
||||
* @link https://imakashi.eu.org/
|
||||
**/
|
||||
?>
|
||||
|
||||
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit;
|
||||
// 仅抑制通知和不重要的警告,保留重要错误
|
||||
error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR);
|
||||
?>
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="zh-CN" class="no-js">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
|
||||
<meta name="renderer" content="webkit"/>
|
||||
<meta name="force-rendering" content="webkit"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||
|
||||
<meta name="copyright" content="Copyright(C)<?php echo date('Y');?> <?php $this->options->title() ?>"/>
|
||||
<meta name="author" content="<?php $this->author(); ?>"/>
|
||||
<!-- SEO优化标签 -->
|
||||
<?php if($this->is('index')): ?>
|
||||
<meta name="description" content="<?php $this->options->description() ?>" />
|
||||
<meta name="keywords" content="<?php $this->options->keywords() ?>" />
|
||||
<?php elseif($this->is('post') || $this->is('page')): ?>
|
||||
<meta name="description" content="<?php $this->description(); ?>" />
|
||||
<meta name="keywords" content="<?php $this->keywords(', '); ?>" />
|
||||
<?php endif; ?>
|
||||
<?php if($this->is('post')): ?>
|
||||
<meta property="og:title" content="<?php $this->title() ?>" />
|
||||
<meta property="og:description" content="<?php $this->description(); ?>" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:url" content="<?php $this->permalink() ?>" />
|
||||
<?php endif; ?>
|
||||
<meta name="TypechoTemplateInfo" content="Creator: Akashi Nishikata; Link: imakashi.eu.org; Release: 2025-02">
|
||||
|
||||
<!-- 通过自有函数输出HTML头部信息 -->
|
||||
<?php $this->header(); ?>
|
||||
|
||||
<link href="<?php $this->options->AKAROMsign(); ?>" rel="icon" type="image/x-icon"><!--图标-->
|
||||
|
||||
<!-- 使用更可靠的字体CDN并添加预加载 -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;900&display=swap" rel="stylesheet">
|
||||
|
||||
<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('config/mdui/css/mdui.min.css'); ?>">
|
||||
<link rel="stylesheet" href="<?php $this->options->themeUrl('config/style/romanticism.aka.css?v=2.1'); ?>">
|
||||
<!-- 延迟加载非关键CSS -->
|
||||
<link rel="preload" href="<?php $this->options->themeUrl('config/style/prism.highlight.css'); ?>" as="style" onload="this.onload=null;this.rel='stylesheet'">
|
||||
<noscript><link rel="stylesheet" href="<?php $this->options->themeUrl('config/style/prism.highlight.css'); ?>"></noscript>
|
||||
<link rel="preload" href="<?php $this->options->themeUrl('config/style/jquery.fancybox.css'); ?>" as="style" onload="this.onload=null;this.rel='stylesheet'">
|
||||
<noscript><link rel="stylesheet" href="<?php $this->options->themeUrl('config/style/jquery.fancybox.css'); ?>"></noscript>
|
||||
<link rel="stylesheet" href="<?php $this->options->themeUrl('config/style/icon.aka.css'); ?>">
|
||||
<link rel="preload" href="<?php $this->options->themeUrl('config/style/OwO.css'); ?>" as="style" onload="this.onload=null;this.rel='stylesheet'">
|
||||
<noscript><link rel="stylesheet" href="<?php $this->options->themeUrl('config/style/OwO.css'); ?>"></noscript>
|
||||
|
||||
<!-- CSS加载回退脚本 -->
|
||||
<script>
|
||||
!function(n){"use strict";n.loadCSS||(n.loadCSS=function(){});var o=loadCSS.relpreload={};if(o.support=function(){var e;try{e=n.document.createElement("link").relList.supports("preload")}catch(t){e=!1}return function(){return e}}(),o.bindMediaToggle=function(t){var e=t.media||"all";function a(){t.media=e}t.addEventListener?t.addEventListener("load",a):t.attachEvent&&t.attachEvent("onload",a),setTimeout(function(){t.rel="stylesheet",t.media="only x"}),setTimeout(a,3e3)},o.poly=function(){if(!o.support())for(var t=n.document.getElementsByTagName("link"),e=0;e<t.length;e++){var a=t[e];"preload"!==a.rel||"style"!==a.getAttribute("as")||a.getAttribute("data-loadcss")||(a.setAttribute("data-loadcss",!0),o.bindMediaToggle(a))}},!o.support()){o.poly();var t=n.setInterval(o.poly,500);n.addEventListener?n.addEventListener("load",function(){o.poly(),n.clearInterval(t)}):n.attachEvent&&n.attachEvent("onload",function(){o.poly(),n.clearInterval(t)})}"undefined"!=typeof exports?exports.loadCSS=loadCSS:n.loadCSS=loadCSS}("undefined"!=typeof global?global:this);
|
||||
</script>
|
||||
|
||||
<!-- 自定义CSS -->
|
||||
<?php if(!empty($this->options->AKAROMcustomCss)): ?>
|
||||
<style type="text/css">
|
||||
<?php $this->options->AKAROMcustomCss(); ?>
|
||||
</style>
|
||||
<?php endif; ?>
|
||||
|
||||
</head>
|
||||
<!--[if lte IE 10]>
|
||||
<div class="browsehappy" role="dialog">您正在使用<strong>过时的</strong>浏览器. 为了更好的体验, 请 <a href="https://browsehappy.com/">升级你的浏览器</a>.</div>
|
||||
<![endif]-->
|
||||
|
||||
<body class="mdui-theme-layout-light mdui-theme-primary-blue mdui-theme-accent-red">
|
||||
|
||||
<script>
|
||||
if (localStorage.romanticismTheme) {
|
||||
document.body.classList.add("mdui-theme-layout-dark");
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="mdui-appbar blur mdui-appbar-fixed mdui-shadow-0">
|
||||
<div class="mdui-toolbar">
|
||||
<a class="mdui-hidden-xs-down"></a>
|
||||
<button class="mdui-btn mdui-btn-icon" mdui-drawer="{target: '#mainsidebar', overlay: true}"><i class="mdui-icon material-icons">menu</i></button>
|
||||
<span class="mdui-typo-title chameleon" onclick="window.location.href='<?php $this->options ->siteUrl(); ?>'"><b><?php $this->options->title(); ?></b></span>
|
||||
<div class="mdui-toolbar-spacer"></div>
|
||||
<button class="mdui-btn mdui-btn-icon" mdui-dialog="{target: '#search'}"><i class="mdui-icon material-icons">search</i></button>
|
||||
<button type="button" class="mdui-btn mdui-btn-icon" id="switch-theme"> <i class="mdui-icon material-icons">brightness_6</i></button>
|
||||
<a class="mdui-hidden-xs-down"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mdui-dialog yuan blur" id="search">
|
||||
<div class="mdui-container">
|
||||
<div class="mdui-typo">
|
||||
<h3 class="mdui-valign"><i class="mdui-icon material-icons">search</i> 搜索一下</h3>
|
||||
<form id="searchform" method="post" action="" role="search">
|
||||
<div class="mdui-row">
|
||||
<div class="mdui-col-xs-8 mdui-col-sm-10">
|
||||
<input class="mdui-textfield-input" type="text" id="s" name="s" placeholder="请输入搜索关键字" maxlength="30"/>
|
||||
</div>
|
||||
<div class="mdui-col-xs-4 mdui-col-sm-2">
|
||||
<span class="akarom-alter-button-valign">
|
||||
<span class="akarom-alter-button blur yuan mdui-center" id="submitSearch">
|
||||
<i class="mdui-icon material-icons">bubble_chart</i><b>搜索</b>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.getElementById("submitSearch").addEventListener("click", function() {
|
||||
document.getElementById("searchform").submit();
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
<h3 class="mdui-valign"><i class="mdui-icon material-icons">label_outline</i> 标签云</h3>
|
||||
<?php $this->widget('Widget_Metas_Tag_Cloud', 'sort=rand()&ignoreZeroCount=1&desc=0&limit=15')->to($tags); ?>
|
||||
<?php if($tags->have()): ?>
|
||||
<?php while ($tags->next()): ?>
|
||||
<?php echo'
|
||||
<div class="btnyuan outlineborder"><a href="'.$tags->permalink.' " rel="tag"><b>#'.$tags->name.'</b></a> <span class="mdui-typo-caption-opacity"> ('.$tags->count.')</span></div>
|
||||
'; ?>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<?php _e('未找到含有标签的文章'); ?>
|
||||
<?php endif; ?>
|
||||
<br><br>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $this->need('config/sidebar.php');?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user