From cbcfcf27396a8400df2e01da669831ddb4b38db9 Mon Sep 17 00:00:00 2001 From: Galen Gidman Date: Sat, 11 Feb 2012 10:25:21 -0600 Subject: [PATCH 1/6] fixed hard-coded links --- footer.php | 2 +- loop-single.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/footer.php b/footer.php index 08e3946..762470b 100644 --- a/footer.php +++ b/footer.php @@ -6,7 +6,7 @@

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

-

+

diff --git a/loop-single.php b/loop-single.php index 4387f98..8e38bac 100644 --- a/loop-single.php +++ b/loop-single.php @@ -33,14 +33,14 @@
-

HTML

copy +

HTML

copy
-

CSS

copy +

CSS

copy From ebf0d43767251b851d71dfe0f68f35be6818b3ad Mon Sep 17 00:00:00 2001 From: Galen Gidman Date: Sat, 11 Feb 2012 11:01:57 -0600 Subject: [PATCH 2/6] fixed bug that added extra whitespace after css & html boxes --- loop-single.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/loop-single.php b/loop-single.php index 8e38bac..b70eff3 100644 --- a/loop-single.php +++ b/loop-single.php @@ -34,16 +34,12 @@

HTML

copy - +

CSS

copy - +
From 25dd060a05df4b11450a7b270afdc420db4c20cc Mon Sep 17 00:00:00 2001 From: Galen Gidman Date: Sat, 11 Feb 2012 11:02:38 -0600 Subject: [PATCH 3/6] made pages display as posts --- page.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/page.php b/page.php index 1a55042..8bf319d 100644 --- a/page.php +++ b/page.php @@ -22,7 +22,7 @@ * If you want to overload this in a child theme then include a file * called loop-page.php and that will be used instead. */ - get_template_part( 'loop', 'page' ); + get_template_part( 'loop', 'single' ); ?>
From 1f0f9800f80be3a91dc2f1a1dc0d9cc5767b932d Mon Sep 17 00:00:00 2001 From: Galen Gidman Date: Sat, 11 Feb 2012 11:03:04 -0600 Subject: [PATCH 4/6] I like smooth fonts :) --- css/screen.less | 1 + 1 file changed, 1 insertion(+) diff --git a/css/screen.less b/css/screen.less index 50cafda..0537de4 100644 --- a/css/screen.less +++ b/css/screen.less @@ -104,6 +104,7 @@ body { padding: 0 0 15px 0; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; color: @text-color; + -webkit-font-smoothing: antialiased; font-size: 100%; background: #e6eaec url(../images/tile.png); } From 9af621606c49313131c07d1a578e60d8ccb9125c Mon Sep 17 00:00:00 2001 From: Galen Gidman Date: Sun, 12 Feb 2012 11:40:50 -0600 Subject: [PATCH 5/6] made a *ton* of edits + deletions to clean things up --- 404.php | 30 -- README => README.txt | 4 +- archive.php | 61 ---- attachment.php | 26 -- author.php | 60 ---- category.php | 34 --- comments.php | 79 ----- editor-style-rtl.css | 56 ---- editor-style.css | 292 ------------------- footer.php | 74 +++-- functions.php | 564 ++---------------------------------- header.php | 45 ++- index.php | 60 ++-- loop-attachment.php | 117 -------- loop-page.php | 23 -- loop-single.php | 53 ---- loop.php | 181 ------------ onecolumn-page.php | 31 -- page.php | 32 -- search.php | 37 --- sidebar-footer.php | 60 ---- sidebar.php | 87 +++--- single.php | 20 -- style.css | 2 +- {css => styles}/screen.less | 152 +++++----- tag.php | 30 -- 26 files changed, 232 insertions(+), 1978 deletions(-) delete mode 100644 404.php rename README => README.txt (88%) delete mode 100644 archive.php delete mode 100644 attachment.php delete mode 100644 author.php delete mode 100644 category.php delete mode 100644 comments.php delete mode 100644 editor-style-rtl.css delete mode 100644 editor-style.css delete mode 100644 loop-attachment.php delete mode 100644 loop-page.php delete mode 100644 loop-single.php delete mode 100644 loop.php delete mode 100644 onecolumn-page.php delete mode 100644 page.php delete mode 100644 search.php delete mode 100644 sidebar-footer.php delete mode 100644 single.php rename {css => styles}/screen.less (95%) delete mode 100644 tag.php diff --git a/404.php b/404.php deleted file mode 100644 index 3baea81..0000000 --- a/404.php +++ /dev/null @@ -1,30 +0,0 @@ - - -
-
- -
-

-
-

- -
-
- -
-
- - - \ No newline at end of file diff --git a/README b/README.txt similarity index 88% rename from README rename to README.txt index 8a1b180..9337281 100644 --- a/README +++ b/README.txt @@ -1,7 +1,7 @@ Pears are common patterns of markup & style. Pears is an open source WordPress theme. I'll admit the code -is a bit rough, initially based on the default 'twentyone' theme. +is a bit rough, initially based on the default 'twentyten' theme. I wanted a handy way of collecting HTML & CSS pattern pairs. Often used modules with a minimal of style applied. It's become @@ -23,4 +23,4 @@ Enjoy. Dan Cederholm Salem, Massachusetts February, 2012 -http://simplebits.com +http://simplebits.com \ No newline at end of file diff --git a/archive.php b/archive.php deleted file mode 100644 index 0707e18..0000000 --- a/archive.php +++ /dev/null @@ -1,61 +0,0 @@ - - -
-
- - - -

- - %s', 'twentyten' ), get_the_date() ); ?> - - %s', 'twentyten' ), get_the_date( 'F Y' ) ); ?> - - %s', 'twentyten' ), get_the_date( 'Y' ) ); ?> - - - -

