Making WordPress.org


Ignore:
Timestamp:
02/01/2018 09:04:12 PM (4 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Adapt to new handbook styles as introduced in the Make team sites.

  • Revamps style of handbook sidebar (including making menu collapsible) and in-content table of contents
  • Removes search pane (with imminent switch to search widget) for handbooks
  • Moves breadcrumbs into main content area for handbooks
  • Moves #masthead out of, and before, #page
  • Restyles masthead to have blue background
  • Restyles slide down search pane to not match new masthead
  • Introduces dropdown menu for masthead menu at smaller viewports (as used in WP-CLI Commands)
  • Minor front page revamp of colors (more coming)

Fixes #2969,
See #2459, #3377.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/header.php

    r5820 r6512  
    1313?>
    1414
    15 <div id="page" <?php body_class( 'hfeed site devhub-wrap' ); ?>>
     15<header id="masthead" class="site-header" role="banner">
     16    <?php if ( get_query_var( 'is_handbook' ) ) : ?>
     17    <a href="#" id="secondary-toggle" onclick="return false;"><strong><?php _e( 'Menu', 'wporg' ); ?></strong></a>
     18    <?php endif; ?>
     19    <div class="site-branding">
     20        <?php $tag = is_front_page() ? 'span' : 'h1'; ?>
     21        <<?php echo $tag; ?> class="site-title">
     22            <a href="<?php echo esc_url( DevHub\get_site_section_url() ); ?>" rel="home"><?php echo DevHub\get_site_section_title(); ?></a>
     23        </<?php echo $tag; ?>>
     24
     25        <nav id="site-navigation" class="main-navigation" role="navigation">
     26            <button class="menu-toggle dashicons dashicons-arrow-down-alt2" aria-controls="primary-menu" aria-expanded="false" aria-label="<?php esc_attr_e( 'Primary Menu', 'wporg' ); ?>"></button>
     27            <?php
     28            $active_menu = is_post_type_archive( 'command' ) || is_singular( 'command' ) ? 'devhub-cli-menu' : 'devhub-menu';
     29            wp_nav_menu( array(
     30                'theme_location'  => $active_menu,
     31                'container_class' => 'menu-container',
     32                'container_id'    => 'primary-menu',
     33            ) ); ?>
     34        </nav>
     35    </div>
     36</header><!-- #masthead -->
     37
     38<div id="page" class="hfeed site devhub-wrap">
    1639    <a href="#main" class="screen-reader-text"><?php _e( 'Skip to content', 'wporg' ); ?></a>
    1740
    1841    <?php do_action( 'before' ); ?>
    19     <header id="masthead" class="site-header" role="banner">
    20         <div class="inner-wrap">
    21             <div class="site-branding">
    22                 <?php $tag = is_front_page() ? 'span' : 'h1'; ?>
    23                 <<?php echo $tag; ?> class="site-title">
    24                     <a href="<?php echo esc_url( DevHub\get_site_section_url() ); ?>" rel="home"><?php echo DevHub\get_site_section_title(); ?></a>
    25                 </<?php echo $tag; ?>>
    26             </div>
    27             <div class="devhub-menu">
    28                 <?php
    29                 $active_menu = is_post_type_archive( 'command' ) || is_singular( 'command' ) ? 'devhub-cli-menu' : 'devhub-menu';
    30                 wp_nav_menu( array(
    31                     'theme_location'  => $active_menu,
    32                     'container_class' => 'menu-container',
    33                 ) ); ?>
    34             </div>
    35         </div><!-- .inner-wrap -->
    36     </header><!-- #masthead -->
    3742    <?php
    3843    if ( DevHub\should_show_search_bar() ) : ?>
Note: See TracChangeset for help on using the changeset viewer.