Agregar estructura completa del tema APUS con Bootstrap 5 y optimizaciones de rendimiento
Se implementa tema WordPress personalizado para Análisis de Precios Unitarios con funcionalidades avanzadas: - Sistema de templates (front-page, single, archive, page, 404, search) - Integración de Bootstrap 5.3.8 con estructura modular de assets - Panel de opciones del tema con Customizer API - Optimizaciones de rendimiento (Critical CSS, Image Optimization, Performance) - Funcionalidades SEO y compatibilidad con Rank Math - Sistema de posts relacionados y tabla de contenidos - Badge de categorías y manejo de AdSense diferido - Tipografías Google Fonts configurables - Documentación completa del tema y guías de uso 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
499
wp-content/themes/apus-theme/assets/css/header.css
Normal file
499
wp-content/themes/apus-theme/assets/css/header.css
Normal file
@@ -0,0 +1,499 @@
|
||||
/**
|
||||
* Header Styles - Sticky Navigation with Hamburger Menu
|
||||
*
|
||||
* This file contains all styles for the site header including:
|
||||
* - Sticky header behavior
|
||||
* - Desktop horizontal navigation
|
||||
* - Mobile hamburger menu
|
||||
* - Responsive breakpoints
|
||||
* - Accessibility features
|
||||
*
|
||||
* @package Apus_Theme
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
/* ==========================================================================
|
||||
Header Base Styles
|
||||
========================================================================== */
|
||||
|
||||
.site-header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
background-color: var(--header-bg, #ffffff);
|
||||
box-shadow: var(--header-shadow, 0 2px 4px rgba(0, 0, 0, 0.1));
|
||||
z-index: var(--z-header, 1000);
|
||||
transition: box-shadow 0.3s ease, background-color 0.3s ease;
|
||||
}
|
||||
|
||||
/* Enhanced shadow when scrolled */
|
||||
.site-header.scrolled {
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.header-inner {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 1rem;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
min-height: var(--header-height, 70px);
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Site Branding / Logo
|
||||
========================================================================== */
|
||||
|
||||
.site-branding {
|
||||
flex-shrink: 0;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.site-identity {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.site-title {
|
||||
margin: 0;
|
||||
font-size: 1.5rem;
|
||||
font-weight: var(--font-weight-bold, 700);
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.site-title a {
|
||||
color: var(--color-dark, #212529);
|
||||
text-decoration: none;
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
|
||||
.site-title a:hover {
|
||||
color: var(--color-primary, #007bff);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.site-title a:focus {
|
||||
outline: 2px solid var(--color-primary, #007bff);
|
||||
outline-offset: 2px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.site-description {
|
||||
margin: 0.25rem 0 0 0;
|
||||
font-size: 0.875rem;
|
||||
color: var(--color-secondary, #6c757d);
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
/* Custom Logo */
|
||||
.custom-logo-link {
|
||||
display: inline-block;
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
.custom-logo {
|
||||
max-height: 50px;
|
||||
width: auto;
|
||||
height: auto;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
.custom-logo:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Desktop Navigation
|
||||
========================================================================== */
|
||||
|
||||
.desktop-nav {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.primary-menu {
|
||||
display: flex;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.primary-menu li {
|
||||
position: relative;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.primary-menu a {
|
||||
display: block;
|
||||
padding: 0.75rem 1rem;
|
||||
color: var(--color-dark, #212529);
|
||||
text-decoration: none;
|
||||
font-weight: var(--font-weight-medium, 500);
|
||||
font-size: 1rem;
|
||||
border-radius: 4px;
|
||||
transition: background-color 0.3s ease, color 0.3s ease;
|
||||
}
|
||||
|
||||
.primary-menu a:hover,
|
||||
.primary-menu a:focus {
|
||||
background-color: var(--color-light, #f8f9fa);
|
||||
color: var(--color-primary, #007bff);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.primary-menu a:focus {
|
||||
outline: 2px solid var(--color-primary, #007bff);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* Current menu item */
|
||||
.primary-menu .current-menu-item > a,
|
||||
.primary-menu .current_page_item > a {
|
||||
color: var(--color-primary, #007bff);
|
||||
background-color: rgba(0, 123, 255, 0.1);
|
||||
}
|
||||
|
||||
/* Submenu styles (if needed) */
|
||||
.primary-menu .sub-menu {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
min-width: 200px;
|
||||
background-color: #ffffff;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||
border-radius: 4px;
|
||||
padding: 0.5rem 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transform: translateY(-10px);
|
||||
transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
|
||||
}
|
||||
|
||||
.primary-menu li:hover > .sub-menu,
|
||||
.primary-menu li:focus-within > .sub-menu {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.primary-menu .sub-menu a {
|
||||
padding: 0.5rem 1rem;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Mobile Menu Toggle (Hamburger)
|
||||
========================================================================== */
|
||||
|
||||
.mobile-menu-toggle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
z-index: var(--z-header, 1000);
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.mobile-menu-toggle:hover {
|
||||
background-color: var(--color-light, #f8f9fa);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.mobile-menu-toggle:focus {
|
||||
outline: 2px solid var(--color-primary, #007bff);
|
||||
outline-offset: 2px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/* Hamburger Icon */
|
||||
.hamburger-icon {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
width: 24px;
|
||||
height: 18px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.hamburger-icon .line {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
background-color: var(--color-dark, #212529);
|
||||
border-radius: 2px;
|
||||
transition: transform 0.3s ease, opacity 0.3s ease;
|
||||
transform-origin: center;
|
||||
}
|
||||
|
||||
/* Hamburger animation when menu is open */
|
||||
.mobile-menu-toggle[aria-expanded="true"] .hamburger-icon .line:nth-child(1) {
|
||||
transform: translateY(8px) rotate(45deg);
|
||||
}
|
||||
|
||||
.mobile-menu-toggle[aria-expanded="true"] .hamburger-icon .line:nth-child(2) {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.mobile-menu-toggle[aria-expanded="true"] .hamburger-icon .line:nth-child(3) {
|
||||
transform: translateY(-8px) rotate(-45deg);
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Mobile Menu Overlay
|
||||
========================================================================== */
|
||||
|
||||
.mobile-menu-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
z-index: var(--z-overlay, 998);
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: opacity 0.3s ease, visibility 0.3s ease;
|
||||
}
|
||||
|
||||
.mobile-menu-overlay.active {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Mobile Navigation
|
||||
========================================================================== */
|
||||
|
||||
.mobile-menu {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 280px;
|
||||
max-width: 85%;
|
||||
height: 100%;
|
||||
background-color: #ffffff;
|
||||
box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
|
||||
z-index: var(--z-mobile-menu, 999);
|
||||
transform: translateX(100%);
|
||||
transition: transform 0.3s ease;
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.mobile-menu.active {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
/* Mobile Menu Header */
|
||||
.mobile-menu-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 1rem;
|
||||
border-bottom: 1px solid #e9ecef;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background-color: #ffffff;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.mobile-menu-title {
|
||||
font-size: 1.25rem;
|
||||
font-weight: var(--font-weight-semibold, 600);
|
||||
color: var(--color-dark, #212529);
|
||||
}
|
||||
|
||||
.mobile-menu-close {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: transparent;
|
||||
border: none;
|
||||
font-size: 2rem;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
color: var(--color-dark, #212529);
|
||||
transition: background-color 0.3s ease, color 0.3s ease;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.mobile-menu-close:hover {
|
||||
background-color: var(--color-light, #f8f9fa);
|
||||
color: var(--color-primary, #007bff);
|
||||
}
|
||||
|
||||
.mobile-menu-close:focus {
|
||||
outline: 2px solid var(--color-primary, #007bff);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* Mobile Menu Items */
|
||||
.mobile-primary-menu {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 1rem 0;
|
||||
}
|
||||
|
||||
.mobile-primary-menu li {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.mobile-primary-menu a {
|
||||
display: block;
|
||||
padding: 0.875rem 1.5rem;
|
||||
color: var(--color-dark, #212529);
|
||||
text-decoration: none;
|
||||
font-size: 1.125rem;
|
||||
font-weight: var(--font-weight-medium, 500);
|
||||
border-left: 3px solid transparent;
|
||||
transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
|
||||
}
|
||||
|
||||
.mobile-primary-menu a:hover,
|
||||
.mobile-primary-menu a:focus {
|
||||
background-color: var(--color-light, #f8f9fa);
|
||||
color: var(--color-primary, #007bff);
|
||||
border-left-color: var(--color-primary, #007bff);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.mobile-primary-menu a:focus {
|
||||
outline: 2px solid var(--color-primary, #007bff);
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
/* Current menu item in mobile */
|
||||
.mobile-primary-menu .current-menu-item > a,
|
||||
.mobile-primary-menu .current_page_item > a {
|
||||
color: var(--color-primary, #007bff);
|
||||
background-color: rgba(0, 123, 255, 0.05);
|
||||
border-left-color: var(--color-primary, #007bff);
|
||||
}
|
||||
|
||||
/* Mobile submenu */
|
||||
.mobile-primary-menu .sub-menu {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #f8f9fa;
|
||||
}
|
||||
|
||||
.mobile-primary-menu .sub-menu a {
|
||||
padding-left: 2.5rem;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Prevent body scroll when mobile menu is open
|
||||
========================================================================== */
|
||||
|
||||
body.mobile-menu-open {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Responsive Breakpoints
|
||||
========================================================================== */
|
||||
|
||||
/* Tablet and up - 768px */
|
||||
@media (min-width: 768px) {
|
||||
.header-inner {
|
||||
padding: 1rem 2rem;
|
||||
}
|
||||
|
||||
.site-title {
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
|
||||
.desktop-nav {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.mobile-menu-toggle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.custom-logo {
|
||||
max-height: 60px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Desktop - 1024px */
|
||||
@media (min-width: 1024px) {
|
||||
.primary-menu {
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.primary-menu a {
|
||||
padding: 0.75rem 1.25rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* Large desktop - 1200px */
|
||||
@media (min-width: 1200px) {
|
||||
.header-inner {
|
||||
padding: 1rem 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
High Contrast Mode Support
|
||||
========================================================================== */
|
||||
|
||||
@media (prefers-contrast: high) {
|
||||
.site-header {
|
||||
border-bottom: 2px solid currentColor;
|
||||
}
|
||||
|
||||
.primary-menu a:focus,
|
||||
.mobile-menu-toggle:focus,
|
||||
.mobile-menu-close:focus {
|
||||
outline-width: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Reduced Motion Support
|
||||
========================================================================== */
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.site-header,
|
||||
.primary-menu a,
|
||||
.mobile-menu,
|
||||
.mobile-menu-overlay,
|
||||
.hamburger-icon .line,
|
||||
.mobile-menu-toggle {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Print Styles
|
||||
========================================================================== */
|
||||
|
||||
@media print {
|
||||
.site-header {
|
||||
position: static;
|
||||
box-shadow: none;
|
||||
border-bottom: 1px solid #000;
|
||||
}
|
||||
|
||||
.mobile-menu-toggle,
|
||||
.desktop-nav,
|
||||
.mobile-menu,
|
||||
.mobile-menu-overlay {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user