Skip to content

Fixes #94: Update the sidebar styling to differentiate the active style #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ This is a set of plugins, themes, and configuration files for jQuery's website i
ServerName local.jquery.com
ServerAlias *.jquery.com *.jqueryui.com *.jquery.org *.qunitjs.com *.sizzlejs.com *.jquerymobile.com
DocumentRoot "/srv/www/jquery"
<Directory "/srv/www/jquery">
Options All
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
```

Expand Down
4 changes: 1 addition & 3 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ function jquery_install_site( $site, $user ) {
$default_options = jquery_default_site_options();
$default_options['admin_email'] = $user->user_email;

var_dump( $domain, $path, $site );

if ( 1 !== $details['blog_id'] ) {
$blog_id = insert_blog( JQUERY_STAGING_PREFIX . $domain, $path, 1 );
if ( $blog_id != $details['blog_id'] )
Expand All @@ -89,6 +87,6 @@ function jquery_install_site( $site, $user ) {
foreach ( $options as $option => $value )
update_option( $option, $value );

flush_rewrite_rules();
delete_option( 'rewrite_rules' );
restore_current_blog();
}
11 changes: 11 additions & 0 deletions mu-plugins/jquery-filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,14 @@ function jquery_unfiltered_html_for_term_descriptions() {

// Bypass multisite checks.
add_filter( 'ms_site_check', '__return_true' );

// Add body classes found in postmeta.
add_filter( 'body_class', function( $classes ) {
if ( ! is_singular() )
return $classes;
if ( is_page() )
$classes[] = 'page-slug-' . sanitize_html_class( strtolower( get_queried_object()->post_name ) );
if ( $post_classes = get_post_meta( get_queried_object_id(), 'body_class', true ) )
$classes = array_merge( $classes, explode( ' ', $post_classes ) );
return $classes;
});
15 changes: 15 additions & 0 deletions mu-plugins/wordpress-shims.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
/*
* Plugin Name: WordPress Shims
* Author: Nacin
*/

// Add menu_order query variable for pre-3.5.
if ( version_compare( $wp_version, '3.5-alpha', '<' ) ) :
add_filter( 'posts_where_paged', function( $where, $query ) {
global $wpdb;
if ( $menu_order = absint( $query->get( 'menu_order' ) ) )
$where .= " AND $wpdb->posts.menu_order = " . $menu_order;
return $where;
}, 10, 2 );
endif;
2 changes: 2 additions & 0 deletions sunrise.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
$current_blog->blog_id = $current_blog->site_id = $current_blog->public = 1;
$current_blog->archived = $current_blog->deleted = $current_blog->spam = 0;

add_filter( 'ms_site_check', '__return_true' );

if ( ! defined( 'WP_INSTALLING' ) ) {
// Okay, see if we can find the main site in the DB.
// If not, time for a new network install.
Expand Down
27 changes: 17 additions & 10 deletions themes/jquery/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -2182,7 +2182,7 @@ nav .searchform .icon-search {
#container #body #sidebar {
width: 20.5%;
position: relative;
background: #eeeeee;
background: #f4f4f4;
height: 100%;
padding: 0 1.5% 0;
/* margin-bottom: -10000px;
Expand Down Expand Up @@ -2360,7 +2360,6 @@ html.jquery-learning { background: #000 url(../i/learning_bg.jpg) no-repeat cent

#sidebar aside > ul li {
list-style: none;
border-bottom: 1px solid #c5c5c5;
-webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.25);
box-shadow: 0 1px 0 rgba(255,255,255,0.25);
padding: 0;
Expand Down Expand Up @@ -2394,16 +2393,21 @@ html.jquery-learning { background: #000 url(../i/learning_bg.jpg) no-repeat cent
}

#sidebar aside > ul li a {
border-bottom: 1px solid #c5c5c5;
font-weight: bold;
color: #3f3f3f;
text-shadow: 0 1px 0 rgba(255,255,255,1);
font-size: 13px;
text-decoration: none;
width: 100%;
display: block;
width: 96%;
width: 95%;
padding: 5% 10%;
margin: -1px 0 0 -8%;
margin: 0 0 0 -8%;
}

#sidebar aside > ul a:hover {
background: #e9e9e9;
font-weight: bold;
}

#sidebar aside > ul a:active {
Expand All @@ -2427,17 +2431,20 @@ html.jquery-learning { background: #000 url(../i/learning_bg.jpg) no-repeat cent
#container #sidebar .current-cat-parent ul a,
#container #sidebar .current-cat ul.children a {
padding-left: 25%;
width: 75%
width: 80%
}
#sidebar aside > ul li.current-cat li {
border-bottom: 1px solid #c5c5c5;

#sidebar aside > ul li.current-cat-parent a,
#sidebar aside > ul li.current-cat a {
background: #e6e6e6;
color: #666666;
}

#sidebar aside > ul li.current-cat > a {
color: #000;
color: #111;
}



/*******************************************************************************/
/* Pagination
/*******************************************************************************/
Expand Down