Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Commit

Permalink
Improve the design on smaller screens
Browse files Browse the repository at this point in the history
* There no longer a need to have equal height in the footer widgets
* Add the .widget-area class to all widget areas. Some still have the
'sidebar' class as it might be used by a child theme
* Improve contrast on the toggle menu button
* Center the site title, logo and description
* Make the widget areas full width
* Improve the comment form by making it one-column and make the button
bigger

Some improvements to the print stylesheet have been made as well
  • Loading branch information
jayj committed Jun 22, 2012
1 parent 08fa473 commit f66459a
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 35 deletions.
4 changes: 2 additions & 2 deletions js/script.js
Expand Up @@ -78,12 +78,12 @@


/* Call the equal_height_columns() function when window has been loaded to make sure the images are loaded */ /* Call the equal_height_columns() function when window has been loaded to make sure the images are loaded */
$(window).load(function() { $(window).load(function() {
equal_height_columns( $('.page-template-template-front-page .headline-list, #sidebar-subsidiary .widget, .not-found-widgets .widget') ); equal_height_columns( $('.page-template-template-front-page .headline-list, .not-found-widgets .widget') );
}); });


/* Call the equal_height_columns() function when window is being resized */ /* Call the equal_height_columns() function when window is being resized */
$(window).resize(function() { $(window).resize(function() {
equal_height_columns( $('.page-template-template-front-page .headline-list, #sidebar-subsidiary .widget, .not-found-widgets .widget') ); equal_height_columns( $('.page-template-template-front-page .headline-list, .not-found-widgets .widget') );
}); });


/* A little surprise ;-) */ /* A little surprise ;-) */
Expand Down
2 changes: 1 addition & 1 deletion sidebar-404.php
Expand Up @@ -10,7 +10,7 @@


if ( is_active_sidebar( 'error-page' ) ) : ?> if ( is_active_sidebar( 'error-page' ) ) : ?>


<div class="not-found-widgets clearfix"> <div class="not-found-widgets widget-area clearfix">


<?php dynamic_sidebar( 'error-page' ); ?> <?php dynamic_sidebar( 'error-page' ); ?>


Expand Down
2 changes: 1 addition & 1 deletion sidebar-after-single.php
Expand Up @@ -12,7 +12,7 @@


<?php do_atomic( 'before_sidebar_single' ); // cakifo_before_sidebar_single ?> <?php do_atomic( 'before_sidebar_single' ); // cakifo_before_sidebar_single ?>


<aside id="sidebar-after-single" class="sidebar"> <aside id="sidebar-after-single" class="sidebar widget-area">


<?php dynamic_sidebar( 'after-single' ); ?> <?php dynamic_sidebar( 'after-single' ); ?>


Expand Down
2 changes: 1 addition & 1 deletion sidebar-after-singular.php
Expand Up @@ -12,7 +12,7 @@


<?php do_atomic( 'before_sidebar_singular' ); // cakifo_before_sidebar_singular ?> <?php do_atomic( 'before_sidebar_singular' ); // cakifo_before_sidebar_singular ?>


<aside id="sidebar-after-singular" class="sidebar"> <aside id="sidebar-after-singular" class="sidebar widget-area">


<?php dynamic_sidebar( 'after-singular' ); ?> <?php dynamic_sidebar( 'after-singular' ); ?>


Expand Down
2 changes: 1 addition & 1 deletion sidebar-primary.php
Expand Up @@ -13,7 +13,7 @@


<?php do_atomic( 'before_sidebar_primary' ); // cakifo_before_sidebar_primary ?> <?php do_atomic( 'before_sidebar_primary' ); // cakifo_before_sidebar_primary ?>


<div id="sidebar-primary" class="sidebar"> <div id="sidebar-primary" class="sidebar widget-area">


<?php do_atomic( 'open_sidebar_primary' ); // cakifo_open_sidebar_primary ?> <?php do_atomic( 'open_sidebar_primary' ); // cakifo_open_sidebar_primary ?>


Expand Down
2 changes: 1 addition & 1 deletion sidebar-secondary.php
Expand Up @@ -13,7 +13,7 @@


<?php do_atomic( 'before_sidebar_secondary' ); // cakifo_before_sidebar_secondary ?> <?php do_atomic( 'before_sidebar_secondary' ); // cakifo_before_sidebar_secondary ?>


<div id="sidebar-secondary" class="sidebar"> <div id="sidebar-secondary" class="sidebar widget-area">


<?php do_atomic( 'open_sidebar_secondary' ); // cakifo_open_sidebar_secondary ?> <?php do_atomic( 'open_sidebar_secondary' ); // cakifo_open_sidebar_secondary ?>


