Remove meta strip, replace subscribe with login+lang toggle, remove newsletter box from layout

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
alireza 2026-06-01 08:49:37 +03:30
parent fe3b5b0f67
commit 9bb56e8795
2 changed files with 21 additions and 113 deletions

View File

@ -152,87 +152,6 @@ export default function Header() {
transition: 'background 220ms ease, backdrop-filter 220ms ease, border-color 220ms ease',
}}
>
{/*
TOP META STRIP slim, dark, collapses on scroll
*/}
<div
style={{
background: T.ink,
color: 'rgba(255,255,255,0.7)',
height: scrolled ? 0 : 32,
opacity: scrolled ? 0 : 1,
overflow: 'hidden',
transition: 'height 220ms ease, opacity 180ms ease',
}}
className="max-md:hidden"
>
<div
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
height: 32,
fontSize: 11,
}}
className="max-w-7xl mx-auto px-12"
>
{/* Right: date */}
<span style={{ letterSpacing: '0.3px' }}>
{lang === 'fa' ? 'شنبه ۲۱ بهمن ۱۴۰۳ · دوره دوازدهم' : 'Sat 10 Feb 2025 · Vol. XII'}
</span>
{/* Left: meta links + login + lang toggle */}
<div style={{ display: 'flex', alignItems: 'center', gap: 18 }}>
{META_LEFT.map((item) => (
<a
key={item.fa}
href="#"
style={{
fontSize: 11,
color: 'rgba(255,255,255,0.7)',
textDecoration: 'none',
transition: 'color 120ms',
}}
onMouseEnter={e => (e.currentTarget.style.color = 'var(--paper)')}
onMouseLeave={e => (e.currentTarget.style.color = 'rgba(255,255,255,0.7)')}
>
{lang === 'fa' ? item.fa : item.en}
</a>
))}
<span style={{ color: 'rgba(255,255,255,0.2)' }}>·</span>
<a
href="/login"
style={{
fontSize: 11,
color: 'rgba(255,255,255,0.9)',
textDecoration: 'none',
fontWeight: 600,
}}
>
{lang === 'fa' ? 'ورود' : 'Login'}
</a>
<button
onClick={toggleLang}
style={{
fontSize: 11,
color: 'rgba(255,255,255,0.7)',
background: 'transparent',
border: '1px solid rgba(255,255,255,0.2)',
padding: '2px 8px',
cursor: 'pointer',
fontFamily: 'inherit',
letterSpacing: '0.5px',
transition: 'color 120ms, border-color 120ms',
}}
onMouseEnter={e => { e.currentTarget.style.color = 'var(--paper)'; e.currentTarget.style.borderColor = 'rgba(255,255,255,0.5)' }}
onMouseLeave={e => { e.currentTarget.style.color = 'rgba(255,255,255,0.7)'; e.currentTarget.style.borderColor = 'rgba(255,255,255,0.2)' }}
>
{lang === 'fa' ? 'EN' : 'FA'}
</button>
</div>
</div>
</div>
{/*
MAIN BAR brand | nav | actions
*/}
@ -332,8 +251,27 @@ export default function Header() {
<Search size={14} aria-hidden="true" />
</button>
{/* Subscribe CTA — desktop only */}
{!isMobile && <RedCtaButton>اشتراک</RedCtaButton>}
{/* Login + lang toggle — desktop only */}
{!isMobile && (
<>
<OutlineButton style={{ height: 34, padding: '0 16px', fontSize: 12 }}>
{lang === 'fa' ? 'ورود / ثبت‌نام' : 'Login / Register'}
</OutlineButton>
<button
onClick={toggleLang}
style={{
height: 34, padding: '0 12px', fontSize: 12, fontWeight: 700,
background: 'transparent', border: `1px solid ${T.ruleThin}`,
color: T.ink, cursor: 'pointer', fontFamily: 'inherit',
letterSpacing: '0.5px', transition: 'border-color 120ms, color 120ms',
}}
onMouseEnter={e => { e.currentTarget.style.borderColor = T.ink; e.currentTarget.style.color = T.ink }}
onMouseLeave={e => { e.currentTarget.style.borderColor = T.ruleThin; e.currentTarget.style.color = T.ink }}
>
{lang === 'fa' ? 'EN' : 'FA'}
</button>
</>
)}
{/* Mobile menu */}
{isMobile && (

View File

@ -1,4 +1,3 @@
import { useState } from 'react'
import { useLang } from '@/context/LangContext'
const REPORTS = {
@ -95,8 +94,6 @@ const T = {
export default function FactoryNewsletterLayout() {
const { lang } = useLang()
const t = T[lang]
const [email, setEmail] = useState('')
const [done, setDone] = useState(false)
return (
<section dir={lang === 'fa' ? 'rtl' : 'ltr'} style={{ background: 'var(--paper-2)' }}>
@ -169,33 +166,6 @@ export default function FactoryNewsletterLayout() {
</div>
</div>
{/* Navy subscribe card */}
<div style={{ background: 'var(--color-navy)', padding: '24px 20px', display: 'flex', flexDirection: 'column', gap: 14 }}>
<p style={{ fontSize: 13, color: 'rgba(255,255,255,0.72)', lineHeight: 1.75 }}>{t.nlDesc}</p>
<div style={{ display: 'flex', border: '1px solid rgba(255,255,255,0.18)' }}>
<input
type="email" value={email} onChange={e => setEmail(e.target.value)}
placeholder={t.placeholder} disabled={done}
style={{
flex: 1, border: 'none', padding: '10px 12px', fontSize: 12,
fontFamily: 'inherit', background: 'rgba(255,255,255,0.07)',
color: '#fff', outline: 'none', direction: lang === 'fa' ? 'rtl' : 'ltr',
}}
/>
<button
onClick={() => { if (email) setDone(true) }} disabled={done}
style={{
background: done ? 'rgba(255,255,255,0.15)' : 'var(--color-blue)',
color: '#fff', border: 'none', padding: '10px 16px',
fontSize: 12, fontWeight: 700, fontFamily: 'inherit',
cursor: done ? 'default' : 'pointer', whiteSpace: 'nowrap', flexShrink: 0,
}}
>
{done ? t.done : t.subscribe}
</button>
</div>
</div>
{/* Recent issues — navy number badges */}
<div style={{ display: 'flex', flexDirection: 'column', gap: 1, background: 'var(--rule-thin)' }}>
{ISSUES[lang].map((issue, i) => (