- - - -
-
- - - diff --git a/attachment.php b/attachment.php deleted file mode 100644 index 5b35936..0000000 --- a/attachment.php +++ /dev/null @@ -1,26 +0,0 @@ - - -
-
- - - -
-
- - diff --git a/author.php b/author.php deleted file mode 100644 index 2bd48c8..0000000 --- a/author.php +++ /dev/null @@ -1,60 +0,0 @@ - - -
-
- - - -

" . get_the_author() . "" ); ?>

- - -
-
- -
-
-

- -
-
- - - -
-
- - - diff --git a/category.php b/category.php deleted file mode 100644 index 0792e1f..0000000 --- a/category.php +++ /dev/null @@ -1,34 +0,0 @@ - - -
-
- -

' . single_cat_title( '', false ) . '' ); - ?>

- ' . $category_description . '
'; - - /* Run the loop for the category page to output the posts. - * If you want to overload this in a child theme then include a file - * called loop-category.php and that will be used instead. - */ - get_template_part( 'loop', 'category' ); - ?> - -
-
- - - diff --git a/comments.php b/comments.php deleted file mode 100644 index 7863ca1..0000000 --- a/comments.php +++ /dev/null @@ -1,79 +0,0 @@ - - -
- -

-
- - - - - -

' . get_the_title() . '' ); - ?>

- - 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?> - - - -
    - 'twentyten_comment' ) ); - ?> -
- - 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?> - - - - -

