header.php 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=10,IE=9,IE=8">
  6. <meta name="theme-color" content="#1e90ff">
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
  8. <title><?php wp_title('|', true, 'right'); echo get_option('blogname'); if (is_home ()) echo " | ".get_option('blogdescription'); if ($paged > 1) echo '-Page ', $paged; ?></title>
  9. <?php
  10. $sr_1 = 0; $sr_2 = 0; $commenton = 0;
  11. if( dopt('d_sideroll_b') ){
  12. $sr_1 = dopt('d_sideroll_1');
  13. $sr_2 = dopt('d_sideroll_2');
  14. }
  15. if( is_singular() ){
  16. if( comments_open() ) $commenton = 1;
  17. }
  18. ?>
  19. <script>
  20. window._deel = {name: '<?php bloginfo('name') ?>',url: '<?php echo get_bloginfo("template_url") ?>', ajaxpager: '<?php echo dopt('d_ajaxpager_b') ?>', commenton: <?php echo $commenton ?>, roll: [<?php echo $sr_1 ?>,<?php echo $sr_2 ?>]}
  21. </script>
  22. <?php
  23. //49分类不被搜索引擎收录
  24. if (!is_home() && in_category('49') ){
  25. echo '<meta name="robots" content="noindex,nofollow" />';
  26. }
  27. ?>
  28. <?php
  29. wp_head();
  30. if( dopt('d_headcode_b') ) echo dopt('d_headcode'); ?>
  31. <link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/favicon.ico" />
  32. <!--[if lt IE 9]><script src="<?php bloginfo('template_url'); ?>/js/html5.js"></script><![endif]-->
  33. </head>
  34. <body <?php body_class(); ?>>
  35. <header id="header" class="header">
  36. <div class="container-inner">
  37. <div class="yusi-logo">
  38. <a href="/">
  39. <h1>
  40. <span class="yusi-mono"><?php bloginfo('name'); ?></span>
  41. <span class="yusi-bloger"><?php bloginfo('description'); ?></span>
  42. </h1>
  43. </a>
  44. </div>
  45. </div>
  46. <div id="nav-header" class="navbar">
  47. <ul class="nav">
  48. <?php echo str_replace("</ul></div>", "", ereg_replace("<div[^>]*><ul[^>]*>", "", wp_nav_menu(array('theme_location' => 'nav', 'echo' => false)) )); ?>
  49. <li style="float:right;">
  50. <div class="toggle-search"><i class="fa fa-search"></i></div>
  51. <div class="search-expand" style="display: none;"><div class="search-expand-inner"><form method="get" class="searchform themeform" onsubmit="location.href='<?php echo home_url('/search/'); ?>' + encodeURIComponent(this.s.value).replace(/%20/g, '+'); return false;" action="/"><div> <input type="ext" class="search" name="s" onblur="if(this.value=='')this.value='search...';" onfocus="if(this.value=='search...')this.value='';" value="search..."></div></form></div></div>
  52. </li>
  53. </ul>
  54. </div>
  55. </div>
  56. </header>
  57. <section class="container"><div class="speedbar">
  58. <?php
  59. if( dopt('d_sign_b') ){
  60. global $current_user;
  61. get_currentuserinfo();
  62. $uid = $current_user->ID;
  63. $u_name = get_user_meta($uid,'nickname',true);
  64. ?>
  65. <div class="pull-right">
  66. <?php if(is_user_logged_in()){echo '<i class="fa fa-user"></i> '.$u_name.' &nbsp; '; echo ' &nbsp; &nbsp; <i class="fa fa-power-off"></i> ';}else{echo '<i class="fa fa-user"></i> ';}; wp_loginout(); ?>
  67. </div>
  68. <?php } ?>
  69. <div class="toptip"><strong class="text-success"><i class="fa fa-volume-up"></i> </strong> <?php echo dopt('d_tui'); ?></div>
  70. </div>
  71. <?php if( dopt('d_adsite_01_b') ) echo '<div class="banner banner-site">'.dopt('d_adsite_01').'</div>'; ?>