diff options
-rw-r--r-- | Makefile | 43 | ||||
-rw-r--r-- | header.php | 112 | ||||
-rw-r--r-- | header.php.patch | 22 | ||||
-rw-r--r-- | index.php | 55 | ||||
-rw-r--r-- | index.php.patch | 11 | ||||
-rw-r--r-- | single.php | 34 | ||||
-rw-r--r-- | single.php.patch | 23 | ||||
-rw-r--r-- | style.scss (renamed from style.css) | 197 | ||||
-rw-r--r-- | twentyeleven-fix.scss | 58 |
9 files changed, 256 insertions, 299 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..5abcf8e --- /dev/null +++ b/Makefile @@ -0,0 +1,43 @@ +RM = rm -f +CP = cp +PATCH = patch +SASS = sass +PHP = php + +srcfiles = \ + Makefile \ + license.txt \ + twentyeleven-fix.scss \ + style.scss \ + functions.php \ + screenshot.png \ + index.php.patch \ + header.php.patch \ + single.php.patch \ + content-single.php + +all: style.css .gitignore header.php index.php single.php + +style.css: twentyeleven-fix.scss + +%: %.patch ../twentyeleven/% + $(RM) $@ + $(CP) ../twentyeleven/$@ $@ + $(PATCH) $@ < $@.patch + +%.css: %.scss + $(SASS) $< $@ + +%: %.php + $(PHP) -f $< > $@ + +%.png: %.svg + rsvg-convert $< > $@.$$$$ && pngcrush $@.$$$$ $@ ; $(RM) $@.$$$$ + +.gitignore: Makefile + echo "# DO NOT EDIT, this file is automatically made by \`Makefile'" >$@ + echo '# ' >> '$@' + echo '# ignore everyting' >> '$@' + echo '*' >> '$@' + echo '# but these:' >> '$@' + for file in $(srcfiles); do echo !"$$file" >> '$@'; done diff --git a/header.php b/header.php deleted file mode 100644 index 31c0e1d..0000000 --- a/header.php +++ /dev/null @@ -1,112 +0,0 @@ -<?php
-/**
- * The Header for our theme.
- *
- * Displays all of the <head> section and everything up till <div id="main">
- *
- * @package WordPress
- * @subpackage Twenty_Eleven
- * @since Twenty Eleven 1.0
- */
-?><!DOCTYPE html>
-<!--[if IE 6]>
-<html id="ie6" <?php language_attributes(); ?>>
-<![endif]-->
-<!--[if IE 7]>
-<html id="ie7" <?php language_attributes(); ?>>
-<![endif]-->
-<!--[if IE 8]>
-<html id="ie8" <?php language_attributes(); ?>>
-<![endif]-->
-<!--[if !(IE 6) | !(IE 7) | !(IE 8) ]><!-->
-<html <?php language_attributes(); ?>>
-<!--<![endif]-->
-<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', 'twentyeleven' ), max( $paged, $page ) );
-
- ?></title>
-<link rel="profile" href="http://gmpg.org/xfn/11" />
-<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
-<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" class="hfeed">
- <header id="branding" role="banner">
- <hgroup>
- <h1 id="site-title"><span><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></h1>
- <h2 id="site-description"><?php bloginfo( 'description' ); ?></h2>
- </hgroup>
-
- <?php
- // Check to see if the header image has been removed
- $header_image = get_header_image();
- if ( ! empty( $header_image ) ) :
- ?>
- <a href="<?php echo esc_url( home_url( '/' ) ); ?>">
- <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" />
- </a>
- <?php endif; // end check for removed header image ?>
-
- <?php
- // Has the text been hidden?
- if ( 'blank' == get_header_textcolor() ) :
- ?>
- <div class="only-search<?php if ( ! empty( $header_image ) ) : ?> with-image<?php endif; ?>">
- <?php get_search_form(); ?>
- </div>
- <?php
- else :
- ?>
- <?php get_search_form(); ?>
- <?php endif; ?>
-
- <nav id="access" role="navigation">
- <h3 class="assistive-text"><?php _e( 'Main menu', 'twentyeleven' ); ?></h3>
- <?php /* Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff. */ ?>
- <div class="skip-link"><a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to primary content', 'twentyeleven' ); ?>"><?php _e( 'Skip to primary content', 'twentyeleven' ); ?></a></div>
- <div class="skip-link"><a class="assistive-text" href="#secondary" title="<?php esc_attr_e( 'Skip to secondary content', 'twentyeleven' ); ?>"><?php _e( 'Skip to secondary content', 'twentyeleven' ); ?></a></div>
- <?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. */ ?>
- <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
- </nav><!-- #access -->
- </header><!-- #branding -->
-
-
- <div id="main">
\ No newline at end of file diff --git a/header.php.patch b/header.php.patch new file mode 100644 index 0000000..d2552b8 --- /dev/null +++ b/header.php.patch @@ -0,0 +1,22 @@ +--- ../twentyeleven/header.php 2011-09-29 13:42:35.000000000 -0400 ++++ header.php 2011-09-29 15:52:58.000000000 -0400 +@@ -81,18 +81,7 @@ + if ( ! empty( $header_image ) ) : + ?> + <a href="<?php echo esc_url( home_url( '/' ) ); ?>"> +- <?php +- // The header image +- // Check if this is a post or page, if it has a thumbnail, and if it's a big one +- if ( is_singular() && +- has_post_thumbnail( $post->ID ) && +- ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( HEADER_IMAGE_WIDTH, HEADER_IMAGE_WIDTH ) ) ) && +- $image[1] >= HEADER_IMAGE_WIDTH ) : +- // Houston, we have a new header image! +- echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' ); +- else : ?> +- <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" /> +- <?php endif; // end check for featured image or standard header ?> ++ <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" /> + </a> + <?php endif; // end check for removed header image ?> + diff --git a/index.php b/index.php deleted file mode 100644 index bd5bf40..0000000 --- a/index.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -/** - * The main template file. - * - * This is the most generic template file in a WordPress theme - * and one of the two required files for a theme (the other being style.css). - * It is used to display a page when nothing more specific matches a query. - * E.g., it puts together the home page when no home.php file exists. - * Learn more: http://codex.wordpress.org/Template_Hierarchy - * - * @package WordPress - * @subpackage Twenty_Eleven - */ - -get_header(); ?> - - <div id="primary"> - - <div id="content" role="main"> - - <?php get_sidebar( 'index' ); ?> - - <?php if ( have_posts() ) : ?> - - <?php twentyeleven_content_nav( 'nav-above' ); ?> - - <?php /* Start the Loop */ ?> - <?php while ( have_posts() ) : the_post(); ?> - - <?php get_template_part( 'content', get_post_format() ); ?> - - <?php endwhile; ?> - - <?php twentyeleven_content_nav( 'nav-below' ); ?> - - <?php else : ?> - - <article id="post-0" class="post no-results not-found"> - <header class="entry-header"> - <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1> - </header><!-- .entry-header --> - - <div class="entry-content"> - <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p> - <?php get_search_form(); ?> - </div><!-- .entry-content --> - </article><!-- #post-0 --> - - <?php endif; ?> - - </div><!-- #content --> - </div><!-- #primary --> - -<?php get_sidebar(); ?> -<?php get_footer(); ?>
\ No newline at end of file diff --git a/index.php.patch b/index.php.patch new file mode 100644 index 0000000..d7ee177 --- /dev/null +++ b/index.php.patch @@ -0,0 +1,11 @@ +--- ../twentyeleven/index.php 2011-09-29 13:43:12.000000000 -0400 ++++ index.php 2011-09-29 15:56:54.000000000 -0400 +@@ -17,6 +17,8 @@ + <div id="primary"> + <div id="content" role="main"> + ++ <?php get_sidebar( 'index' ); ?> ++ + <?php if ( have_posts() ) : ?> + + <?php twentyeleven_content_nav( 'nav-above' ); ?> diff --git a/single.php b/single.php deleted file mode 100644 index 8d1ed27..0000000 --- a/single.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php
-/**
- * The Template for displaying all single posts.
- *
- * @package WordPress
- * @subpackage Twenty_Eleven
- * @since Twenty Eleven 1.0
- */
-
-get_header(); ?>
-
- <div id="primary">
- <div id="content" role="main">
-
- <?php while ( have_posts() ) : the_post(); ?>
-
- <!-- Remove the "Previous" and "Next" links, uncomment if you'd like these
- <nav id="nav-single">
- <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3>
- <span class="nav-previous"><?php previous_post_link( '%link', __( '<span class="meta-nav">←</span> Previous', 'twentyeleven' ) ); ?></span>
- <span class="nav-next"><?php next_post_link( '%link', __( 'Next <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?></span>
- </nav> --> <!-- #nav-single -->
-
-
- <?php get_template_part( 'content', 'single' ); ?>
-
- <?php comments_template( '', true ); ?>
-
- <?php endwhile; // end of the loop. ?>
-
- </div><!-- #content -->
- </div><!-- #primary -->
-<?php get_sidebar(); ?>
-<?php get_footer(); ?>
\ No newline at end of file diff --git a/single.php.patch b/single.php.patch new file mode 100644 index 0000000..97a9e00 --- /dev/null +++ b/single.php.patch @@ -0,0 +1,23 @@ +--- ../twentyeleven/single.php 2011-09-29 13:43:25.000000000 -0400 ++++ single.php 2011-09-29 16:23:02.000000000 -0400 +@@ -14,11 +14,12 @@ + + <?php while ( have_posts() ) : the_post(); ?> + ++ <!-- Remove the "Previous" and "Next" links, uncomment if you'd like these + <nav id="nav-single"> + <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3> + <span class="nav-previous"><?php previous_post_link( '%link', __( '<span class="meta-nav">←</span> Previous', 'twentyeleven' ) ); ?></span> + <span class="nav-next"><?php next_post_link( '%link', __( 'Next <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?></span> +- </nav><!-- #nav-single --> ++ </nav> --> <!-- #nav-single --> + + <?php get_template_part( 'content', 'single' ); ?> + +@@ -29,4 +30,5 @@ + </div><!-- #content --> + </div><!-- #primary --> + ++<?php get_sidebar(); ?> + <?php get_footer(); ?> +\ No newline at end of file @@ -1,98 +1,99 @@ -/*
-Theme Name: North Star - Twenty Eleven
-Theme URI: http://lnnorthstar.org
-
-Author: Luke Shumaker, based on work by the WordPress team and Chris Aprea
-Author URI: http://lukeshu.ath.cx
-
-License: GNU General Public License
-License URI: license.txt
-
-Description: The North Star 2011-2012 theme, a child of Twenty Eleven
-Version: 0.1
-Tags: multi-author, significant-rolls
-
-Template: twentyeleven
-*/
-
-@import url('../twentyeleven/style.css');
-
-/* Document-structure-y things */
-
-.entry-header {
- font-size: .8em; }
- .entry-header figure {
- margin: 0; }
- .entry-header figure img {
- width: 100%;
- height: auto; }
- .entry-header figure figcapteion {}
- .entry-header figure figcaption strong {
- text-transform: uppercase; }
- .entry-header figure figcaption cite {
- float: right;
- width: 100%;
- text-align: right;
- text-transform: lowercase; }
- .entry-header figure figcaption .alignleft,
- .entry-header figure figcaption .alignright {
- /* These are obsolete, but I keep them around
- * because some old captions have them hardcoded
- * in, and I don't want to change them. */
- width: 45%;
- margin-bottom: 1.5em; }
- .entry-header .entry-meta {}
- .authors {
- display: block;
- float: left; }
- .authors > * {
- float: left;
- margin-right: 0.5em; }
- .vcard {}
- .vcard * {
- display: block; }
- .vcard .role {
- text-transform: uppercase; }
- span.entry-date {
- display: block;
- float: right; }
-
-.entry-content,
-.entry-summary {
- clear: both;
-}
-
-/* Generic things */
-
-blockquote {}
- blockquote:before,
- blockquote:after {
- color: #740000;
- display: block;
- line-height: 1em;
- font-size: 4em; }
- blockquote:before {
- content: "“";
- height: 0;
- margin-left: -1em; }
- blockquote:after {
- content: "”";
- margin-left: 100%;
- margin-top: -1.25em;
- margin-bottom: 1.25em; }
- blockquote p {
- margin-bottom: 0.5em; }
- blockquote footer {
- text-align: right;
- margin-bottom: 2em; }
-
-dd {
- margin-bottom: auto;
- margin-left: 4em; }
-
-/* Specific things */
-
-.widget_statusnetwidget h3 {
- background: url('https://si0.twimg.com/images/dev/cms/intents/bird/bird_blue/bird_16_blue.png') no-repeat left center;
- padding-left: 24px;
-}
+/* +Theme Name: North Star - Twenty Eleven +Theme URI: http://lnnorthstar.org + +Author: Luke Shumaker, based on work by the WordPress team and Chris Aprea +Author URI: http://lukeshu.ath.cx + +License: GNU General Public License +License URI: license.txt + +Description: The North Star 2011-2012 theme, a child of Twenty Eleven +Version: 0.1 +Tags: multi-author, significant-rolls + +Template: twentyeleven +*/ + +@import url('../twentyeleven/style.css'); +@import "twentyeleven-fix.scss"; + +/* Document-structure-y things */ + +.entry-header { + font-size: .8em; } + .entry-header figure { + margin: 0; } + .entry-header figure img { + width: 100%; + height: auto; } + .entry-header figure figcapteion {} + .entry-header figure figcaption strong { + text-transform: uppercase; } + .entry-header figure figcaption cite { + float: right; + width: 100%; + text-align: right; + text-transform: lowercase; } + .entry-header figure figcaption .alignleft, + .entry-header figure figcaption .alignright { + /* These are obsolete, but I keep them around + * because some old captions have them hardcoded + * in, and I don't want to change them. */ + width: 45%; + margin-bottom: 1.5em; } + .entry-header .entry-meta {} + .authors { + display: block; + float: left; } + .authors > * { + float: left; + margin-right: 0.5em; } + .vcard {} + .vcard * { + display: block; } + .vcard .role { + text-transform: uppercase; } + span.entry-date { + display: block; + float: right; } + +.entry-content, +.entry-summary { + clear: both; +} + +/* Generic things */ + +blockquote {} + blockquote:before, + blockquote:after { + color: #740000; + display: block; + line-height: 1em; + font-size: 4em; } + blockquote:before { + content: "“"; + height: 0; + margin-left: -1em; } + blockquote:after { + content: "”"; + margin-left: 100%; + margin-top: -1.25em; + margin-bottom: 1.25em; } + blockquote p { + margin-bottom: 0.5em; } + blockquote footer { + text-align: right; + margin-bottom: 2em; } + +dd { + margin-bottom: auto; + margin-left: 4em; } + +/* Specific things */ + +.widget_statusnetwidget h3 { + background: url('https://si0.twimg.com/images/dev/cms/intents/bird/bird_blue/bird_16_blue.png') no-repeat left center; + padding-left: 24px; +} diff --git a/twentyeleven-fix.scss b/twentyeleven-fix.scss new file mode 100644 index 0000000..7c1d44d --- /dev/null +++ b/twentyeleven-fix.scss @@ -0,0 +1,58 @@ +body #page header#branding #access { + ul { + :hover > ul, + :hover + ul, + :active > ul, + :active + ul, + :focus > ul, + :focus + ul { + display: block; + } + } +} + +@media (max-width: 800px) { + body #page header#branding { + .only-search, #searchform { + padding-right: 10px+28px;// matches twentyeleven values + } + #searchform { + position: relative !important; + top: auto !important; + bottom: auto !important; + left: auto !important; + right: auto !important; + width: 100%; + max-width: none; + .field { + float: none; + width: 100%; + display: block; + margin-left: -1px; // match border width + } + } + #access { + ul, div { + margin: 0; + padding: 0; + } + ul { + li { + float: none; + display: block; + width: 50%; + ul { + left: 100%; + top: 0; + } + ul { + width: 100%; + li, a { + width: auto; + } + } + } + } + } + } +}
\ No newline at end of file |