-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
103 lines (79 loc) · 3.37 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
93
94
95
96
97
98
99
100
101
102
103
<?php
wp_deregister_script('jquery');
if (strpos(get_bloginfo('url'), 'localhost') !== false) {
error_reporting(E_WARNING);
}else{
error_reporting(0);
}
?><!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title><?php echo wp_title("",false); ?></title>
<link href='//fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<link href="<?php bloginfo('template_url'); ?>/style.css" rel="stylesheet">
<link rel="shortcut icon" href="<?php bloginfo('template_url'); ?>/static/favicon.png" />
<link rel="alternate" type="application/rss+xml" href="<?php bloginfo('rss2_url'); ?>" />
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1, maximum-scale=1, minimum-scale=1"/>
<?php wp_head(); ?>
<?php
$content_text_color = get_option('content_text_color');
$link_color = get_option('link_color');
$section_background = get_option('section_background');
?>
<style>
body { color: <?php echo $content_text_color; ?>; }
a { color: <?php echo $link_color; ?>; }
.button:hover {background: <?php echo $link_color; ?> !important; border-color: <?php echo $link_color; ?> !important;}
.brownback { background: <?php echo $section_background; ?>; }
section>.title {color: <?php echo $section_background; ?>; }
</style>
<?php $onlyone = false; if (have_posts()) : while (have_posts()) : the_post(); if (jan14_catch_that_image() AND $onlyone == false) : $onlyone = true; ?>
<style>
body,footer {background-image:url('<?php echo bloginfo('template_url'); ?>/thumb.php?src=<?php echo jan14_catch_that_image() ?>&w=960&zc=1&q=<?=JAN14_TIMTHUMB_QUALITY?>');}
@media screen and (min-width: 960px) {body,footer {background-image: url('<?php echo jan14_catch_that_image(); ?>');}}
</style>
<?php endif; endwhile; endif; ?>
</head>
<body <?php body_class("loading"); ?>>
<header>
<a href="<?php bloginfo('url'); ?>" class="logo" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a>
<label for="phone-menu-toggle" class="phone phone-menu-icon">☰</label>
<input type="checkbox" id="phone-menu-toggle">
<nav>
<?php wp_nav_menu(array('theme_location' => 'header-main')); ?>
</nav>
<?php if (is_front_page()) { ?>
<h1><?php bloginfo('name'); ?>
<small><?php bloginfo('description'); ?></small></h1>
<?php }else if (is_404()) { ?>
<h1>Not found</h1>
<?php }elseif (is_category()) { ?>
<h1><?php single_cat_title(); ?>
<small><?php if (category_description()) {echo category_description();}else{echo 'Category archive';}?></small></h1>
<?php }elseif (is_tag()) { ?>
<h1><?php single_tag_title(); ?>
<small>Tag archive</small></h1>
<?php }elseif (is_day()) { ?>
<h1><?php the_time('F jS, Y'); ?>
<small>Daily archive</small></h1>
<?php }elseif (is_month()) { ?>
<h1><?php the_time('F, Y'); ?>
<small>Monthly archive</small></h1>
<?php }elseif (is_year()) { ?>
<h1><?php the_time('Y'); ?>
<small>Yearly archive</small></h1>
<?php }elseif (is_author()) {
$author = get_userdata( get_query_var('author') ); ?>
<h1><?php echo $author->display_name; ?>
<small>Author archive</small></h1>
<?php }else if (is_search()) { ?>
<h1>Searching <i><?=htmlentities($_REQUEST['s']);?></i></h1>
<?php }else{ ?>
<h1><?php the_title(); ?>
<small><?php
$yoast_meta = get_post_meta($post->ID, '_yoast_wpseo_metadesc', true);
if ($yoast_meta) { echo $yoast_meta; }
?></small></h1>
<?php } ?>
</header>