71 lines
2.9 KiB
PHP
71 lines
2.9 KiB
PHP
<?php
|
|
/**
|
|
* Site header.
|
|
*
|
|
* @package Gustavo_Portfolio
|
|
*/
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit;
|
|
}
|
|
?><!doctype html>
|
|
<html <?php language_attributes(); ?>>
|
|
<head>
|
|
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<?php wp_head(); ?>
|
|
</head>
|
|
<body <?php body_class(); ?>>
|
|
<?php wp_body_open(); ?>
|
|
<a class="skip-link screen-reader-text" href="#primary"><?php esc_html_e( 'Pular para o conteúdo', 'gustavoo-portfolio' ); ?></a>
|
|
|
|
<?php
|
|
$gustavoo_is_editorial_page = is_home() || is_category() || is_singular( 'post' );
|
|
$gustavoo_primary_shortcut_attr = is_customize_preview() ? ' data-customize-partial-id="gustavoo_portfolio_menu_shortcut_primary"' : '';
|
|
?>
|
|
<header id="masthead" class="site-header<?php echo is_front_page() ? ' site-header--overlay' : ''; ?><?php echo $gustavoo_is_editorial_page ? ' site-header--editorial' : ''; ?>">
|
|
<div class="site-shell site-header__inner">
|
|
<div class="site-branding">
|
|
<?php gustavoo_portfolio_the_brand(); ?>
|
|
<a class="site-branding__text" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
|
|
<span class="site-branding__name"><?php echo esc_html( get_bloginfo( 'name' ) ); ?></span>
|
|
<span class="site-branding__tagline site-branding__tagline--full"><?php esc_html_e( 'Desenvolvedor Full Stack | Web, Mobile, Infraestrutura & Automação', 'gustavoo-portfolio' ); ?></span>
|
|
<span class="site-branding__tagline site-branding__tagline--short"><?php esc_html_e( 'Desenvolvedor Full Stack | Web, Mobile, Infraestrutura & Automação', 'gustavoo-portfolio' ); ?></span>
|
|
</a>
|
|
</div>
|
|
|
|
<button class="menu-toggle" type="button" aria-expanded="false" aria-controls="primary-menu">
|
|
<span class="menu-toggle__label"><?php esc_html_e( 'Abrir menu', 'gustavoo-portfolio' ); ?></span>
|
|
<span class="menu-toggle__icon" aria-hidden="true"><span></span><span></span><span></span></span>
|
|
</button>
|
|
|
|
<nav id="site-navigation" class="primary-navigation" aria-label="<?php esc_attr_e( 'Navegação principal', 'gustavoo-portfolio' ); ?>"<?php echo $gustavoo_primary_shortcut_attr; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Static attribute. ?>>
|
|
<button class="menu-drawer-close" type="button" data-nav-close aria-label="<?php esc_attr_e( 'Fechar menu', 'gustavoo-portfolio' ); ?>">
|
|
<span aria-hidden="true"></span>
|
|
<span aria-hidden="true"></span>
|
|
</button>
|
|
<?php
|
|
wp_nav_menu(
|
|
array(
|
|
'theme_location' => 'primary',
|
|
'menu_id' => 'primary-menu',
|
|
'menu_class' => 'primary-menu',
|
|
'container' => false,
|
|
'fallback_cb' => 'gustavoo_portfolio_primary_menu_fallback',
|
|
'depth' => 2,
|
|
)
|
|
);
|
|
?>
|
|
<?php if ( $gustavoo_is_editorial_page ) : ?>
|
|
<?php gustavoo_portfolio_mobile_news_category_menu(); ?>
|
|
<?php endif; ?>
|
|
</nav>
|
|
|
|
</div>
|
|
</header>
|
|
|
|
<?php
|
|
if ( $gustavoo_is_editorial_page ) {
|
|
gustavoo_portfolio_news_category_menu();
|
|
}
|