Skip to content

Commit

Permalink
More responsive stuffs
Browse files Browse the repository at this point in the history
Responsive stuffs added in sidebar-content.css
A 'reader' style list for tablets/smartphones added in sidebar.php
Changed order of CSS in functions.php
  • Loading branch information
clarklab committed May 24, 2012
1 parent f259a01 commit a3878d5
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 5 deletions.
4 changes: 2 additions & 2 deletions functions.php
Expand Up @@ -202,9 +202,9 @@ function _s_scripts() {

wp_enqueue_style( 'font-open-sans', 'http://fonts.googleapis.com/css?family=Open+Sans' );

wp_enqueue_style( 'sidebar-content', get_template_directory_uri() . '/layouts/sidebar-content.css' );

wp_enqueue_style( 'style', get_stylesheet_uri() );

wp_enqueue_style( 'sidebar-content', get_template_directory_uri() . '/layouts/sidebar-content.css' );

wp_enqueue_script( 'small-menu', get_template_directory_uri() . '/js/small-menu.js', array( 'jquery' ), '20120206', true );

Expand Down
31 changes: 28 additions & 3 deletions layouts/sidebar-content.css
Expand Up @@ -13,8 +13,6 @@ Layout: Sidebar-Content

#masthead{
position:fixed;
top:20px;
z-index:3;
width: 300px;
padding:90px 30px 30px;
height:100%;
Expand Down Expand Up @@ -43,7 +41,7 @@ Layout: Sidebar-Content
max-width:840px;
}

@media all and (max-width: 1024px) {
@media all and (max-width: 800px) {

.site-content {
padding:0 30px 0 230px;
Expand All @@ -57,4 +55,31 @@ Layout: Sidebar-Content
padding-left:200px;
}



}

@media screen and (max-width: 500px) {


.site-content {
padding:0 30px 0 30px;
}

#masthead{
top:0;
width: 100%;
padding:10px 30px;
height:40px;
border:none;
border-bottom:1px solid #ccc;
background:#fff;
}

.site-footer {
padding-left:0;
}

#secondary{display:none;}

}
12 changes: 12 additions & 0 deletions sidebar.php
Expand Up @@ -8,6 +8,18 @@
?>
<div id="secondary" class="widget-area" role="complementary">
<?php do_action( 'before_sidebar' ); ?>

<?php if (is_single()) : ?>
<ul id="reader">
<?php $reader = new WP_Query('posts_per_page=5'); ?>
<?php while ($reader->have_posts()) : $reader->the_post(); ?>

<li><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></li>

<?php endwhile; ?>
</ul>
<?php endif; ?>

<?php if ( ! dynamic_sidebar( 'sidebar-1' ) ) : ?>

<aside id="search" class="widget widget_search">
Expand Down
5 changes: 5 additions & 0 deletions style.css
Expand Up @@ -557,3 +557,8 @@ object {

#nav-above{display:none} /* for now */

#reader{margin:0; padding:0; list-style:none; display:none;}

.menu-toggle{position:absolute; top:8px; right:30px;}

h1 a{text-decoration:none;}

0 comments on commit a3878d5

Please sign in to comment.