Permalink
Browse files

A little refacoring as recomended by Ho-sheng

  • Loading branch information...
cpursley committed Dec 30, 2012
1 parent 489a508 commit 50a8b3ed2bcf1825d7ac44e623348dbf15dee700
Showing with 8,677 additions and 50 deletions.
  1. +2 −2 Gemfile.lock
  2. +1 −0 Nannie Theme/Docs.txt
  3. +29 −0 Nannie Theme/License.txt
  4. BIN Nannie Theme/nannie.zip
  5. +34 −0 Nannie Theme/nannie/404.php
  6. +78 −0 Nannie Theme/nannie/archive.php
  7. +124 −0 Nannie Theme/nannie/comments.php
  8. BIN Nannie Theme/nannie/font-awesome/fontawesome-webfont.eot
  9. +255 −0 Nannie Theme/nannie/font-awesome/fontawesome-webfont.svg
  10. BIN Nannie Theme/nannie/font-awesome/fontawesome-webfont.ttf
  11. BIN Nannie Theme/nannie/font-awesome/fontawesome-webfont.woff
  12. +57 −0 Nannie Theme/nannie/footer.php
  13. +184 −0 Nannie Theme/nannie/functions.php
  14. +84 −0 Nannie Theme/nannie/header.php
  15. BIN Nannie Theme/nannie/img/ashok.jpg
  16. BIN Nannie Theme/nannie/img/favicon/favicon.png
  17. BIN Nannie Theme/nannie/img/logo.PNG
  18. +62 −0 Nannie Theme/nannie/index.php
  19. +7 −0 Nannie Theme/nannie/js/bootstrap.js
  20. +8 −0 Nannie Theme/nannie/js/html5shim.js
  21. +2 −0 Nannie Theme/nannie/js/jquery.js
  22. +34 −0 Nannie Theme/nannie/page.php
  23. BIN Nannie Theme/nannie/screenshot.png
  24. +48 −0 Nannie Theme/nannie/search.php
  25. +6 −0 Nannie Theme/nannie/searchform.php
  26. +38 −0 Nannie Theme/nannie/sidebar.php
  27. +46 −0 Nannie Theme/nannie/single.php
  28. +535 −0 Nannie Theme/nannie/style.css
  29. +1,022 −0 Nannie Theme/nannie/style/bootstrap-responsive.css
  30. +5,018 −0 Nannie Theme/nannie/style/bootstrap.css
  31. +645 −0 Nannie Theme/nannie/style/font-awesome-ie7.css
  32. +303 −0 Nannie Theme/nannie/style/font-awesome.css
  33. +7 −20 app/controllers/admin_controller.rb
  34. +32 −15 app/models/dream.rb
  35. +5 −0 app/models/user.rb
  36. +8 −8 app/views/admin/index.html.erb
  37. +3 −5 app/views/dreams/show.html.erb
