Added basic topbar

This commit is contained in:
Hippo 2019-08-03 20:36:06 +05:30
parent bff90947d1
commit 2001c1ee30
2 changed files with 39 additions and 0 deletions

View file

@ -22,6 +22,19 @@
<body <?php body_class(); ?> itemscope="itemscope" itemtype="http://schema.org/WebPage"> <body <?php body_class(); ?> itemscope="itemscope" itemtype="http://schema.org/WebPage">
<?php // Show navigation menu on everything except Single pages, unless Show Primary Nav Menu on Single Pages is enabled ?>
<nav role="navigation" class="site-navigation topbar">
<a class="screen-reader-text skip-link" href="#content" title="<?php esc_attr_e( 'Skip to content', 'independent-publisher' ); ?>"><?php _e( 'Skip to content', 'independent-publisher' ); ?></a>
<?php // If this is a Single Post and we have a menu assigned to the "Single Posts Menu", show that ?>
<?php if ( is_single() && has_nav_menu( 'single' ) ) : ?>
<?php wp_nav_menu( array( 'theme_location' => 'single', 'depth' => 1 ) ); ?>
<?php else : ?>
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'depth' => 1 ) ); ?>
<?php endif; ?>
</nav><!-- .site-navigation .topbar -->
<?php // Displays full-width featured image on Single Posts if applicable ?> <?php // Displays full-width featured image on Single Posts if applicable ?>
<?php independent_publisher_full_width_featured_image(); ?> <?php independent_publisher_full_width_featured_image(); ?>

View file

@ -173,3 +173,29 @@ body::before {
.display-posts-listing.image-top .listing-item .excerpt-dash { .display-posts-listing.image-top .listing-item .excerpt-dash {
display: none; display: none;
} }
/* Topbar */
.topbar {
display: block;
margin: 0;
padding: 0;
background: white;
border-bottom: 0.1rem solid lightgrey;
}
.topbar ul>li {
display: inline;
padding: 0.7rem;
border: 0.2rem dashed rgba(0,0,0,0);
}
.topbar ul>li:hover {
border: 0.2rem dashed darkgrey;
}
.topbar a, .topbar a:visited {
color: black;
text-decoration: none;
font-family: "Myriad Pro", Helvetica, Arial, sans-serif;
}