Subversion Repositories ZenDark

Rev

Rev 3 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php
  /*
   * The Header for our theme.
   *
   * Displays all of the <head> section and the main header,
   * up till <div id="main">, the central div.
   */

?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
  <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
  <title>
    <?php
    // Print the <title> tag based on what is being viewed.
    global $page, $paged;
   
    wp_title('-', true, 'right');
   
    // Add a page number if necessary:
    if ($paged >= 2 || $page >= 2)
      echo sprintf(__('Page %s', 'zendark'), max($paged, $page)).' &#8211; ';
   
    // Add the blog name.
    bloginfo('name');
    ?>
  </title>
  <link rel="profile" href="http://gmpg.org/xfn/11" />
  <link rel="icon" href="<?php echo get_template_directory_uri(); ?>/images/favicon.png" type="image/png" />
  <?php
    /* Select a different stylesheet with sidebar on the
     * left when loading right-page template
     */

    if (is_page_template('right-page.php') || is_page_template('zenphoto-page.php')) { ?>
  <link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri(); ?>/right-style.css" />
  <?php }
      else { ?>
  <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo('stylesheet_url'); ?>" />
  <?php } ?>
  <link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri(); ?>/fonts/fonts.css" />
  <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  <!--[if lt IE 9]>
    <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
  <![endif]-->
  <?php
    /* We add some JavaScript to pages with the comment form
     * to support sites with threaded comments (when in use).
     */

    if (is_singular() && get_option('thread_comments'))
      wp_enqueue_script('comment-reply');
   
    /* Always have wp_head() just before the closing </head>
     * tag of your theme, or you will break many plugins, which
     * generally use this hook to add elements to <head> such
     * as styles, scripts, and meta tags.
     */

    wp_head();
?>
</head>

<body <?php body_class(); ?>>
<div id="page">

<header id="main-header">
  <hgroup>
                <h1 id="site-title"><a href="<?php echo esc_url(home_url('/')); ?>" title="<?php echo esc_attr(get_bloginfo('name', 'display')); ?>"><?php bloginfo('name'); ?></a></h1>
                <h2 id="site-description"><?php bloginfo('description'); ?></h2>
        </hgroup>
  <nav id="main-menu">
    <?php
      /* Our navigation menu.  If one isn't filled out, wp_nav_menu falls
       * back to wp_page_menu. The menu assiged to the primary position is
       * the one used. If none is assigned, the menu with the lowest ID is used.
       */

      wp_nav_menu(array('theme_location' => 'primary', 'depth' => 1));
    ?>
    <div id="menu-title"><h1><?php if (is_page()) { echo get_the_title(zendark_get_root_parent(get_the_ID())); } else { _e('Blog', 'zendark'); } ?></h1></div>
  </nav>
</header><!-- #main-header -->

<div id="main">