From 8caf3e41cd84737a3f34abb1727ac52a9bd633f5 Mon Sep 17 00:00:00 2001 From: Paulo Massingue Date: Mon, 23 Nov 2026 15:31:43 +0200 Subject: [PATCH] navbar ajustado --- resources/css/app.css | 39 ++++++----- resources/css/tempo-header.css | 64 +++++++++++-------- .../js/components/portal-grouped-menu.tsx | 6 +- resources/js/components/tempo-footer.tsx | 22 +++---- resources/js/layouts/portal-navigation.tsx | 3 + 5 files changed, 79 insertions(+), 55 deletions(-) diff --git a/resources/css/app.css b/resources/css/app.css index 76527569..26757bb7 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -69,10 +69,10 @@ gap: 0.35rem; font-size: 0.875rem; line-height: 1.25rem; - color: #e2e8f0; + color: #fff; transition: - color 0.2s, - transform 0.2s; + color 0.3s ease, + transform 0.3s ease; } .tempo-footer-link > svg { align-self: center; @@ -80,18 +80,18 @@ flex-shrink: 0; } .tempo-footer-link:hover { - color: #fb7185; + color: #ef4444; transform: translateX(3px); } .tempo-contact-link { display: flex; align-items: center; - gap: 0.75rem; + gap: 1rem; min-height: 40px; - transition: color 0.2s; + transition: color 0.3s ease; } .tempo-contact-link:hover { - color: #fb7185; + color: #ef4444; } .tempo-contact-icon { display: flex; @@ -100,9 +100,16 @@ flex-shrink: 0; align-items: center; justify-content: center; - border: 1px solid #ffffff12; - border-radius: 0.65rem; - background: #ffffff08; + border: 1px solid rgba(255, 255, 255, 0.05); + border-radius: 0.75rem; + background: rgba(255, 255, 255, 0.03); + transition: + background-color 0.3s ease, + border-color 0.3s ease; +} +.tempo-contact-link:hover .tempo-contact-icon { + background: #dc2626; + border-color: #dc2626; } .tempo-footer-social { display: flex; @@ -110,13 +117,15 @@ height: 44px; align-items: center; justify-content: center; - border: 1px solid #ffffff15; - border-radius: 0.65rem; + border: 1px solid rgba(255, 255, 255, 0.05); + border-radius: 0.75rem; + background: rgba(255, 255, 255, 0.03); color: #fff; transition: - color 0.2s, - border-color 0.2s, - transform 0.2s; + color 0.3s ease, + border-color 0.3s ease, + transform 0.3s ease, + background-color 0.3s ease; } .tempo-footer [aria-label='Redes sociais da Revista Tempo'] { gap: 0.75rem; diff --git a/resources/css/tempo-header.css b/resources/css/tempo-header.css index 3436b8cb..eede9ca7 100644 --- a/resources/css/tempo-header.css +++ b/resources/css/tempo-header.css @@ -1,33 +1,38 @@ /* Presentation choice for Tempo's 21/10/2026 request: one shared navigation. */ .tempo-header { - position: sticky; + position: fixed; top: 0; + right: 0; + left: 0; z-index: 40; - background: rgba(9, 9, 9, 0.52); + background: rgba(0, 0, 0, 0.95); color: #fff; border-bottom: 1px solid transparent; - -webkit-backdrop-filter: saturate(140%) blur(14px); - backdrop-filter: saturate(140%) blur(14px); - box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04); - transition: - background-color 0.28s ease, - border-color 0.28s ease, - box-shadow 0.28s ease, - backdrop-filter 0.28s ease; + -webkit-backdrop-filter: blur(12px); + backdrop-filter: blur(12px); + box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); + transition: all 0.5s ease; +} +.tempo-header[data-home]:not([data-scrolled]):not([data-expanded]) { + background: transparent; + -webkit-backdrop-filter: none; + backdrop-filter: none; + box-shadow: none; } .tempo-header[data-scrolled], .tempo-header[data-expanded] { - background: rgba(9, 9, 9, 0.88); - border-bottom-color: rgba(255, 255, 255, 0.08); - box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); + background: rgba(0, 0, 0, 0.95); + -webkit-backdrop-filter: blur(12px); + backdrop-filter: blur(12px); + box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); } .tempo-header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; - grid-template-rows: 56px; + grid-template-rows: 72px; align-items: center; column-gap: 0.5rem; - max-width: 1600px; + max-width: 1440px; margin-inline: auto; padding-inline: 0.75rem; transition: grid-template-rows 0.28s ease; @@ -36,7 +41,7 @@ grid-area: 1 / 1; display: inline-flex; align-items: center; - width: 104px; + width: 112px; max-width: 100%; border-radius: 0.25rem; transition: opacity 0.2s ease; @@ -68,12 +73,17 @@ width: 100%; min-height: 40px; padding: 0.375rem 0.625rem; + border: 0; border-radius: 0.5rem; + background: transparent; color: #e2e8f0; + font: inherit; font-size: 0.9375rem; line-height: 1.4; font-weight: 600; white-space: nowrap; + cursor: pointer; + appearance: none; transition: color 0.2s ease, background-color 0.2s ease, @@ -256,11 +266,11 @@ @media (min-width: 640px) { .tempo-header-inner { grid-template-columns: minmax(0, 1fr) auto auto auto; - column-gap: 0.625rem; + column-gap: 0.75rem; padding-inline: 1.25rem; } .tempo-logo-link { - width: 116px; + width: 132px; } .tempo-interest-button { display: inline-flex; @@ -273,13 +283,13 @@ } @media (min-width: 1280px) { .tempo-header-inner { - grid-template-rows: minmax(56px, auto); + grid-template-rows: minmax(72px, auto); grid-template-columns: auto minmax(0, 1fr) auto auto auto; column-gap: 0.375rem; padding-inline: 1.25rem; } .tempo-logo-link { - width: 96px; + width: 120px; } .tempo-login-button > span { max-width: 3rem; @@ -300,7 +310,7 @@ } .tempo-nav-trigger { justify-content: center; - min-height: 38px; + min-height: 40px; padding: 0.375rem 0.5rem; font-size: 0.9375rem; letter-spacing: 0.01em; @@ -328,21 +338,21 @@ } @media (min-width: 1440px) { .tempo-header-inner { - column-gap: 0.625rem; - padding-inline: 1.75rem; + column-gap: 0.5rem; + padding-inline: 1.5rem; } .tempo-nav-trigger { padding-inline: 0.625rem; font-size: 1rem; } .tempo-logo-link { - width: 112px; + width: 132px; } .tempo-login-button > span { max-width: 5rem; } .tempo-header-extras { - padding-right: 0.625rem; + padding-right: 0.75rem; } .tempo-primary-navigation > ul { gap: 0.125rem; @@ -350,10 +360,10 @@ } @media (min-width: 1536px) { .tempo-header-inner { - column-gap: 0.875rem; + column-gap: 1rem; } .tempo-nav-trigger { - padding-inline: 0.75rem; + padding-inline: 0.875rem; } .tempo-login-button > span { max-width: 6rem; diff --git a/resources/js/components/portal-grouped-menu.tsx b/resources/js/components/portal-grouped-menu.tsx index 69bb95c1..fdb187ca 100644 --- a/resources/js/components/portal-grouped-menu.tsx +++ b/resources/js/components/portal-grouped-menu.tsx @@ -93,9 +93,10 @@ export function PortalGroupedMenu() { const toolsId = useId(); const interestId = useId(); const toggle = useRef(null); + const isHome = url.split('?')[0] === '/'; useEffect(() => router.on('navigate', () => setExpanded(false)), []); useEffect(() => { - const onScroll = () => setScrolled(window.scrollY > 8); + const onScroll = () => setScrolled(window.scrollY > 30); onScroll(); window.addEventListener('scroll', onScroll, { passive: true }); return () => window.removeEventListener('scroll', onScroll); @@ -165,6 +166,7 @@ export function PortalGroupedMenu() { lang={language} data-expanded={expanded || undefined} data-scrolled={scrolled || undefined} + data-home={isHome || undefined} onKeyDown={(event) => { if ( event.key === 'Escape' && @@ -296,7 +298,7 @@ export function PortalGroupedMenu() { undefined } > - Mais + {t('Mais')}