From 9a71d785746c454e67dbfa59d453aaa67e5f69b3 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Sep 2011 16:41:33 -0400 Subject: use scss, save derived php files as patches, and inlude twentyeleven-fix.scss --- Makefile | 43 +++++++++++++++++++ header.php | 112 -------------------------------------------------- header.php.patch | 22 ++++++++++ index.php | 55 ------------------------- index.php.patch | 11 +++++ single.php | 34 --------------- single.php.patch | 23 +++++++++++ style.css | 98 ------------------------------------------- style.scss | 99 ++++++++++++++++++++++++++++++++++++++++++++ twentyeleven-fix.scss | 58 ++++++++++++++++++++++++++ 10 files changed, 256 insertions(+), 299 deletions(-) create mode 100644 Makefile delete mode 100644 header.php create mode 100644 header.php.patch delete mode 100644 index.php create mode 100644 index.php.patch delete mode 100644 single.php create mode 100644 single.php.patch delete mode 100644 style.css create mode 100644 style.scss create mode 100644 twentyeleven-fix.scss 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 @@ - section and everything up till
- * - * @package WordPress - * @subpackage Twenty_Eleven - * @since Twenty Eleven 1.0 - */ -?> - - - - -> - - - - -<?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 ) ); - - ?> - - - - - - * tag of your theme, or you will break many plugins, which - * generally use this hook to add elements to such - * as styles, scripts, and meta tags. - */ - wp_head(); -?> - - -> -
- - - -
\ 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 ) ) : + ?> + +- 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 : ?> +- +- ++ <?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?> + + + diff --git a/index.php b/index.php deleted file mode 100644 index bd5bf40..0000000 --- a/index.php +++ /dev/null @@ -1,55 +0,0 @@ - - -
- -
- - - - - - - - - - - - - - - - - - -
-
-

-
- -
-

- -
-
- - - -
-
- - - \ 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 @@ +
+
+ ++ ++ + + + diff --git a/single.php b/single.php deleted file mode 100644 index 8d1ed27..0000000 --- a/single.php +++ /dev/null @@ -1,34 +0,0 @@ - - -
-
- - - - - - - - - - - - -
-
- - \ 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 @@ + + + ++ ++ --> + + + +@@ -29,4 +30,5 @@ +
+
+ ++ + +\ No newline at end of file diff --git a/style.css b/style.css deleted file mode 100644 index 3768ec8..0000000 --- a/style.css +++ /dev/null @@ -1,98 +0,0 @@ -/* -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; -} diff --git a/style.scss b/style.scss new file mode 100644 index 0000000..3c974fb --- /dev/null +++ b/style.scss @@ -0,0 +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'); +@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 -- cgit v1.2.3