Expand Down
104 changes: 76 additions & 28 deletions style.dev.css
Expand Up @@ -937,11 +937,11 @@ a.toggle-navbar {


.toggle-navbar > a { .toggle-navbar > a {
background-color: #2c2c2c; background-color: #2c2c2c;
background-image: -moz-linear-gradient(top, #333333, #222222); background-image: -moz-linear-gradient(top, #555, #222);
background-image: -ms-linear-gradient(top, #333333, #222222); background-image: -ms-linear-gradient(top, #555, #222);
background-image: -webkit-linear-gradient(top, #333333, #222222); background-image: -webkit-linear-gradient(top, #555, #444);
background-image: -o-linear-gradient(top, #333333, #222222); background-image: -o-linear-gradient(top, #555, #222);
background-image: linear-gradient(top, #333333, #222222); background-image: linear-gradient(top, #555, #222);
border: 1px solid #181818; border: 1px solid #181818;
border-bottom-color: #050505; border-bottom-color: #050505;
border-radius: 4px; border-radius: 4px;
Expand Down Expand Up @@ -1048,7 +1048,7 @@ a.toggle-navbar {
} }


#main, #main,
.sidebar { .widget-area {
margin-top: 40px; margin-top: 40px;
} }


Expand Down Expand Up @@ -1269,6 +1269,7 @@ html[xmlns] .slides-container { display: block; }
content: ""; content: "";
width: 8px; height: 12px; width: 8px; height: 12px;
position: absolute; position: absolute;
z-index: 10;
top: 15px; left: 15px; top: 15px; left: 15px;
} }


Expand Down Expand Up @@ -1315,9 +1316,9 @@ html[xmlns] .slides-container { display: block; }
border: 1px solid #bbb; border: 1px solid #bbb;
} }


@media screen and (max-width: 860px) { @media screen and (max-width: 1024px) {
.flex-direction-nav .flex-prev { opacity: 1; left: 0; } .flex-direction-nav .flex-prev { opacity: 1; left: 10px; }
.flex-direction-nav .flex-next { opacity: 1; right: 0; } .flex-direction-nav .flex-next { opacity: 1; right: 10px; }
} }


/* Thumbnail nav */ /* Thumbnail nav */
Expand Down Expand Up @@ -2097,7 +2098,7 @@ img.alignright {
border-radius: 3px; border-radius: 3px;
color: #464646; color: #464646;
display: inline-block; display: inline-block;
margin-right: 2px; margin: 0 2px 8px 0;
padding: 10px 14px 9px; padding: 10px 14px 9px;
text-shadow: 0 1px 0 #fff; text-shadow: 0 1px 0 #fff;
box-shadow: 0 2px 0 #ccc; box-shadow: 0 2px 0 #ccc;
Expand Down Expand Up @@ -2573,6 +2574,7 @@ select {
/* Labels */ /* Labels */
label { label {
color: #606060; color: #606060;
cursor: pointer;
font: 14px 'PT Serif', Georgia, serif; font: 14px 'PT Serif', Georgia, serif;
padding-left: 2px; padding-left: 2px;
-webkit-transition: color 150ms; -webkit-transition: color 150ms;
Expand Down Expand Up @@ -2985,16 +2987,6 @@ span.required {
background: #f7fafc; background: #f7fafc;
} }


/* Make the footer widgets two colums */
#sidebar-subsidiary .widget {
width: 45%;
}

#sidebar-subsidiary .widget:nth-child(2n) {
float: right;
}


/* Add a background to the search inputs */ /* Add a background to the search inputs */
#topbar .search-form .search-text, #topbar .search-form .search-text,
#topbar .search-form .search-submit { #topbar .search-form .search-submit {
Expand All @@ -3020,17 +3012,66 @@ span.required {
} }


@media screen and (max-width: 480px) { @media screen and (max-width: 480px) {
/* Hide thumbnails from the Recent Posts and Category headline lists */
#recent-posts img, #branding {
.headline-list img { text-align: center;
}

#site-title,
#site-description {
float: none;
}

#site-description {
margin: 20px 0 0;
}

/* Hide thumbnails from the Recent Posts */
#recent-posts img {
display: none; display: none;
} }


/* Remove the sidebar widgets and search form from topbar */ /* Make the widget areas full width */
#sidebar-primary, #sidebar-secondary, #sidebar-subsidiary, .widget-area,
.headline-list {
width: 100% !important;
float: none !important;
}

/* Remove the search form from topbar */
#topbar .search-form { #topbar .search-form {
display: none; display: none;
} }

/* Make the comment form better */
#respond p.form-email,
#respond p.form-author {
float: none;
width: 100%;
}

#respond p.form-author input[type="text"],
#respond p.form-email input[type="text"] {
width: 98%;
}

#respond p.form-email input[type="text"] {
float: none;
}

#respond label {
font-size: 16px;
}

#respond p.form-email > label {
padding-left: 0;
}

#respond #submit {
font-size: 18px;
width: 100%;
padding: 25px;
}
} }


/** /**
Expand Down Expand Up @@ -3061,7 +3102,8 @@ span.required {
} }


#topbar, #site-title img, .sidebar, #sidebar-subsidiary, #respond, .pagination, object, embed, video, audio, iframe[src*=youtube], #slider, .format-quote .entry-format, #topbar, #site-title img, .sidebar, #sidebar-subsidiary, #respond, .pagination, object, embed, video, audio, iframe[src*=youtube], #slider, .format-quote .entry-format,
.twitter-share, .fb-like, .delicious-share-button, .digg-share-button, #___plusone_0, .author-profile .twitter-link, .avatar, .comment-meta .permalink, .comment-reply-link { blockquote:before, blockquote p:after, .twitter-share, .fb-like, .delicious-share-button, .digg-share-button, #___plusone_0, .author-profile .twitter-link, .avatar,
.comment-meta .permalink, .comment-reply-link, .more-link, .comments-link {
display: none !important; display: none !important;
} }


Expand Down Expand Up @@ -3092,11 +3134,13 @@ span.required {
} }


h3, h3,
table caption,
.breadcrumbs, .breadcrumbs,
.section-title { .section-title,
.section-title.alternative-section-title {
background: none; background: none;
color: #333; color: #333;
border-bottom: none; border: none;
} }


#main { #main {
Expand Down Expand Up @@ -3138,6 +3182,10 @@ span.required {
padding: 0 25px; padding: 0 25px;
} }


blockquote {
font-style: italic;
}

tr, img { page-break-inside: avoid; } tr, img { page-break-inside: avoid; }
#comments { page-break-before: always; } #comments { page-break-before: always; }
p, h2, h3 { orphans: 3; widows: 3; } p, h2, h3 { orphans: 3; widows: 3; }
Expand Down

0 comments on commit f66459a

Please sign in to comment.