Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Beginnings of the Mega-styler

  • Loading branch information...
commit 9535ce16b4a086f2f58cd3fc15631c516f00a3dd 1 parent d1194a4
@kwight authored
Showing with 126 additions and 0 deletions.
  1. +91 −0 page-mega.php
  2. +35 −0 style.css
View
91 page-mega.php
@@ -0,0 +1,91 @@
+<?php
+/**
+ * Template Name: Mega-styler
+ */
+?><!DOCTYPE html>
+<html <?php language_attributes(); ?>>
+<head>
+<meta charset="<?php bloginfo( 'charset' ); ?>" />
+<meta name="viewport" content="width=device-width" />
+<title><?php
+ /*
+ * Print the <title> tag based on what is being viewed.
+ */
+ global $page, $paged;
+
+ wp_title( '|', true, 'right' );
+
+ // Add the blog name.
+ bloginfo( 'name' );
+
+ // Add the blog description for the home/front page.
+ $site_description = get_bloginfo( 'description', 'display' );
+ if ( $site_description && ( is_home() || is_front_page() ) )
+ echo " | $site_description";
+
+ // Add a page number if necessary:
+ if ( $paged >= 2 || $page >= 2 )
+ echo ' | ' . sprintf( __( 'Page %s', '_s' ), max( $paged, $page ) );
+
+ ?></title>
+<link rel="profile" href="http://gmpg.org/xfn/11" />
+<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 wp_head(); ?>
+</head>
+
+<body <?php body_class( 'mega' ); ?>>
+<div id="page" class="hfeed site">
+
+ <div id="header" class="mega-section">
+ <span class="mega-title">header</span>
+ <header id="masthead" class="site-header" role="banner">
+ <hgroup>
+ <h1 class="site-title"><a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
+ <h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
+ </hgroup>
+
+ <nav role="navigation" class="site-navigation main-navigation">
+ <h1 class="assistive-text"><?php _e( 'Menu', '_s' ); ?></h1>
+ <div class="assistive-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', '_s' ); ?>"><?php _e( 'Skip to content', '_s' ); ?></a></div>
+
+ <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
+ </nav>
+ </header><!-- #masthead .site-header -->
+ </div><!-- #header -->
+
+ <div id="loop-default" class="mega-section">
+ <span class="mega-title">default loop</span>
+ <div id="main">
+ <div id="primary" class="site-content">
+ <div id="content" role="main">
+ <?php
+ $loop = new WP_Query( 'posts_per_page=3' );
+
+ if ( $loop->have_posts() ) : ?>
+
+ <?php /* Start the Loop */ ?>
+ <?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
+
+ <?php
+ /* Include the Post-Format-specific template for the content.
+ * If you want to overload this in a child theme then include a file
+ * called content-___.php (where ___ is the Post Format name) and that will be used instead.
+ */
+ get_template_part( 'content', get_post_format() );
+ ?>
+
+ <?php endwhile; ?>
+
+ <?php debut_content_nav( 'nav-below' ); ?>
+
+ <?php endif; ?>
+ </div><!-- #content -->
+ </div><!-- #primary .site-content -->
+
+
+ </div>
+
View
35 style.css
@@ -1089,3 +1089,38 @@ object {
content: '';
}
}
+
+/* =Mega-styler
+----------------------------------------------- */
+
+.mega {
+ border: none;
+}
+.mega #page {
+ margin: 0;
+ max-width: none;
+ padding: 0;
+ width: 100%;
+}
+.mega-section {
+ border: 1px solid #efefef;
+ border-width: 1px 1px 0 0;
+ float: left;
+ padding: 2%;
+ position: relative;
+ width: 46%;
+}
+.mega-title {
+ color: #efefef;
+ font: 300 12px/1 Helvetica, Arial, sans-serif;
+ position: absolute;
+ right: 5px;
+ top: 5px;
+}
+#main,
+#primary,
+#secondary {
+ margin: 0;
+ padding: 0;
+ width: 100%;
+}
Please sign in to comment.
Something went wrong with that request. Please try again.