- - - - - - - diff --git a/editor-style-rtl.css b/editor-style-rtl.css deleted file mode 100644 index 2c69a7c..0000000 --- a/editor-style-rtl.css +++ /dev/null @@ -1,56 +0,0 @@ -/* -Theme Name: Twenty Ten -*/ -/* -Used to style the TinyMCE editor. -*/ -html .mceContentBody{ - direction:rtl; - unicode-bidi:embed; - float:right; -} -* { - font-family: Arial, Tahoma, sans-serif; -} -/* Text elements */ -ul { - margin: 0 -18px 18px 0; -} -ol { - margin: 0 -18px 18px 0; -} -dd { - margin-right: 0; -} -blockquote { - font-style: normal; -} -table { - text-align: right; - margin: 0 0 24px -1px; -} -html .mceContentBody{ - direction:rtl; - unicode-bidi:embed; - float:right; -} -* { - font-family: Arial, Tahoma, sans-serif; -} -/* Text elements */ -ul { - margin: 0 -18px 18px 0; -} -ol { - margin: 0 -18px 18px 0; -} -dd { - margin-right: 0; -} -blockquote { - font-style: normal; -} -table { - text-align: right; - margin: 0 0 24px -1px; -} \ No newline at end of file diff --git a/editor-style.css b/editor-style.css deleted file mode 100644 index 7d05135..0000000 --- a/editor-style.css +++ /dev/null @@ -1,292 +0,0 @@ -/* -Theme Name: Twenty Ten -Description: Used to style the TinyMCE editor. -*/ -html .mceContentBody { - max-width: 640px; -} -* { - color: #444; - font-family: Georgia, "Bitstream Charter", serif; - line-height: 1.5; -} -p, -dl, -td, -th, -ul, -ol, -blockquote { - font-size: 16px; -} -tr th, -thead th, -label, -tr th, -thead th { - font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif; -} -pre { - font-family: "Courier 10 Pitch", Courier, monospace; -} -code, code var { - font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; -} -body, input, textarea { - font-size: 12px; - line-height: 18px; -} -hr { - background-color: #e7e7e7; - border: 0; - clear: both; - height: 1px; - margin-bottom: 18px; -} -/* Text elements */ -p { - margin-bottom: 18px; -} -ul { - list-style: square; - margin: 0 0 18px 1.5em; -} -ol { - list-style: decimal; - margin: 0 0 18px 1.5em; -} -ol ol { - list-style: upper-alpha; -} -ol ol ol { - list-style: lower-roman; -} -ol ol ol ol { - list-style: lower-alpha; -} -ul ul, -ol ol, -ul ol, -ol ul { - margin-bottom: 0; -} -dl { - margin: 0 0 24px 0; -} -dt { - font-weight: bold; -} -dd { - margin-bottom: 18px; -} -strong { - color: #000; - font-weight: bold; -} -cite, -em, -i { - border: none; - font-style: italic; -} -big { - font-size: 131.25%; -} -ins { - background: #ffc; - border: none; - color: #333; -} -del { - text-decoration: line-through; - color: #555; -} -blockquote { - font-style: italic; - padding: 0 3em; -} -blockquote cite, -blockquote em, -blockquote i { - font-style: normal; -} -pre { - background: #f7f7f7; - color: #222; - line-height: 18px; - margin-bottom: 18px; - padding: 1.5em; -} -abbr, -acronym { - border-bottom: 1px dotted #666; - cursor: help; -} -ins { - text-decoration: none; -} -sup, -sub { - font-size: 10px; - height: 0; - line-height: 1; - position: relative; - vertical-align: baseline; -} -sup { - bottom: 1ex; -} -sub { - top: .5ex; -} -a:link { - color: #06c; -} -a:visited { - color: #743399; -} -a:active, -a:hover { - color: #ff4b33; -} -p, -ul, -ol, -dd, -pre, -hr { - margin-bottom: 24px; -} -ul ul, -ol ol, -ul ol, -ol ul { - margin-bottom: 0; -} -pre, -kbd, -tt, -var { - font-size: 15px; - line-height: 21px; -} -code { - font-size: 13px; -} -strong, -b, -dt, -th { - color: #000; -} -h1, -h2, -h3, -h4, -h5, -h6 { - color: #000; - font-weight: normal; - line-height: 1.5em; - margin: 0 0 20px 0; -} -h1 { - font-size: 2.4em; -} -h2 { - font-size: 1.8em; -} -h3 { - font-size: 1.4em; -} -h4 { - font-size: 1.2em; -} -h5 { - font-size: 1em; -} -h6 { - font-size: 0.9em; -} -table { - border: 1px solid #e7e7e7 !important; - border-collapse: collapse; - border-spacing: 0; - margin: 0 -1px 24px 0; - text-align: left; - width: 100%; -} -tr th, -thead th { - border: none !important; - color: #888; - font-size: 12px; - font-weight: bold; - line-height: 18px; - padding: 9px 24px; -} -tr td { - border: none !important; - border-top: 1px solid #e7e7e7 !important; - padding: 6px 24px; -} -img { - margin: 0; -} -img.size-auto, -img.size-large, -img.size-full, -img.size-medium { - max-width: 100%; - height: auto; -} -.alignleft, -img.alignleft { - display: inline; - float: left; - margin-right: 24px; - margin-top: 4px; -} -.alignright, -img.alignright { - display: inline; - float: right; - margin-left: 24px; - margin-top: 4px; -} -.aligncenter, -img.aligncenter { - clear: both; - display: block; - margin-left: auto; - margin-right: auto; -} -img.alignleft, -img.alignright, -img.aligncenter { - margin-bottom: 12px; -} -.wp-caption { - background: #f1f1f1; - border: none; - -khtml-border-radius: 0; - -moz-border-radius: 0; - -webkit-border-radius: 0; - border-radius: 0; - color: #888; - font-size: 12px; - line-height: 18px; - margin-bottom: 20px; - max-width: 632px !important; /* prevent too-wide images from breaking layout */ - padding: 4px; - text-align: center; -} -.wp-caption img { - margin: 5px; -} -.wp-caption p.wp-caption-text { - margin: 0 0 4px; -} -.wp-smiley { - margin: 0; -} \ No newline at end of file diff --git a/footer.php b/footer.php index 762470b..4631af5 100644 --- a/footer.php +++ b/footer.php @@ -1,45 +1,43 @@ - - + - + - - + + - + // expand/collapse side nav + $('#nav-toggle').click(function() { + $('body').toggleClass('expanded'); + return false; + }); + }); + + + - - + \ No newline at end of file diff --git a/functions.php b/functions.php index 326082f..d7c7b10 100644 --- a/functions.php +++ b/functions.php @@ -1,564 +1,52 @@ - * add_action( 'after_setup_theme', 'my_child_theme_setup' ); - * function my_child_theme_setup() { - * // We are providing our own filter for excerpt_length (or using the unfiltered value) - * remove_filter( 'excerpt_length', 'twentyten_excerpt_length' ); - * ... - * } - * - * - * For more information on hooks, actions, and filters, see http://codex.wordpress.org/Plugin_API. - * - * @package WordPress - * @subpackage Twenty_Ten - * @since Twenty Ten 1.0 - */ -/** - * Set the content width based on the theme's design and stylesheet. - * - * Used to set the width of images and content. Should be equal to the width the theme - * is designed for, generally via the style.css stylesheet. - */ -if ( ! isset( $content_width ) ) - $content_width = 640; - -/** Tell WordPress to run twentyten_setup() when the 'after_setup_theme' hook is run. */ -add_action( 'after_setup_theme', 'twentyten_setup' ); - -if ( ! function_exists( 'twentyten_setup' ) ): -/** - * Sets up theme defaults and registers support for various WordPress features. - * - * Note that this function is hooked into the after_setup_theme hook, which runs - * before the init hook. The init hook is too late for some features, such as indicating - * support post thumbnails. - * - * To override twentyten_setup() in a child theme, add your own twentyten_setup to your child theme's - * functions.php file. - * - * @uses add_theme_support() To add support for post thumbnails and automatic feed links. - * @uses register_nav_menus() To add support for navigation menus. - * @uses add_custom_background() To add support for a custom background. - * @uses add_editor_style() To style the visual editor. - * @uses load_theme_textdomain() For translation/localization support. - * @uses add_custom_image_header() To add support for a custom header. - * @uses register_default_headers() To register the default custom header images provided with the theme. - * @uses set_post_thumbnail_size() To set a custom post thumbnail size. - * - * @since Twenty Ten 1.0 - */ -function twentyten_setup() { - - // This theme styles the visual editor with editor-style.css to match the theme style. - add_editor_style(); - - // Post Format support. You can also use the legacy "gallery" or "asides" (note the plural) categories. - add_theme_support( 'post-formats', array( 'aside', 'gallery' ) ); - - // This theme uses post thumbnails - add_theme_support( 'post-thumbnails' ); - - // Add default posts and comments RSS feed links to head - add_theme_support( 'automatic-feed-links' ); - - // Make theme available for translation - // Translations can be filed in the /languages/ directory - load_theme_textdomain( 'twentyten', TEMPLATEPATH . '/languages' ); - - $locale = get_locale(); - $locale_file = TEMPLATEPATH . "/languages/$locale.php"; - if ( is_readable( $locale_file ) ) - require_once( $locale_file ); - - // This theme uses wp_nav_menu() in one location. - register_nav_menus( array( - 'primary' => __( 'Primary Navigation', 'twentyten' ), - ) ); - - // This theme allows users to set a custom background - add_custom_background(); - - // Your changeable header business starts here - if ( ! defined( 'HEADER_TEXTCOLOR' ) ) - define( 'HEADER_TEXTCOLOR', '' ); - - // No CSS, just IMG call. The %s is a placeholder for the theme template directory URI. - if ( ! defined( 'HEADER_IMAGE' ) ) - define( 'HEADER_IMAGE', '%s/images/headers/path.jpg' ); - - // The height and width of your custom header. You can hook into the theme's own filters to change these values. - // Add a filter to twentyten_header_image_width and twentyten_header_image_height to change these values. - define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyten_header_image_width', 940 ) ); - define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyten_header_image_height', 198 ) ); - - // We'll be using post thumbnails for custom header images on posts and pages. - // We want them to be 940 pixels wide by 198 pixels tall. - // Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php. - set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true ); - - // Don't support text inside the header image. - if ( ! defined( 'NO_HEADER_TEXT' ) ) - define( 'NO_HEADER_TEXT', true ); - - // Add a way for the custom header to be styled in the admin panel that controls - // custom headers. See twentyten_admin_header_style(), below. - add_custom_image_header( '', 'twentyten_admin_header_style' ); - - // ... and thus ends the changeable header business. - - // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI. - register_default_headers( array( - 'berries' => array( - 'url' => '%s/images/headers/berries.jpg', - 'thumbnail_url' => '%s/images/headers/berries-thumbnail.jpg', - /* translators: header image description */ - 'description' => __( 'Berries', 'twentyten' ) - ), - 'cherryblossom' => array( - 'url' => '%s/images/headers/cherryblossoms.jpg', - 'thumbnail_url' => '%s/images/headers/cherryblossoms-thumbnail.jpg', - /* translators: header image description */ - 'description' => __( 'Cherry Blossoms', 'twentyten' ) - ), - 'concave' => array( - 'url' => '%s/images/headers/concave.jpg', - 'thumbnail_url' => '%s/images/headers/concave-thumbnail.jpg', - /* translators: header image description */ - 'description' => __( 'Concave', 'twentyten' ) - ), - 'fern' => array( - 'url' => '%s/images/headers/fern.jpg', - 'thumbnail_url' => '%s/images/headers/fern-thumbnail.jpg', - /* translators: header image description */ - 'description' => __( 'Fern', 'twentyten' ) - ), - 'forestfloor' => array( - 'url' => '%s/images/headers/forestfloor.jpg', - 'thumbnail_url' => '%s/images/headers/forestfloor-thumbnail.jpg', - /* translators: header image description */ - 'description' => __( 'Forest Floor', 'twentyten' ) - ), - 'inkwell' => array( - 'url' => '%s/images/headers/inkwell.jpg', - 'thumbnail_url' => '%s/images/headers/inkwell-thumbnail.jpg', - /* translators: header image description */ - 'description' => __( 'Inkwell', 'twentyten' ) - ), - 'path' => array( - 'url' => '%s/images/headers/path.jpg', - 'thumbnail_url' => '%s/images/headers/path-thumbnail.jpg', - /* translators: header image description */ - 'description' => __( 'Path', 'twentyten' ) - ), - 'sunset' => array( - 'url' => '%s/images/headers/sunset.jpg', - 'thumbnail_url' => '%s/images/headers/sunset-thumbnail.jpg', - /* translators: header image description */ - 'description' => __( 'Sunset', 'twentyten' ) - ) - ) ); -} -endif; - -if ( ! function_exists( 'twentyten_admin_header_style' ) ) : -/** - * Styles the header image displayed on the Appearance > Header admin panel. - * - * Referenced via add_custom_image_header() in twentyten_setup(). - * - * @since Twenty Ten 1.0 - */ -function twentyten_admin_header_style() { -?> - -' . __( 'Continue reading ', 'twentyten' ) . ''; -} - -/** - * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyten_continue_reading_link(). - * - * To override this in a child theme, remove the filter and add your own - * function tied to the excerpt_more filter hook. - * - * @since Twenty Ten 1.0 - * @return string An ellipsis - */ -function twentyten_auto_excerpt_more( $more ) { - return ' …' . twentyten_continue_reading_link(); -} -add_filter( 'excerpt_more', 'twentyten_auto_excerpt_more' ); - -/** - * Adds a pretty "Continue Reading" link to custom post excerpts. - * - * To override this link in a child theme, remove the filter and add your own - * function tied to the get_the_excerpt filter hook. - * - * @since Twenty Ten 1.0 - * @return string Excerpt with a pretty "Continue Reading" link - */ -function twentyten_custom_excerpt_more( $output ) { - if ( has_excerpt() && ! is_attachment() ) { - $output .= twentyten_continue_reading_link(); - } - return $output; -} -add_filter( 'get_the_excerpt', 'twentyten_custom_excerpt_more' ); - -/** - * Remove inline styles printed when the gallery shortcode is used. - * - * Galleries are styled by the theme in Twenty Ten's style.css. This is just - * a simple filter call that tells WordPress to not use the default styles. - * - * @since Twenty Ten 1.2 - */ -add_filter( 'use_default_gallery_style', '__return_false' ); - -/** - * Deprecated way to remove inline styles printed when the gallery shortcode is used. - * - * This function is no longer needed or used. Use the use_default_gallery_style - * filter instead, as seen above. - * - * @since Twenty Ten 1.0 - * @deprecated Deprecated in Twenty Ten 1.2 for WordPress 3.1 - * - * @return string The gallery style filter, with the styles themselves removed. - */ -function twentyten_remove_gallery_css( $css ) { - return preg_replace( "##s", '', $css ); -} -// Backwards compatibility with WordPress 3.0. -if ( version_compare( $GLOBALS['wp_version'], '3.1', '<' ) ) - add_filter( 'gallery_style', 'twentyten_remove_gallery_css' ); - -if ( ! function_exists( 'twentyten_comment' ) ) : -/** - * Template for comments and pingbacks. - * - * To override this walker in a child theme without modifying the comments template - * simply create your own twentyten_comment(), and that function will be used instead. - * - * Used as a callback by wp_list_comments() for displaying the comments. - * - * @since Twenty Ten 1.0 - */ -function twentyten_comment( $comment, $args, $depth ) { - $GLOBALS['comment'] = $comment; - switch ( $comment->comment_type ) : - case '' : - ?> -
  • id="li-comment-"> -
    -
    - - says:', 'twentyten' ), sprintf( '%s', get_comment_author_link() ) ); ?> -
    - comment_approved == '0' ) : ?> - -
    - - - - -
    - -
    - $depth, 'max_depth' => $args['max_depth'] ) ) ); ?> -
    -
    - - -
  • -

    - __( 'Primary Widget Area', 'twentyten' ), - 'id' => 'primary-widget-area', - 'description' => __( 'The primary widget area', 'twentyten' ), - 'before_widget' => '
  • ', - 'after_widget' => '
  • ', - 'before_title' => '

    ', - 'after_title' => '

    ', - ) ); - - // Area 2, located below the Primary Widget Area in the sidebar. Empty by default. - register_sidebar( array( - 'name' => __( 'Secondary Widget Area', 'twentyten' ), - 'id' => 'secondary-widget-area', - 'description' => __( 'The secondary widget area', 'twentyten' ), - 'before_widget' => '
  • ', - 'after_widget' => '
  • ', - 'before_title' => '

    ', - 'after_title' => '

    ', - ) ); - - // Area 3, located in the footer. Empty by default. - register_sidebar( array( - 'name' => __( 'First Footer Widget Area', 'twentyten' ), - 'id' => 'first-footer-widget-area', - 'description' => __( 'The first footer widget area', 'twentyten' ), - 'before_widget' => '
  • ', - 'after_widget' => '
  • ', - 'before_title' => '

    ', - 'after_title' => '

    ', - ) ); - - // Area 4, located in the footer. Empty by default. - register_sidebar( array( - 'name' => __( 'Second Footer Widget Area', 'twentyten' ), - 'id' => 'second-footer-widget-area', - 'description' => __( 'The second footer widget area', 'twentyten' ), - 'before_widget' => '
  • ', - 'after_widget' => '
  • ', - 'before_title' => '

    ', - 'after_title' => '

    ', - ) ); - - // Area 5, located in the footer. Empty by default. - register_sidebar( array( - 'name' => __( 'Third Footer Widget Area', 'twentyten' ), - 'id' => 'third-footer-widget-area', - 'description' => __( 'The third footer widget area', 'twentyten' ), - 'before_widget' => '
  • ', - 'after_widget' => '
  • ', - 'before_title' => '

    ', - 'after_title' => '

    ', - ) ); - - // Area 6, located in the footer. Empty by default. - register_sidebar( array( - 'name' => __( 'Fourth Footer Widget Area', 'twentyten' ), - 'id' => 'fourth-footer-widget-area', - 'description' => __( 'The fourth footer widget area', 'twentyten' ), - 'before_widget' => '
  • ', - 'after_widget' => '
  • ', - 'before_title' => '

    ', - 'after_title' => '

    ', - ) ); -} -/** Register sidebars by running twentyten_widgets_init() on the widgets_init hook. */ -add_action( 'widgets_init', 'twentyten_widgets_init' ); - -/** - * Removes the default styles that are packaged with the Recent Comments widget. - * - * To override this in a child theme, remove the filter and optionally add your own - * function tied to the widgets_init action hook. - * - * This function uses a filter (show_recent_comments_widget_style) new in WordPress 3.1 - * to remove the default style. Using Twenty Ten 1.2 in WordPress 3.0 will show the styles, - * but they won't have any effect on the widget in default Twenty Ten styling. - * - * @since Twenty Ten 1.0 - */ -function twentyten_remove_recent_comments_style() { - add_filter( 'show_recent_comments_widget_style', '__return_false' ); -} -add_action( 'widgets_init', 'twentyten_remove_recent_comments_style' ); - -if ( ! function_exists( 'twentyten_posted_on' ) ) : -/** - * Prints HTML with meta information for the current post-date/time and author. - * - * @since Twenty Ten 1.0 - */ -function twentyten_posted_on() { - printf( __( 'Posted on %2$s by %3$s', 'twentyten' ), - 'meta-prep meta-prep-author', - sprintf( '', - get_permalink(), - esc_attr( get_the_time() ), - get_the_date() - ), - sprintf( '%3$s', - get_author_posts_url( get_the_author_meta( 'ID' ) ), - sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ), - get_the_author() - ) - ); -} -endif; - -if ( ! function_exists( 'twentyten_posted_in' ) ) : -/** - * Prints HTML with meta information for the current post (category, tags and permalink). - * - * @since Twenty Ten 1.0 - */ -function twentyten_posted_in() { - // Retrieves tag list of current post, separated by commas. - $tag_list = get_the_tag_list( '', ', ' ); - if ( $tag_list ) { - $posted_in = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the permalink.', 'twentyten' ); - } elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) { - $posted_in = __( 'This entry was posted in %1$s. Bookmark the permalink.', 'twentyten' ); - } else { - $posted_in = __( 'Bookmark the permalink.', 'twentyten' ); - } - // Prints the string, replacing the placeholders. - printf( - $posted_in, - get_the_category_list( ', ' ), - $tag_list, - get_permalink(), - the_title_attribute( 'echo=0' ) - ); -} -endif; - -add_action( 'add_meta_boxes', 'pears_add_meta_box' ); -add_action( 'save_post', 'pears_save_post' ); +add_action('add_meta_boxes', 'pears_add_meta_box'); +add_action('save_post', 'pears_save_post'); + function pears_add_meta_box() { - add_meta_box( - 'pears', - 'Pears', - 'pears_meta_box', - 'post', - 'normal', - 'high' - ); + add_meta_box('pears', 'Pears', 'pears_meta_box', 'post', 'normal', 'high'); } -function pears_meta_box( $post ) { - wp_nonce_field( plugin_basename( __FILE__ ), 'pears_noncename' ); +function pears_meta_box($post) { + + wp_nonce_field( plugin_basename( __FILE__ ), 'pears_noncename'); - $html = get_post_meta($post->ID,'html',true); - $css = get_post_meta($post->ID,'css',true); + $html = get_post_meta($post->ID, 'html', true); + $css = get_post_meta($post->ID, 'css', true); echo '

    These fields are for the HTML markup and CSS styles. The post body can be used for notes.

    '; echo ''; echo '

    '; echo ' '; echo '

    '; + } -function pears_save_post( $post_id ) { +function pears_save_post($post_id) { // Ignore if doing an autosave - if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) - return; - - // verify data came from pears meta box - if ( !wp_verify_nonce( $_POST['pears_noncename'], plugin_basename( __FILE__ ) ) ) + if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) + return; + + // Verify data came from pears meta box + if (! wp_verify_nonce( $_POST['pears_noncename'], plugin_basename( __FILE__ ))) return; - // Check user permissions - if ( 'post' == $_POST['post_type'] ) { - if ( !current_user_can( 'edit_page', $post_id ) ) - return; - } - else{ - if ( !current_user_can( 'edit_post', $post_id ) ) - return; + // Check user permissions + if ( 'post' == $_POST['post_type'] ) { + if ( !current_user_can( 'edit_page', $post_id )) + return; + } else { + if (!current_user_can('edit_post', $post_id)) + return; } - - $html_data = $_POST['html']; + + $html_data = $_POST['html']; update_post_meta($post_id, 'html', $html_data); $css_data = $_POST['css']; update_post_meta($post_id, 'css', $css_data); -} +} \ No newline at end of file diff --git a/header.php b/header.php index ae60b3e..ddb06ee 100644 --- a/header.php +++ b/header.php @@ -1,33 +1,24 @@ - - -Pears <?php wp_title('/', true, 'left'); ?> - - - - - - - - + - - - - - - + + + Pears <?php wp_title('/', true, 'left'); ?> + + + + + + -> + - +
    + +
    -
    -
    +
    +
    \ No newline at end of file diff --git a/index.php b/index.php index 7bc3fd4..e38c686 100644 --- a/index.php +++ b/index.php @@ -1,32 +1,38 @@ - -get_header(); ?> +
    -
    -
    + + + + +
    +

    Pattern

    +

    +
    ID, 'html', true); ?>
    +
    + +
    +
    +

    HTML

    copy + +
    +
    +

    CSS

    copy + +
    +
    + + post_content != "") { ?> +
    +

    Notes

    + +
    + - -
    -
    + - + \ No newline at end of file diff --git a/loop-attachment.php b/loop-attachment.php deleted file mode 100644 index 20794fb..0000000 --- a/loop-attachment.php +++ /dev/null @@ -1,117 +0,0 @@ - - - - - post_parent ) ) : ?> -

    ← %s', 'twentyten' ), get_the_title( $post->post_parent ) ); - ?>

    - - -
    > -

    - - - -
    -
    - $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); - foreach ( $attachments as $k => $attachment ) { - if ( $attachment->ID == $post->ID ) - break; - } - $k++; - // If there is more than 1 image attachment in a gallery - if ( count( $attachments ) > 1 ) { - if ( isset( $attachments[ $k ] ) ) - // get the URL of the next image attachment - $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); - else - // or get the URL of the first image attachment - $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID ); - } else { - // or, if there's only 1 image attachment, get the URL of the image - $next_attachment_url = wp_get_attachment_url(); - } -?> -

    ID, array( $attachment_width, $attachment_height ) ); // filterable image width with, essentially, no limit for image height. - ?>

    - - - - - -
    -
    post_excerpt ) ) the_excerpt(); ?>
    - -→', 'twentyten' ) ); ?> - '' ) ); ?> - -
    - -
    - - ', '' ); ?> -
    -
    - - - - \ No newline at end of file diff --git a/loop-page.php b/loop-page.php deleted file mode 100644 index c5b6455..0000000 --- a/loop-page.php +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/loop-single.php b/loop-single.php deleted file mode 100644 index b70eff3..0000000 --- a/loop-single.php +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - -
    -

    Pattern

    - -

    - -
    -ID, $key, true); ?> -
    -
    - -
    -
    -

    HTML

    copy - -
    - -
    -

    CSS

    copy - -
    -
    - - post_content != "") {?> -
    -

    Notes

    - -
    - - - \ No newline at end of file diff --git a/loop.php b/loop.php deleted file mode 100644 index 9dc6297..0000000 --- a/loop.php +++ /dev/null @@ -1,181 +0,0 @@ -get_template_part( 'loop', 'index' ); - * - * @package WordPress - * @subpackage Twenty_Ten - * @since Twenty Ten 1.0 - */ -?> - - -max_num_pages > 1 ) : ?> - - - - - -
    -

    -
    -

    - -
    -
    - - - - - - - - ID ) ) || in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) ) : ?> -
    > -

    - - - -
    - - - - $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) ); - if ( $images ) : - $total_images = count( $images ); - $image = array_shift( $images ); - $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' ); - ?> - -

    %2$s photo.', 'This gallery contains %2$s photos.', $total_images, 'twentyten' ), - 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', - number_format_i18n( $total_images ) - ); ?>

    - - - -
    - -
    - ID ) ) : ?> - - | - - - | - - - | ', '' ); ?> -
    -
    - - - - ID ) ) || in_category( _x( 'asides', 'asides category slug', 'twentyten' ) ) ) : ?> -
    > - - -
    - -
    - -
    - →', 'twentyten' ) ); ?> -
    - - -
    - - | - - | ', '' ); ?> -
    -
    - - - - -
    > -

    - - - - -
    - -
    - -
    - →', 'twentyten' ) ); ?> - '' ) ); ?> -
    - - -
    - - - Posted in %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?> - - | - - - - Tagged %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?> - - | - - - | ', '' ); ?> -
    -
    - - - - - - - - -max_num_pages > 1 ) : ?> - - diff --git a/onecolumn-page.php b/onecolumn-page.php deleted file mode 100644 index 1a8d5b7..0000000 --- a/onecolumn-page.php +++ /dev/null @@ -1,31 +0,0 @@ - - -
    -
    - - - -
    -
    - - diff --git a/page.php b/page.php deleted file mode 100644 index 8bf319d..0000000 --- a/page.php +++ /dev/null @@ -1,32 +0,0 @@ - - -
    -
    - - - -
    -
    - - - diff --git a/search.php b/search.php deleted file mode 100644 index 3b198bb..0000000 --- a/search.php +++ /dev/null @@ -1,37 +0,0 @@ - - -
    -
    - - -

    ' . get_search_query() . '' ); ?>

    - - -
    -

    -
    -

    - -
    -
    - -
    -
    - - - diff --git a/sidebar-footer.php b/sidebar-footer.php deleted file mode 100644 index 0e9f702..0000000 --- a/sidebar-footer.php +++ /dev/null @@ -1,60 +0,0 @@ - - - - - diff --git a/sidebar.php b/sidebar.php index bb082b4..39b67ef 100644 --- a/sidebar.php +++ b/sidebar.php @@ -1,48 +1,41 @@ - - + \ No newline at end of file diff --git a/single.php b/single.php deleted file mode 100644 index e982aed..0000000 --- a/single.php +++ /dev/null @@ -1,20 +0,0 @@ - - - - - diff --git a/style.css b/style.css index 1fd647b..80e8277 100644 --- a/style.css +++ b/style.css @@ -1,6 +1,6 @@ /* Theme Name: Pears -Theme URI: http://patternpea.rs +Theme URI: http://pea.rs Description: Official theme for Pears. Author: Dan Cederholm Version: 1 diff --git a/css/screen.less b/styles/screen.less similarity index 95% rename from css/screen.less rename to styles/screen.less index 0537de4..04e4054 100644 --- a/css/screen.less +++ b/styles/screen.less @@ -1,6 +1,6 @@ /* -Title: Master styles for screen media -Author: dan@simplebits.com +Title: Master styles for screen media +Author: dan@simplebits.com */ /* LESS variables @@ -22,30 +22,30 @@ Author: dan@simplebits.com -webkit-border-radius: @radius; -moz-border-radius: @radius; border-radius: @radius; - } +} .box-shadow (@x: 0, @y: 0, @blur: 2px, @color: #000) { -webkit-box-shadow: @arguments; -moz-box-shadow: @arguments; box-shadow: @arguments; - } +} .box-sizing (@type: border-box) { -webkit-box-sizing: @type; -moz-box-sizing: @type; -o-box-sizing: @type; box-sizing: @type; - } +} .transition (@property, @duration: .2s, @timing: ease-in-out) { -webkit-transition: @arguments; -moz-transition: @arguments; -o-transition: @arguments; transition: @arguments; - } +} .tab-size (@spaces: 2) { -webkit-tab-size: @spaces; -moz-tab-size: @spaces; -o-tab-size: @spaces; tab-size: @spaces; - } +} /* reset styles --------------------------------------------- */ @@ -68,34 +68,34 @@ time, mark, audio, video { border: 0; font-size: 100%; vertical-align: baseline; - } +} /* HTML5 display-role reset for older browsers */ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; - } +} body { line-height: 1; - } +} ol, ul { list-style: none; - } +} blockquote, q { quotes: none; - } +} blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; - } +} table { border-collapse: collapse; border-spacing: 0; - } +} :focus { outline: none; - } +} /* general styles --------------------------------------------- */ @@ -107,7 +107,7 @@ body { -webkit-font-smoothing: antialiased; font-size: 100%; background: #e6eaec url(../images/tile.png); - } +} /* links */ @@ -115,33 +115,33 @@ a:link, a:visited { color: @link-color; text-decoration: none; outline: none; - } +} a:hover { color: @link-hover-color; - } +} /* page structure --------------------------------------------- */ div.wrap { position: relative; - } +} div.main { margin-left: 160px; padding: 0 20px; .transition(margin, .4s, ease-in-out); - } +} body.expanded div.main { margin-left: 15px; - } +} #nav { font-size: @font-small; .box-sizing(border-box); - } -#pears-footer { +} +[role="contentinfo"] { margin: 10px 20px; text-align: center; - } +} /* header --------------------------------------------- */ @@ -149,10 +149,10 @@ body.expanded div.main { header[role="banner"] { margin: 15px 20px 15px 20px; .transition(margin, .4s, ease-in-out); - } +} body.expanded header[role="banner"] { margin-left: 35px; - } +} #logo { display: block; min-height: 46px; @@ -163,13 +163,13 @@ body.expanded header[role="banner"] { color: @text-color; background: url(../images/pear.png) no-repeat 0 50%; overflow: hidden; - } +} #logo em { padding: 0 0 0 0; font-style: normal; color: #91969a; .transition(opacity, .4s, ease); - } +} /* main styles --------------------------------------------- */ @@ -181,7 +181,7 @@ div.mod { .rounded; .box-sizing(border-box); .box-shadow(1px, 1px, 2px, rgba(0,0,0,.1)); - } +} div.mod h3.label { float: left; margin: 0 0 10px -20px; @@ -195,46 +195,46 @@ div.mod h3.label { .rounded(4px); border-top-left-radius: 0; border-bottom-left-radius: 0; - } +} div.mod h3.label a { color: #fff; - } +} div.mod h4 { float: left; width: 50%; padding: 2px 15px; font-size: @font-large; font-weight: normal; - } +} div.mod h4 span.sep { color: #bbb; - } +} div.mod a.clip { float: left; margin: 2px 0 0 10px; opacity: 0; .transition(opacity); - } +} div.mod:hover a.clip { opacity: .7; - } +} div.mod:hover a.clip:hover { opacity: 1; - } +} div#pattern.mod div#pattern-wrap { clear: left; padding: 20px 60px; - } +} div#markup.mod { float: left; width: 49%; background: rgba(255,255,255,.6); - } +} div#style.mod { float: right; width: 49%; background: rgba(255,255,255,.6); - } +} div.mod textarea.mod-ta { width: 100%; border: none; @@ -247,22 +247,22 @@ div.mod textarea.mod-ta { background: none; outline: none; .tab-size; - } +} /* pattern notes */ #pattern-notes h3.label { background: #bac1c5; - } +} #pattern-notes p { clear: left; line-height: 1.4; color: #8b959a; - } +} #pattern-notes code { font-family: @font-mono; font-size: @font-medium; - } +} #pattern-notes pre { display: block; margin: 12px 0 0 0; @@ -273,7 +273,7 @@ div.mod textarea.mod-ta { white-space: pre; color: @text-color; border-top: 1px solid #ddd; - } +} /* nav styles --------------------------------------------- */ @@ -293,10 +293,10 @@ div.mod textarea.mod-ta { -moz-transition: left .4s ease-in-out; -o-transition: left .4s ease-in-out; transition: left .4s ease-in-out; - } +} body.expanded #nav { left: -140px; - } +} #nav-toggle { position: absolute; display: block; @@ -307,37 +307,37 @@ body.expanded #nav { text-indent: -9999px; background: url(../images/min.png) no-repeat 6px 50%; opacity: .3; - } +} #nav-toggle:hover { background-color: rgba(255,255,255,.15); opacity: .6; - } +} body.expanded #nav-toggle { background-image: url(../images/max.png); - } +} #nav h2 { margin: 0 20px 4px 20px; font-size: @font-small; font-weight: normal; text-transform: uppercase; letter-spacing: 2px; - } +} #nav h2 a { color: #fff; - } +} #nav ul { margin: 0 20px 15px 0; padding: 0 0 10px 0; border-bottom: 1px solid rgba(255,255,255,.1); - } +} #nav div.nav-item:hover ul { display: block; - } +} #nav ul:last-of-type { margin-bottom: 0; padding-bottom: 0; border-bottom: none; - } +} #nav ul li a { display: block; padding: 5px 8px 5px 20px; @@ -346,36 +346,36 @@ body.expanded #nav-toggle { .rounded(4px); border-top-left-radius: 0; border-bottom-left-radius: 0; - } +} #nav ul li a:hover { color: rgba(255,255,255,.8); background: rgba(255,255,255,.1); - } +} /* footer --------------------------------------------- */ -#pears-footer p.cc { +[role="contentinfo"] p.cc { margin: 8px 0 20px 0; font-size: @font-medium; - } -#pears-footer #sb img { +} +#sb img { opacity: .3; .transition(opacity); - } -#pears-footer #sb:hover img { +} +#sb:hover img { opacity: .5; - } +} /* misc. --------------------------------------------- */ hr, .hide { display: none; - } +} a img { border: none; - } +} /* custom selection colors */ @@ -407,10 +407,10 @@ a img { * html .group { /* IE6 */ height: 1%; - } +} *:first-child+html .group { /* IE7 */ min-height: 1px; - } +} /* responsiveness --------------------------------------------- */ @@ -418,43 +418,43 @@ a img { @media screen and (max-width: 700px) { #logo em { opacity: 0; - } + } div.main { margin-left: 0; padding: 0 10px; - } + } #nav { position: static; left: auto; width: auto; padding: 20px; .rounded; - } + } #nav-toggle { display: none; - } + } #nav h2 { margin-left: 8px; - } + } #nav ul { margin-right: 0; -webkit-column-count: 2; -moz-column-count: 2; column-count: 2; - } + } #nav ul li a { padding: 5px 8px; .rounded(4px); - } + } div#pattern.mod div#pattern-wrap { padding: 10px 0; - } + } div#markup.mod, div#style.mod { float: none; width: 100%; - } + } div.mod h4 { width: auto; - } } +} diff --git a/tag.php b/tag.php deleted file mode 100644 index 2c0cb87..0000000 --- a/tag.php +++ /dev/null @@ -1,30 +0,0 @@ - - -
    -
    - -

    ' . single_tag_title( '', false ) . '' ); - ?>

    - - -
    -
    - - - From 83943dc807974fe9d2b4f1bd1743d94e72326e66 Mon Sep 17 00:00:00 2001 From: Galen Gidman Date: Tue, 14 Feb 2012 10:36:35 -0600 Subject: [PATCH 6/6] scoped the pattern styles so they don't mess with the rest of a page --- .DS_Store | Bin 0 -> 6148 bytes footer.php | 7 +- functions.php | 8 ++ index.php | 11 ++- js/.DS_Store | Bin 0 -> 6148 bytes js/jquery.scoped.js | 197 ++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 216 insertions(+), 7 deletions(-) create mode 100644 .DS_Store create mode 100644 js/.DS_Store create mode 100755 js/jquery.scoped.js diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..c5978781b850aa04ac87ac4a17e4a0a871b9070a GIT binary patch literal 6148 zcmeHK%Wl&^6upy%U?;7V4N{jDD;7}|RH}5r!bB;81rlm1bwLr>aUe#M4gk};!zQQ%)!fWO@)y`coZj0)fH(Cu%jHS$q~jcSPgfmh+3R&X z&V%FA)ylSPyZzO=bNA@slMCeJ^O!-WZK!_p2kuHg%u7DbR|1POVu#tA?H|dMm;PSjxk8k{%pU + + +