fix: remove heading subtitle from Technogen and align swipe direction

This commit is contained in:
alireza 2026-08-25 16:19:37 +03:30
parent d9865c5bfe
commit b9e6462dd4
1 changed files with 25 additions and 39 deletions

View File

@ -89,13 +89,13 @@ export default function TechnogenSection() {
setIsPaused(false)
if (touchStartX.current === null) return
const diff = touchStartX.current - e.changedTouches[0].clientX
if (Math.abs(diff) > 40) {
if (isFa) {
if (diff > 0) goNext()
else goPrev()
if (Math.abs(diff) > 30) {
if (diff > 0) {
// Dragging finger left moves to next report
goNext()
} else {
if (diff > 0) goPrev()
else goNext()
// Dragging finger right moves to previous report
goPrev()
}
}
touchStartX.current = null
@ -175,18 +175,17 @@ export default function TechnogenSection() {
/>
<div className="max-w-7xl mx-auto px-12 max-md:px-4" style={{ position: 'relative', zIndex: 1 }}>
{/* ── Section Header with Gold Accent Line & Slider Controls ── */}
{/* ── Section Header with Gold Accent Line ── */}
<div
style={{
display: 'flex',
alignItems: 'flex-end',
alignItems: 'center',
justifyContent: 'space-between',
marginBottom: 24,
flexWrap: 'wrap',
gap: 16,
}}
>
<div>
<div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
<div style={{ width: 4, height: 28, background: GOLD, borderRadius: 2, flexShrink: 0 }} />
<h2
@ -202,23 +201,9 @@ export default function TechnogenSection() {
{isFa ? 'تکنوژن؛ برنامه توسعه‌گر ملی فناوری' : 'Technogen: National Technology Developer Program'}
</h2>
</div>
<p
style={{
fontSize: 13,
color: 'rgba(255,255,255,0.7)',
margin: '6px 0 0',
paddingInlineStart: 16,
lineHeight: 1.6,
}}
>
{isFa
? 'گزارش‌های تحلیلی و مطالعات تطبیقی یادگیری صنعتی، انتقال دانش و ساخت قابلیت فناورانه در زنجیره فولاد'
: 'Analytical notes and comparative studies on industrial learning, knowledge absorption, and technological capability building in steel.'}
</p>
</div>
{/* Slider controls (visible on desktop if >5 or always on mobile if >1) */}
{totalPages > 1 && (
{/* Slider controls (visible on desktop only if > 5 reports) */}
{!isMobile && totalPages > 1 && (
<div style={{ display: 'flex', alignItems: 'center', gap: 10 }}>
<span style={{ fontSize: 12, color: 'rgba(255,255,255,0.6)', fontWeight: 600 }}>
{isFa ? `${faNum(page + 1)} از ${faNum(totalPages)}` : `${page + 1} of ${totalPages}`}
@ -277,9 +262,9 @@ export default function TechnogenSection() {
<AnimatePresence mode="wait" custom={direction}>
<motion.div
key={page}
initial={{ opacity: 0, x: isFa ? direction * -30 : direction * 30 }}
initial={{ opacity: 0, x: direction * 40 }}
animate={{ opacity: 1, x: 0 }}
exit={{ opacity: 0, x: isFa ? direction * 30 : direction * -30 }}
exit={{ opacity: 0, x: -direction * 40 }}
transition={{ duration: 0.35, ease: EASE }}
style={{
display: 'grid',
@ -446,6 +431,7 @@ export default function TechnogenSection() {
{/* Mobile Dot Indicators */}
{isMobile && reports.length > 1 && (
<div
dir={isFa ? 'rtl' : 'ltr'}
style={{
display: 'flex',
alignItems: 'center',
@ -462,7 +448,7 @@ export default function TechnogenSection() {
setPage(idx)
}}
style={{
width: page === idx ? 20 : 6,
width: page === idx ? 22 : 6,
height: 6,
borderRadius: 3,
background: page === idx ? GOLD : 'rgba(255,255,255,0.25)',