Permalink
Browse files

added search.php, fixed some css issues

  • Loading branch information...
1 parent 67ea858 commit f80c0fd984a1e7969beb45fb8d06268d38e91f52 @wycks committed Dec 23, 2011
Showing with 109 additions and 38 deletions.
  1. +2 −3 404.php
  2. +12 −4 README.markdown
  3. +7 −4 author.php
  4. +5 −1 full-width-page.php
  5. +1 −1 header.php
  6. +2 −1 loop.php
  7. +35 −0 search.php
  8. +27 −7 style.css
  9. +18 −17 stylesheets/base.css
View
@@ -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(); ?>
View
@@ -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.
@@ -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
View
@@ -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(); ?>
@@ -21,6 +23,7 @@
</div><!-- #content -->
</section><!-- #primary -->
-
-<?php get_sidebar(); ?>
+ </div>
+
+<?php get_template_part( 'sidebar', 'index' ); //the Sidebar ?>
<?php get_footer(); ?>
View
@@ -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">
@@ -30,5 +32,7 @@
</div><!-- #content -->
</div><!-- #primary -->
+ </div>
+
<?php get_footer(); ?>
View
@@ -48,4 +48,4 @@
<div class="container">
- <?php get_template_part( 'menu', 'index' ); // get the blog header( menu + logo/site title) ?>
+
View
@@ -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>
View
@@ -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(); ?>
View
@@ -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; }
@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

@wycks

wycks Apr 18, 2012

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

@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 )

@wycks

wycks Apr 19, 2012

Owner

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

@wycks

wycks Apr 21, 2012

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 */
@@ -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)
================================================== */
@@ -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; }
@@ -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)
================================================== */
@@ -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;}
}
@@ -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
View
@@ -181,7 +181,7 @@
font-size: 13px;
color: #444; }
-/* #Menu + Logo
+/* #Menu & Logo
================================================== */
.header {
height:85px;
@@ -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.