1. <?php
  2.  
  3. /**
  4. * The Header for our theme.
  5. *
  6. * Displays all of the <head> section and everything up till <div id="main">
  7. *
  8. * @package Minimosity
  9. * @since Minimosity 1.0
  10. */
  11. ?><!DOCTYPE html>
  12. <html <?php language_attributes(); ?><?php get_template_part( 'partials/part', 'background');?>>
  13. <head>
  14.  
  15. <meta charset="<?php bloginfo( 'charset' ); ?>" />
  16. <meta name="viewport" content="width=device-width">
  17. <script>(function(w){var dpr=((w.devicePixelRatio===undefined)?1:w.devicePixelRatio);if(!!w.navigator.standalone){var r=new XMLHttpRequest();r.open('GET','inc/retina-images.php?devicePixelRatio='+dpr,false);r.send()}else{document.cookie='devicePixelRatio='+dpr+'; path=/'}})(window)</script>
  18.  
  19.  
  20. <title><?php
  21. /*
  22. * Print the <title> tag based on what is being viewed.
  23. */
  24. global $page, $paged;
  25.  
  26. wp_title( '|', true, 'right' );
  27.  
  28. // Add the blog name.
  29. bloginfo( 'name' );
  30.  
  31. // Add the blog description for the home/front page.
  32. $site_description = get_bloginfo( 'description', 'display' );
  33. if ( $site_description && ( is_home() || is_front_page() ) )
  34. echo " | $site_description";
  35.  
  36. // Add a page number if necessary:
  37. if ( $paged >= 2 || $page >= 2 )
  38. echo ' | ' . sprintf( __( 'Page %s', 'minimosity' ), max( $paged, $page ) );
  39.  
  40. ?></title>
  41.  
  42. <link rel="profile" href="http://gmpg.org/xfn/11" />
  43. <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  44.  
  45.  
  46. <!--[if lt IE 9]>
  47. <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
  48. <![endif]-->
  49.  
  50. <!--[if (gte IE 6)&(lte IE 8)]>
  51. <script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/selectivizr.min.js"></script>
  52. <![endif]-->
  53.  
  54.  
  55. <!-- Include jQuery -->
  56. <?php wp_enqueue_script('jquery'); ?>
  57. <?php wp_head(); ?>
  58.  
  59. </head>
  60.  
  61. <body <?php body_class(); ?>>
  62. <noscript><style id="devicePixelRatio" media="only screen and (-moz-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2)">#devicePixelRatio{background-image:url("inc/retina-images.php?devicePixelRatio=2")}</style></noscript>
  63.  
  64. <div id="page" class="hfeed site">
  65.  
  66. <header id="utilities">
  67. <div id="top-banner"></div>
  68. <div id="inner-utilities">
  69.  
  70. <div id="secondary-menu">
  71. <?php wp_nav_menu( array('theme_location' => 'utilities', 'depth' => 1, 'fallback_cb' => false, 'menu_class' => 'menu-utilities') ); ?>
  72. </div><!--#secondary-menu-->
  73.  
  74. <div id="search">
  75. <?php get_search_form(); ?>
  76. </div><!--#search-->
  77.  
  78. <div id="socials">
  79. <?php get_template_part( 'partials/part', 'socials');?>
  80. </div><!--#socials-->
  81.  
  82. </div><!--#inner-utilities-->
  83. <div class="clear"></div>
  84. </header>
  85.  
  86. <div id="wrapper">
  87. <?php do_action( 'before' ); ?>
  88. <header id="masthead" class="site-header" role="banner">
  89.  
  90. <div id="branding">
  91. <div id="logo">
  92. <hgroup>
  93. <h1 class="site-title">
  94. <a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
  95.  
  96. <?php
  97. if ( of_get_option('mm_logo_uploader') ) {
  98. echo '<img src="' . of_get_option('mm_logo_uploader') . '">';
  99.  
  100. } else {
  101. get_template_part('partials/part', 'demo-logo');
  102. }; ?>
  103.  
  104. </a></h1>
  105. <!--<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>-->
  106. </hgroup>
  107. </div><!-- #logo -->
  108.  
  109. <div id="top-ad">
  110.  
  111. <?php
  112. $adsensecode = of_get_option('mm_top_ad_code');
  113.  
  114. if ( of_get_option('mm_top_ad') AND strlen($adsensecode) > 0) {
  115. echo ( of_get_option('mm_top_ad_code') );
  116. }
  117. else {
  118. echo '<img src="' . get_template_directory_uri() . '/images/banner_468.png">';
  119. }; ?>
  120.  
  121. </div><!--#top-ad-->
  122. <div class="clear"></div>
  123. </div><!--#branding-->
  124.  
  125. <nav role="navigation" class="site-navigation main-navigation">
  126.  
  127. <h1 class="assistive-text"><?php _e( 'Navigation', 'minimosity' ); ?></h1>
  128. <div class="assistive-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'minimosity' ); ?>"><?php _e( 'Skip to content', 'minimosity' ); ?></a></div>
  129. <?php //wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
  130. <?php wp_nav_menu( array('theme_location' => 'primary') ); ?>
  131. <!-- Latest Revews Ticker -->
  132. <?php if (of_get_option('mm_rw_ticker')) echo get_template_part ('partials/part', 'rw-ticker') ;?>
  133. </nav>
  134. </header><!-- #masthead .site-header -->
  135.  
  136.  
  137. <!-- Custom Slider -->
  138. <?php if (of_get_option('mm_cslider') AND is_home()) echo get_template_part( 'partials/part', 'cslider' ) ;?>
  139. <!-- Big Featured Slider -->
  140. <?php if (of_get_option('mm_fslider') AND is_home() AND of_get_option('mm_fslider_size') == 'mm_big_fslider' ) {echo get_template_part( 'partials/part', 'fslider' ) ;}?>
  141. <!--Newsletter Toggle-->
  142. <?php if (is_home() AND of_get_option('mm_fslider_size') == 'mm_big_fslider' ) echo '<div class="home-toggle">' ?>
  143. <?php if (of_get_option('mm_toggle_display') AND is_home() AND of_get_option('mm_fslider_size') == 'mm_big_fslider') {echo get_template_part( 'partials/part', 'hometoggle' ) ;}?>
  144. <?php if (is_home() AND of_get_option('mm_fslider_size') == 'mm_big_fslider' ) echo '</div>' ?>
  145. <!-- Singular Big Featured Image -->
  146. <?php if (is_singular() AND has_post_thumbnail() AND of_get_option('mm_big_featured') == 'big_post') {echo get_template_part ( 'partials/part', 'singular' ) ;}?>
  147. <!-- 404 Image -->
  148. <?php if (is_404() AND of_get_option('mm_404_image') ) {echo get_template_part ( 'partials/part', '404-image' ) ;}?>
  149.  
  150.  
  151. <div class="clear"></div>
  152.  
  153. <div id="main">