Skip to content

Commit

Permalink
added search.php, fixed some css issues
Browse files Browse the repository at this point in the history
  • Loading branch information
wycks committed Dec 23, 2011
1 parent 67ea858 commit f80c0fd
Show file tree
Hide file tree
Showing 9 changed files with 109 additions and 38 deletions.
5 changes: 2 additions & 3 deletions 404.php
Expand Up @@ -41,6 +41,5 @@
</div><!-- #primary -->


<?php
get_template_part( 'sidebar', 'index' ); //the Sidebar
get_footer(); ?>
<?php get_template_part( 'sidebar', 'index' ); //the Sidebar ?>
<?php get_footer(); ?>
16 changes: 12 additions & 4 deletions README.markdown
Expand Up @@ -33,7 +33,7 @@ I have added a demo: http://skeleton.phpfogapp.com/
*Widget Support*
- By default it has a widgitized sidebar and footer.

*Comment, Full Width Page, Author, 404* --> Templates
*Comment, Full Width Page, Author, Search, 404* --> Templates

Some basic template tags for Site Title, Tagline, Post Meta.

Expand All @@ -45,12 +45,20 @@ This is called in the functions.php and is commented out by default.( in add-stu

### What it does not have:

*Search , Archives, Category, Single, Image, Tag* --> templates.
Everything is handled by the main loop
Image template or any real image CSS - This is best left outside a framework

Support for `the_excerpt` , by default you must use the "Read More" to split posts in the main loop.

I also stripped out all the JavaScript that came with the original HTML Skeleton Framework and overall tried to make it as minimal as possible.
Support for `tag` output in the main loop, I never use tags and they can add to db overhead.

Some pages are just handled by the main loop, such as single.php, archives , category, tags, etc.

### Notes
Stripped out the JavaScript tabs that came with the original HTML Skeleton Framework.
The CSS for those elements is still present but it is best to `wp_enqueue` the javascript using native WP functions.
The footer is left completely unstyled, up to you which grids you want to use, supports 1, 2, 3 or 4 columns easily.

To have a left sidebar just move `get_template_part( 'sidebar', 'index' );` to above the loop call (might need minor tweaks)

-------------------------------
### Open to any feature requests
11 changes: 7 additions & 4 deletions author.php
Expand Up @@ -4,15 +4,17 @@
* @subpackage WP-Skeleton
*/

get_header(); ?>
get_header();
get_template_part( 'menu', 'index' ); //the menu + logo/site title ?>

<div class="two-thirds column">
<section id="primary" role="region">
<div id="content">

<?php the_post(); ?>

<header class="page-header">
<h1 class="page-title author"><?php printf( __( 'Author Archives: <span class="vcard">%s</span>', 'WP-Skeleton' ), "<a class='author' href='" . get_author_posts_url( get_the_author_meta( 'ID' ) ) . "' title='" . esc_attr( get_the_author() ) . "' rel='me'>" . get_the_author() . "</a>" ); ?></h1>
<h2 class="page-title author"><?php printf( __( 'Author Archives: <span class="vcard">%s</span>', 'WP-Skeleton' ), "<a class='author' href='" . get_author_posts_url( get_the_author_meta( 'ID' ) ) . "' title='" . esc_attr( get_the_author() ) . "' rel='me'>" . get_the_author() . "</a>" ); ?></h2>
</header>

<?php rewind_posts(); ?>
Expand All @@ -21,6 +23,7 @@

</div><!-- #content -->
</section><!-- #primary -->

<?php get_sidebar(); ?>
</div>

<?php get_template_part( 'sidebar', 'index' ); //the Sidebar ?>
<?php get_footer(); ?>
6 changes: 5 additions & 1 deletion full-width-page.php
Expand Up @@ -7,8 +7,10 @@
* @subpackage WP-Skeleton
*/

get_header(); ?>
get_header();
get_template_part( 'menu', 'index' ); //the menu + logo/site title ?>

<div class="sixteen columns ">
<div id="primary" class="full-width">
<div id="content">

Expand All @@ -30,5 +32,7 @@

</div><!-- #content -->
</div><!-- #primary -->
</div>


<?php get_footer(); ?>
2 changes: 1 addition & 1 deletion header.php
Expand Up @@ -48,4 +48,4 @@

<div class="container">

<?php get_template_part( 'menu', 'index' ); // get the blog header( menu + logo/site title) ?>

3 changes: 2 additions & 1 deletion loop.php
Expand Up @@ -21,9 +21,10 @@
<!--The Meta, Author, Date, Categories and Comments-->
<div class="meta">
Date posted: <?php echo get_the_date(); ?>
| Author: <?php echo get_the_author(); ?>
| Author: <?php the_author_posts_link(); ?>
| <?php comments_popup_link('No Comments &#187;', '1 Comment &#187;', '% Comments &#187;'); ?>
<p>Categories: <?php the_category(' '); ?></p>

</div>

</article>
Expand Down
35 changes: 35 additions & 0 deletions search.php
@@ -0,0 +1,35 @@
<?php
/**
* @package WordPress
* @subpackage WP-Skeleton
*/

get_header();
get_template_part( 'menu', 'index' ); //the menu + logo/site title ?>

<div class="two-thirds column">
<?php if ( have_posts() ) : ?>
<h2 class="page-title"><?php printf( __( 'Search Results for: %s', 'mb' ), '<span>' . get_search_query() . '</span>' ); ?></h2>

<?php
/* Run the loop for the search to output the results.
* If you want to overload this in a child theme then include a file
* called loop-search.php and that will be used instead.
*/
get_template_part( 'loop', 'search' );
?>

<?php else : ?>
<div id="post-0" class="post no-results not-found">
<h2 class="entry-title"><?php _e( 'Nothing Found', 'mb' ); ?></h2>
<div class="entry-content">
<p><?php _e( 'Sorry, but nothing matched your search criteria. Please try again with some different keywords.', 'twentyten' ); ?></p>
<?php get_search_form(); ?>
</div><!-- .entry-content -->
</div><!-- #post-0 -->
<?php endif; ?>

</div>

<?php get_template_part( 'sidebar', 'index' ); //the Sidebar ?>
<?php get_footer(); ?>
34 changes: 27 additions & 7 deletions style.css
Expand Up @@ -26,7 +26,7 @@ Use it to make something cool, have fun, and share what you've learned with othe
================================================== */

.container { position: relative; width: 960px; margin: 0 auto; padding: 0; }
.column, .columns { float: left; display: inline; margin-left: 10px; margin-right: 10px; }

This comment has been minimized.

Copy link
@aurel-appsthru

aurel-appsthru Apr 18, 2012

Hi Wycks,
why have you removed the margins of the columns classes ?

From what I see, it cause the columns to be left aligned wheareas they should be ~centered in the container.
( http://960.gs/demo.html )

sincerely

This comment has been minimized.

Copy link
@wycks

wycks Apr 18, 2012

Author Owner

I did remove it, yes. The reason was that the columns are used to align the header/menu/content/sidebar and with a margin they are not flush to the right and left, and to me that looked odd.

I suppose I can make the container 980px and put the column margins back in, create an issue if you want this or have an other ideas.

Thanks, @aurel-appsthru

This comment has been minimized.

Copy link
@aurel-appsthru

aurel-appsthru Apr 19, 2012

In fact, at first, I wanted to propose to upgrade the css to V1.1
( https://github.com/dhgamache/Skeleton/blob/master/stylesheets/skeleton.css ) ...

Is your problem can't be solved by using classes alpha and omega on columns on each side ?
http://www.getskeleton.com/#grid ( Code Example )

This comment has been minimized.

Copy link
@wycks

wycks Apr 19, 2012

Author Owner

Ok I will have a look at it this weekend and also update any recent pushes to the original framework

This comment has been minimized.

Copy link
@wycks

wycks Apr 21, 2012

Author Owner

This has been fixed to alpha and omega, and margins reverted to 10px, thanks @aurel-appsthru

.column, .columns { float: left; display: inline;}
.row { margin-bottom: 20px; }

/* Nested Column Classes */
Expand Down Expand Up @@ -72,6 +72,13 @@ Use it to make something cool, have fun, and share what you've learned with othe
.container .offset-by-fifteen { padding-left: 900px; }


/* wordpress sidebar*/
.one-third.column{
margin-left: 40px;
}

/* wordpress menu*/
.header .seven.columns {margin-right: 30px;}

/* #Tablet (Portrait)
================================================== */
Expand All @@ -80,8 +87,7 @@ Use it to make something cool, have fun, and share what you've learned with othe

@media only screen and (min-width: 768px) and (max-width: 959px) {
.container { width: 768px; }
.container .column,
.container .columns { margin-left: 10px; margin-right: 10px; }

.column.alpha, .columns.alpha { margin-left: 0; margin-right: 10px; }
.column.omega, .columns.omega { margin-right: 0; margin-left: 10px; }

Expand Down Expand Up @@ -121,8 +127,16 @@ Use it to make something cool, have fun, and share what you've learned with othe
.container .offset-by-thirteen { padding-left: 624px; }
.container .offset-by-fourteen { padding-left: 672px; }
.container .offset-by-fifteen { padding-left: 720px; }

/* wordpress sidebar*/
.one-third.column{
margin-left: 20px;
margin-right: -10px;
}
}




/* #Mobile (Portrait)
================================================== */
Expand Down Expand Up @@ -169,10 +183,12 @@ Use it to make something cool, have fun, and share what you've learned with othe
.container .offset-by-fourteen,
.container .offset-by-fifteen { padding-left: 0; }

/* Float menu left now*/
/* Float wordpress menu left now*/

.menu ul {float:left;}


/* wordpress sidebar*/
.one-third.column{margin-left: 0px;}
}


Expand Down Expand Up @@ -204,10 +220,14 @@ Use it to make something cool, have fun, and share what you've learned with othe
.container .one-third.column,
.container .two-thirds.column { width: 420px; }

/* Float menu left now*/
/* Float wordpress menu left now*/

.menu ul {float:left;}
}

/* wordpress sidebar*/
.one-third.column{margin-left: 0px;}

}


/* #Clearing
Expand Down
35 changes: 18 additions & 17 deletions stylesheets/base.css
Expand Up @@ -181,7 +181,7 @@
font-size: 13px;
color: #444; }

/* #Menu + Logo
/* #Menu & Logo
================================================== */
.header {
height:85px;
Expand Down Expand Up @@ -209,36 +209,37 @@
font-size: 16px;
}

.logo{
margin-left: -10px;
}

.logo a{
text-decoration: none;
}

/* #Misc
================================================== */
.title{
padding-bottom: 15px;
}
.title{
padding-bottom: 15px;
}

.full-width{
padding-left: 10px;
}

/* #Sidebar
/* #Sidebar
================================================== */
.sidebar{
font: 14px/1.5em "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
margin-right:-5px;
}

.sidebar li{
list-style: none;
}

/* #Footer
/* #Footer
================================================== */

.footer li{
list-style: none;
padding-right: 15px;
float: left;
width: 220px;
}
.footer li{
list-style: none;
padding-right: 15px;
float: left;
width: 220px;
}

0 comments on commit f80c0fd

Please sign in to comment.