forked from dimpurr/Clearision
-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
82 lines (63 loc) · 3.15 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
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<title><?php wp_title( '|', true, 'right' ); ?></title>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>">
<?php if (get_option('clrs_opct') == "no") { ?>
<link rel="stylesheet" href="<?=get_template_directory_uri(); ?>/style.opacity.css?t=<?=@filemtime(get_template_directory().'/style.opacity.css'); ?>">
<?php $bg = get_option('clrs_opbg'); if ( !empty( $bg ) ) { ?>
<style>body { background-image: url("<?=$bg;?>"); };</style>
<?php }; }; ?>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<link rel="shortcut icon" type="image/x-icon" href="<?=get_option( 'clrs_favi', 'favicon.ico' );?>" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="author" content="dimpurr" />
<meta name="application-name" content="<?php bloginfo('name' ); ?>"/>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<link rel="home" href="<?php echo esc_url( home_url( '/' ) ); ?>" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url')?>" />
<link rel="alternate" type="application/rdf+xml" title="RSS 1.0" href="<?php bloginfo('rss_url')?>" />
<link rel="alternate" type="application/atom+xml" title="ATOM 1.0" href="<?php bloginfo('atom_url')?>" />
<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
<![endif]-->
<?php
if ( is_user_logged_in() ) { // 适配 WordPress 顶部管理栏
echo '<style type="text/css" media="screen"> #float { top: 32px; } </style>' ;
}
$clrs_style = get_option("clrs_style");
if ( !empty($clrs_style) ) {
echo "<style>" . $clrs_style . "</style>";
}
?>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="page">
<hgroup id="ctn_header">
<div id="title">
<h1 id="site-title"><span><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></h1>
<h2 id="site-description"><?php bloginfo( 'description' ); ?></h2>
</div>
<div id="title_r">
<?php clrs_sns(); ?>
<a href="<?php bloginfo('rss2_url'); ?>" target="_blank"><button id="tr_rss"></button></a>
<a href="<?php echo admin_url();?>" target="_blank"><button id="tr_admin"></button></a>
<span id="tr_clear"></span>
<form id="tr_s_f" method="get" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<input id="tr_search" type="text" name="s" id="s" placeholder="" size="10" />
</form>
</div>
<div class="clearfix"></div>
</hgroup>
<div id="float" >
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><img id="logo" alt="<?php bloginfo( 'name' ); ?>" title="<?php bloginfo( 'name' ); ?>" src="<?php echo get_option('clrs_logo'); ?>" ></a>
<nav id="nav" role="navigation">
<?php wp_nav_menu( array( 'theme_location' => 'main' ) ); ?>
</nav>
<nav id="next" role="sencond_navigation">
<?php wp_nav_menu( array( 'theme_location' => 'next' ) ); ?>
</nav>
</div>