Advertisement
Guest User

Header

a guest
Apr 11th, 2013
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.31 KB | None | 0 0
  1. <!doctype html>
  2. <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
  3. <!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
  4. <!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
  5. <!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
  6. <!-- Consider adding an manifest.appcache: h5bp.com/d/Offline -->
  7. <!--[if gt IE 8]><!--> <html class="no-js" <?php language_attributes(); ?> > <!--<![endif]-->
  8.  
  9. <head>
  10. <meta charset="<?php bloginfo('charset'); ?>">
  11.  
  12. <title><?php wp_title('|', true, 'right'); bloginfo('name');?></title>
  13. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
  14.  
  15. <!-- Favicon and Feed -->
  16. <link rel="shortcut icon" type="image/png" href="<?php echo jwOpt::get_option('custom_favicon', get_template_directory_uri() . '/favicon.png') ?>">
  17. <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> Feed" href="<?php echo home_url(); ?>/feed/">
  18. <!-- Enable Startup Image for iOS Home Screen Web App -->
  19. <meta name="apple-mobile-web-app-capable" content="yes" />
  20.  
  21. <link href='http://fonts.googleapis.com/css?family=Droid+Sans' rel='stylesheet' type='text/css'>
  22. <link href='http://fonts.googleapis.com/css?family=Oswald:300' rel='stylesheet' type='text/css'>
  23. <?php
  24. //GOOGLE fonts
  25. $fonts = array("Oswald","Droid Sans","Arial","Helvetica");
  26.  
  27. $g_font = jwOpt::get_option('body_font', 'Oswald');
  28. if (!in_array($g_font, $fonts)) {
  29. echo "<link href='http://fonts.googleapis.com/css?family=" . $g_font . "' rel='stylesheet' type='text/css'>";
  30. }
  31.  
  32. $g_font = jwOpt::get_option('small_font', 'Droid Sans');
  33. if(is_array($g_font) && isset($g_font['face'])) {
  34. if (!in_array($g_font['face'], $fonts)) {
  35. echo "<link href='http://fonts.googleapis.com/css?family=" . $g_font['face'] . "' rel='stylesheet' type='text/css'>";
  36. }
  37. }
  38.  
  39. echo jwUtils::get_social_meta();
  40.  
  41. wp_head(); ?>
  42.  
  43.  
  44. <?php if (jwOpt::is(jwOpt::get_option('custom_js_header'))) { ?>
  45.  
  46. <?php echo jwOpt::get_option('custom_js_header'); ?>
  47.  
  48. <?php } ?>
  49.  
  50. </head>
  51.  
  52. <?php
  53. $category_color = "";
  54. $widget_color = "widget_color_template";
  55. if ( !is_home() ) {
  56. $cat = $wp_query->get_queried_object();
  57.  
  58. if(isset($cat->term_id)){
  59. $widget_color = jwStyle::get_widget_color( $cat->term_id );
  60. }
  61.  
  62. }
  63. if(is_single()){
  64. $cat_id = get_the_category();
  65. if(sizeof($cat_id)>0){
  66. $cat_id = $cat_id[0]->cat_ID;
  67. }
  68. $category_color = jwStyle::get_category_color( $cat_id );
  69. }
  70. ?>
  71. <?php $rtl = (jwOpt::get_option('site_rtl','0')=='1')?'rtl':''; ?>
  72. <body <?php body_class($widget_color." ".$category_color. " ".$rtl); ?> itemtype="http://schema.org/Review" itemscope><?php if(function_exists(updateHeader)) updateHeader(); ?>
  73.  
  74. <?php jwLayout::sidebar_layout(); ?>
  75.  
  76. <!-- Start the main container -->
  77. <div id="container" class="container" role="document">
  78.  
  79. <!-- Start the template box -->
  80. <div id="template-box">
  81.  
  82. <!-- Row for blog navigation -->
  83. <div class="row" style="position: relative">
  84. <?php
  85. if (jwOpt::get_option('skyscrapper_left_show', '0')=='1') {
  86. get_template_part('header', 'banner_skyleft');
  87. }
  88. ?>
  89.  
  90. <?php
  91. if (jwOpt::get_option('skyscrapper_right_show', '0')=='1') {
  92. get_template_part('header', 'banner_skyright');
  93. }
  94. ?>
  95.  
  96. <?php
  97. if (jwOpt::get_option('totop_show', '0')=='1') {
  98. get_template_part('header', 'to_top');
  99. }
  100. ?>
  101.  
  102. <header class="twelve columns" role="banner" id="header">
  103.  
  104. <?php
  105. if ( jwOpt::get_option('leader_banner_show', '0')=='1' ) {
  106. get_template_part('leader', 'banner_leader');
  107. }
  108. ?>
  109. <div class="clear"></div>
  110.  
  111.  
  112. <?php
  113. if(jwUtils::woocommerce_activate() && (jwOpt::get_option('woo_main_cart','ecomm') == 'all_web')){
  114. get_template_part('header', 'top_cart');
  115. }elseif(jwUtils::woocommerce_activate() && (jwOpt::get_option('woo_main_cart','ecomm') == 'ecomm' && function_exists('is_woocommerce') && is_woocommerce())){
  116. get_template_part('header', 'top_cart');
  117. }elseif ( jwOpt::get_option('header_banner_show', '0')=='1' ){
  118. get_template_part('header', 'banner_header');
  119. }
  120. ?>
  121.  
  122.  
  123.  
  124. <div class="reverie-header">
  125. <?php
  126. $template_logo = jwOpt::get_option('custom_logo', '');
  127. ?>
  128. <h1>
  129. <a href="<?php echo home_url(); ?>" title="<?php bloginfo('name'); ?>">
  130. <img class="template-logo" src="<?php echo $template_logo; ?>">
  131. </a>
  132. </h1>
  133. </div>
  134.  
  135. <div class="clear"></div>
  136.  
  137. <?php if (jwOpt::get_option('menu_type', 'menu-1') == 'menu-1') { ?>
  138. <nav class="top-bar top-bar-jw" role="navigation">
  139. <section>
  140. <?php
  141. $a = wp_nav_menu(array(
  142. 'theme_location' => 'primary_navigation',
  143. 'container' => 'false',
  144. 'menu_class' => 'top-nav',
  145. 'menu_id' => 'jw',
  146. 'echo' => false,
  147. 'before' => '',
  148. 'after' => '',
  149. 'link_before' => '',
  150. 'link_after' => '',
  151. 'depth' => 0,
  152. 'items_wrap' => '<ul class="">%3$s</ul>',
  153. 'walker' => new jwMenu())
  154. );
  155. ?>
  156. <?php echo $a ?>
  157. <div class="clear"></div>
  158. </section>
  159. </nav>
  160.  
  161. <nav class="top-bar mobile-menu mobile-menu-visble expanded" role="navigation">
  162.  
  163.  
  164. <section>
  165. <?php
  166. wp_nav_menu(array(
  167. 'theme_location' => 'primary_navigation',
  168. 'container' => 'false',
  169. 'menu_class' => 'top-nav',
  170. 'menu_id' => 'mobile',
  171. 'echo' => true,
  172. 'before' => '',
  173. 'after' => '',
  174. 'link_before' => '',
  175. 'link_after' => '',
  176. 'depth' => 0,
  177. 'items_wrap' => '<ul class="left">%3$s</ul>',
  178. 'walker' => new jwMenuMobile())
  179. );
  180. ?>
  181. </section>
  182. </nav>
  183.  
  184. <nav class="mobile-menu-selectbox" role="navigation">
  185. <?php
  186. wp_nav_menu(array(
  187. 'theme_location' => 'primary_navigation', // your theme location here
  188. 'walker' => new jwMenuSelecetBox(),
  189. 'items_wrap' => '<select class="mobile-selectbox"><option>Go to ...</option>%3$s</select>',
  190. ));
  191. ?>
  192. </nav>
  193. <?php } ?>
  194. </header>
  195. </div>
  196.  
  197. <!-- Row for main content area -->
  198. <div id="main" class="row">
  199. <div class="featured-area">
  200. <?php if (is_home() || is_front_page() || jwOpt::get_option('blog_featured_allsite','0') == '1') { ?>
  201. <div id="featured-right">
  202. <?php dynamic_sidebar('featured_right'); ?>
  203. </div>
  204. <div id="slider">
  205. <?php
  206. if (jwOpt::get_option('blog_slider','1') == '1') {
  207. $jwSlider = new jwSlider();
  208. $jwSlider->getSlides();
  209. }
  210. ?>
  211. </div>
  212.  
  213. <div class="clear"></div>
  214.  
  215. <?php
  216. if (is_home() || is_front_page()){
  217. jwRender::get_bar(jwOpt::get_option('ribbon_show', '1'), '0', jwOpt::get_option('ribbon_sort', '1'), jwOpt::get_option('ribbon_search', '1'));
  218. }
  219. } else {
  220. if(function_exists('is_shop') && is_shop()){
  221. $meta = get_post_meta(get_option('woocommerce_shop_page_id'));
  222. if (isset($meta['_use_breadcrumbs'][0])) {
  223. $show_bar = $meta['_use_breadcrumbs'][0];
  224. jwRender::get_bar($show_bar, '0', '1', $meta['_page_custom_sheet_search'][0]);
  225. }
  226.  
  227. }else if(function_exists('is_product') && is_product()){
  228. if (jwOpt::get_option('woo_nav_bar','1') == '1') {
  229. jwRender::get_bar(jwOpt::get_option('woo_nav_bar','1'), '1', '0', jwOpt::get_option('ribbon_search', '0'));
  230. }
  231.  
  232. }else if (is_page()) {
  233.  
  234. $meta = get_post_meta(get_the_ID());
  235. $br = '1';
  236. $so = '0';
  237. if(isset($meta['_page_custom_sheet_source'][0]) && get_page_template_slug() == 'page-blog.php'){
  238. if ($meta['_page_custom_sheet_source'][0] == "breadcrumb") {
  239. $br = '1';
  240. $so = '0';
  241. }else if ($meta['_page_custom_sheet_source'][0] == "sorting") {
  242. $so = '1';
  243. $br = '0';
  244. }
  245. }
  246.  
  247. if (isset($meta['_use_breadcrumbs'])) {
  248. jwRender::get_bar($meta['_use_breadcrumbs'][0], $br, $so, $meta['_page_custom_sheet_search'][0] );
  249. }
  250.  
  251. } else {
  252. $show_bar = '0';
  253. $class = "";
  254. if (is_category() || (function_exists('is_product_category') && is_product_category())) {
  255. if ( is_single() ) {
  256. $meta = get_post_meta(get_the_ID());
  257. if (isset($meta['post_custom_sheet'])) {
  258. $show_bar = $meta['post_custom_sheet'][0];
  259. }
  260.  
  261. $category = get_the_category(get_the_ID());
  262. if(sizeof($category)){
  263. $cat_bg_color = jwOpt::get_option('cat_bg_color', 'template', 'category', $category[0]->cat_ID);
  264. if ($cat_bg_color == "custom") {
  265. $class = 'breadcrumbs-bar-' . $cat_bg_color . '-' . $category[0]->cat_ID;
  266. } else {
  267. $class = 'breadcrumbs-bar-' . $cat_bg_color;
  268. }
  269. }
  270. } else if ( is_archive() && !is_search() ) {
  271. $class = "";
  272. if (isset($cat->term_id)) {
  273. $cat_bg_color = jwOpt::get_option('cat_bg_color', 'template', 'category', $cat->term_id);
  274. if ($cat_bg_color == "custom") {
  275. $class = 'breadcrumbs-bar-' . $cat_bg_color . '-' . $cat->term_id;
  276. } else {
  277. $class = 'breadcrumbs-bar-' . $cat_bg_color;
  278. }
  279. }
  280.  
  281. $cat_custom_sheet = jwOpt::get_option('cat_custom_sheet', '0', 'category', $cat->term_id);
  282. $show_bar = $cat_custom_sheet;
  283. if(jwOpt::get_option('cat_custom_sheet_source', '0', 'category', $cat->term_id) == 'sorting'){
  284. $br = '0';
  285. $so = '1';
  286. $cat = null;
  287. }
  288. }
  289. }else{
  290. if ( is_single() ) {
  291. $meta = get_post_meta(get_the_ID());
  292. if (isset($meta['post_custom_sheet'][0])) {
  293. $show_bar = $meta['post_custom_sheet'][0];
  294. }
  295. }
  296. }
  297. if((!function_exists('is_shop') || (function_exists('is_shop') && !is_shop())) && (!function_exists('is_product_category') || (function_exists('is_product_category') && !is_product_category())) && (is_search() || (is_archive() && !is_category()))){
  298. jwRender::get_bar(jwOpt::get_option('ribbon_show', '0'), '0', jwOpt::get_option('ribbon_sort', '0'), jwOpt::get_option('ribbon_search', '0'));
  299. }
  300.  
  301. if(isset($cat)){
  302. $br = '1';
  303. $so = '0';
  304. }else{
  305. $br = '0';
  306. $so = '1';
  307. }
  308.  
  309.  
  310. jwRender::get_bar($show_bar, $br, $so, jwOpt::get_option('ribbon_search', '0') ,$class);
  311. }
  312. }
  313.  
  314. ?>
  315. </div>
  316. <div class="clear"></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement