WordPress.org

Making WordPress.org

Changeset 1211


Ignore:
Timestamp:
02/03/2015 07:06:46 PM (5 years ago)
Author:
obenland
Message:

WP.org Themes: Add a secondary menu in the headline.

This will be the home for links to the commercial themes page and the theme
uploader. It'll mostly look like the secondary menus on make blogs, with some
added hover styles and responsiveness.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes
Files:
2 edited

Legend:

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

    r1084 r1211  
    1414    <div class="wrapper">
    1515        <h2 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h2>
     16        <nav id="site-navigation" class="main-navigation" role="navigation">
     17            <?php
     18                wp_nav_menu( array(
     19                    'theme_location' => 'primary',
     20                    'container'      => false,
     21                    'depth'          => 1,
     22                ) );
     23            ?>
     24        </nav>
    1625    </div>
    1726</div>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/style.css

    r1206 r1211  
    5353}
    5454
     55/* Clearing */
     56.clear:before,
     57.clear:after,
     58.main-navigation:before,
     59.main-navigation:after {
     60    content: "";
     61    display: table;
     62}
     63
     64.clear:after,
     65.main-navigation:after {
     66    clear: both;
     67}
     68
    5569/* assorted overrides */
     70#headline {
     71    height: auto;
     72}
     73
     74#headline h2 {
     75    margin-bottom: 16px;
     76}
    5677
    5778.wrap {
     
    711732}
    712733
     734/* Secondary header design */
     735.main-navigation .menu {
     736    float: right;
     737    font-size: 14px;
     738    font-weight: bold;
     739    list-style: none;
     740    margin-right: 15px;
     741    padding-top: 22px;
     742}
     743
     744.main-navigation .menu li {
     745    display: inline-block;
     746    padding-left: 20px;
     747}
     748.main-navigation .menu li:first-of-type {
     749     padding-left: 10px;
     750}
     751
     752#site-navigation.main-navigation a:hover,
     753#site-navigation.main-navigation a:focus {
     754    color: #2ea2cc;
     755}
     756
     757/* Responsive design for secondary header */
     758@media (max-width: 740px) {
     759    #headline h2 {
     760        float: none;
     761    }
     762    .main-navigation .menu {
     763        background: #f5f5f5;
     764        border-top: 1px solid #d7d7d7;
     765        margin: 0;
     766        padding: 8px 0;
     767        width: 100%;
     768    }
     769}
     770
    713771/* Theme notices */
    714772.notice,
Note: See TracChangeset for help on using the changeset viewer.