View
@@ -66,7 +66,7 @@ GEM
mime-types (1.19)
multi_json (1.3.7)
orm_adapter (0.4.0)
- pg (0.14.1)
+ pg (0.12.2)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
@@ -132,7 +132,7 @@ DEPENDENCIES
coffee-rails (~> 3.2.1)
devise
jquery-rails
- pg
+ pg (= 0.12.2)
rails (= 3.2.8)
sass-rails (~> 3.2.3)
simple_form
View
@@ -0,0 +1 @@
+For Basic documentation visit - http://responsivewebinc.com/premium/docs
View
@@ -0,0 +1,29 @@
+BootStrap License:
+------------------
+
+BootStrap is licensed under Apache License, Version 2.0. For more information visit the below link.
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+============================================================
+
+jQuery License:
+---------------
+
+jQuery is licensed under MIT License & GPL Lincense. For more information visit the below link.
+
+http://jquery.org/license/
+
+=============================================================
+
+WordPress License:
+------------------
+
+Visit this page for WordPress License - http://wordpress.org/about/license/
+
+=============================================================
+
+Plugins, Images, iCons, etc., used in this template is copyrighted to respective owners and it comes under their License.
+
+=============================================================
+
View
Binary file not shown.
@@ -0,0 +1,34 @@
+<?php get_header(); ?>
+
+<!-- Content -->
+
+<div class="content">
+ <div class="container">
+ <div class="row">
+ <div class="span8">
+ <!-- Posts area -->
+ <h3><span>something missing</span></h3>
+ <div class="posts">
+ <div class="entry">
+ <div class="matter">
+ <h2>Its 404<span class="color">!!!</span></h2>
+ <p>Something missing. Please check back later.</p>
+ <div class="form">
+ <form method="get" id="searchform" action="<?php bloginfo('home'); ?>/" class="form-search">
+ <input type="text" value="<?php the_search_query(); ?>" name="s" id="s" class="input-medium"/>
+ <input type="submit" id="searchsubmit" value="Search" class="btn"/>
+ </form>
+ </div>
+ </div>
+ <div class="clearfix"></div>
+ </div>
+
+ <div class="clearfix"></div>
+
+ </div>
+
+ </div>
+
+<?php get_sidebar(); ?>
+
+<?php get_footer(); ?>
@@ -0,0 +1,78 @@
+<?php get_header(); ?>
+
+<!-- Content -->
+
+<div class="content">
+ <div class="container">
+ <div class="row">
+ <div class="span8">
+ <!-- Posts area -->
+ <div class="posts">
+ <?php if(have_posts()) : ?>
+
+ <?php /* If this is a category archive */ if (is_category()) { ?>
+ <h3 class="pagetitle"><span>Archive for the &#8216;<?php single_cat_title(); ?>&#8217; Category</span></h3>
+ <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
+ <h3 class="pagetitle"><span>Posts Tagged &#8216;<?php single_tag_title(); ?>&#8217;</span></h3>
+ <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
+ <h3 class="pagetitle"><span>Archive for &#8216;<?php the_time('F jS, Y'); ?>&#8217;</span></h3>
+ <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
+ <h3 class="pagetitle"><span>Archive for &#8216;<?php the_time('F, Y'); ?>&#8217;</span></h3>
+ <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
+ <h3 class="pagetitle"><span>Archive for &#8216;<?php the_time('Y'); ?>&#8217;</span></h3>
+ <?php /* If this is an author archive */ } elseif (is_author()) { ?>
+ <h3 class="pagetitle"><span>Author Archive</span></h3>
+ <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
+ <h3 class="pagetitle"><span>Blog Archives</span></h3>
+ <?php } ?>
+
+ <?php while(have_posts()) : the_post(); ?>
+ <div class="entry" id="post-<?php the_ID(); ?>">
+ <div class="thumb">
+ <a href="<?php the_permalink() ?>" rel="bookmark"><?php if (function_exists('has_post_thumbnail') && has_post_thumbnail()) the_post_thumbnail(); ?></a>
+ </div>
+ <div class="matter">
+
+ <h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
+
+ <div class="meta"><i class="icon-calendar"></i> <?php the_time('j M y'); ?> - <i class="icon-folder-open"></i> <?php the_category(', ') ?> - <i class="icon-comment"></i> <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></div>
+
+ <?php the_excerpt(); ?>
+ </div>
+ <div class="clearfix"></div>
+ </div>
+
+ <?php endwhile; ?>
+ <!-- Pagination -->
+
+ <?php
+ // Pagination
+ global $wp_query;
+ $total_pages = $wp_query->max_num_pages;
+ if ($total_pages > 1){
+ $current_page = max(1, get_query_var('paged'));
+ echo '<div class="pagination">';
+ echo paginate_links(array(
+ 'base' => get_pagenum_link(1) . '%_%',
+ 'format' => 'page/%#%',
+ 'current' => $current_page,
+ 'total' => $total_pages,
+ 'end_size' => 0,
+ 'mid_size' => 1,
+ 'prev_text' => 'Prev',
+ 'next_text' => 'Next',
+ 'type' => 'plain'
+ ));
+ echo '</div>';
+ }
+ ?>
+ <div class="clearfix"></div>
+
+ <?php endif; ?>
+ </div>
+
+ </div>
+
+<?php get_sidebar(); ?>
+
+<?php get_footer(); ?>
@@ -0,0 +1,124 @@
+<?php
+
+// Do not delete these lines
+if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
+die ('Please do not load this page directly. Thanks!');
+
+if ( post_password_required() ) { ?>
+<p class="nocomments">This post is password protected. Enter the password to view comments.</p>
+<?php
+return;
+}
+?>
+
+<!-- You can start editing here. -->
+
+<?php if ( have_comments() ) : ?>
+<div class="comments well">
+<h3><span class="comment-heading">Comments - </span><?php comments_number('No Responses', 'One Response', '% Responses' );?></h3>
+
+<!-- <div class="navigation">
+<div class="alignleft"><?php previous_comments_link() ?></div>
+<div class="alignright"><?php next_comments_link() ?></div>
+</div> -->
+
+<ul class="media-list">
+<?php wp_list_comments('callback=ashok_comment'); ?>
+</ul>
+
+</div>
+
+<div class="navigation">
+<div class="pull-left"><?php previous_comments_link() ?></div>
+<div class="pull-right"><?php next_comments_link() ?></div>
+</div>
+
+<div class="clearfix"></div>
+
+<?php else : // this is displayed if there are no comments so far ?>
+
+<?php if ('open' == $post->comment_status) : ?>
+<!-- If comments are open, but there are no comments. -->
+
+<?php else : // comments are closed ?>
+<div class="comments well">
+<!-- If comments are closed. -->
+<p class="nocomments">Comments are closed.</p>
+</div>
+
+<?php endif; ?>
+<?php endif; ?>
+
+<?php if ('open' == $post->comment_status) : ?>
+
+<div id="respond" class="respond well">
+
+<h3><span><?php comment_form_title( 'Leave a Reply', 'Leave a Reply to %s' ); ?></span></h3>
+
+<div class="cancel-comment-reply">
+<?php cancel_comment_reply_link('Cancel Reply'); ?>
+</div>
+
+<div class="clearfix"></div>
+
+<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
+<p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a comment.</p>
+<?php else : ?>
+
+<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform" class="form-horizontal">
+
+<?php if ( $user_ID ) : ?>
+
+<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">Log out &raquo;</a></p>
+
+<?php else : ?>
+
+ <div class="control-group">
+ <label class="control-label" for="author">Name</label>
+ <div class="controls">
+ <input type="text" class="input-large" name="author" id="author" value="<?php echo $comment_author; ?>" <?php if ($req) echo "required"; ?>>
+ </div>
+ </div>
+
+ <div class="control-group">
+ <label class="control-label" for="email">Email</label>
+ <div class="controls">
+ <input type="text" class="input-large" name="email" id="email" value="<?php echo $comment_author_email; ?>" <?php if ($req) echo "required"; ?>>
+ </div>
+ </div>
+
+ <div class="control-group">
+ <label class="control-label" for="url">Website</label>
+ <div class="controls">
+ <input type="text" class="input-large" name="url" id="url" value="<?php echo $comment_author_url; ?>" >
+ </div>
+ </div>
+
+<?php endif; ?>
+
+<!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>-->
+
+ <div class="control-group">
+ <label class="control-label" for="comment">Comment</label>
+ <div class="controls">
+ <textarea class="input-xlarge" name="comment" id="comment" rows="3"></textarea>
+ </div>
+ </div>
+
+ <div class="form-actions">
+ <input name="submit" type="submit" id="comment-submit" tabindex="5" value="Comment" class="btn" />
+ <button type="reset" class="btn">Reset</button>
+ </div>
+
+<p>
+<?php comment_id_fields(); ?>
+</p>
+<?php do_action('comment_form', $post->ID); ?>
+
+<div class="clear"></div>
+</form>
+
+<?php endif; // If registration required and not logged in ?>
+</div>
+
+<?php endif; // if you delete this the sky will fall on your head ?>
Binary file not shown.
Oops, something went wrong.

0 comments on commit 50a8b3e

Please sign in to comment.