Making WordPress.org

Changeset 412


Ignore:
Timestamp:
02/21/2014 07:01:42 PM (11 years ago)
Author:
iandunn
Message:

WordCamp Base: Add support for responsive menus. props r3df. Fixes #358.

This does include the CSS rules to show the responsive menu on smaller devices by default, it just adds the necessary menu element and toggle script so that a WordCamp can use the Custom CSS module to make their site fully responsive.

Location:
sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-base
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-base/header.php

    r73 r412  
    2323        wp_enqueue_script( 'comment-reply' );
    2424
     25    // Adds JavaScript for handling the navigation menu hide-and-show behavior to allow responsive menus.
     26    wp_enqueue_script( 'wordcamp-base-navigation', get_template_directory_uri() . '/lib/navigation/navigation.js', array(), '1.0', true );
     27
    2528    /* Always have wp_head() just before the closing </head>
    2629     * tag of your theme, or you will break many plugins, which
  • sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-base/lib/structure/class-wcb-menu.php

    r2 r412  
    99        <div id="<?php echo $this->get_id(); ?>" class="grid_12">
    1010            <div id="access" role="navigation" class="clearfix">
     11                <?php /* Toggle element for responsive menus */ ?>
     12                <h3 class="menu-toggle"><?php _e( 'Menu', 'wordcampbase' ); ?></h3>
    1113                <?php /*  Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?>
    1214                <div class="skip-link screen-reader-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'wordcampbase' ); ?>"><?php _e( 'Skip to content', 'wordcampbase' ); ?></a></div>
  • sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-base/style.css

    r85 r412  
    376376    width: 940px;
    377377}
     378#access .menu-toggle {
     379    display: none;
     380}
    378381#access .menu-header,
    379382div.menu {
Note: See TracChangeset for help on using the changeset viewer.