This commit is contained in:
2026-09-03 10:17:48 +03:30
parent f315ee56a1
commit df6cb33731
6 changed files with 45 additions and 40 deletions
+30 -29
View File
@@ -2,38 +2,39 @@
// سکشن معرفی شرکت با متن بلند؛ به‌خاطر طولانی بودن متن، یک دکمه «ادامه مطلب» برای باز/بسته کردن دارد.
import { useState } from 'react';
import { useLanguage } from '@/app/context/LanguageContext';
import {useState} from 'react';
import {useLanguage} from '@/app/context/LanguageContext';
export default function AboutSection() {
const { t } = useLanguage();
const [expanded, setExpanded] = useState(false);
const visibleParagraphs = expanded ? t.about.paragraphs : t.about.paragraphs.slice(0, 2);
const {t} = useLanguage();
const [expanded, setExpanded] = useState(true);
const visibleParagraphs = expanded ? t.about.paragraphs : t.about.paragraphs.slice(0, 2);
return (
<section id="about" className="relative px-6 md:px-16 py-20 md:py-28 bg-elevated border-t border-subtle">
<div className="max-w-4xl mx-auto">
<span className="text-brand-400 text-sm font-semibold tracking-wide">{t.about.eyebrow}</span>
<h2 className="text-2xl md:text-4xl font-extrabold brand-gradient-text mt-3 mb-8">
{t.about.legalName}
</h2>
return (
<section id="about" className="relative px-6 md:px-16 py-20 md:py-28 bg-elevated border-t border-subtle">
<div className="max-w-4xl mx-auto">
<span className="text-brand-400 text-sm font-semibold tracking-wide">{t.about.eyebrow}</span>
<h2 className="text-2xl md:text-4xl font-extrabold brand-gradient-text mt-3 mb-8">
{t.about.legalName}
</h2>
<div className="flex flex-col gap-5">
{visibleParagraphs.map((p, i) => (
<p key={i} className="text-secondary leading-8 text-base md:text-lg text-justify">
{p}
</p>
))}
</div>
<div className="flex flex-col gap-5">
{visibleParagraphs.map((p, i) => (
<p key={i} className="text-secondary leading-8 text-base md:text-lg text-justify">
{p}
</p>
))}
</div>
<button
onClick={() => setExpanded((v) => !v)}
className="mt-6 inline-flex items-center gap-2 text-brand-400 hover:text-brand-300 text-sm font-semibold transition-colors"
>
{expanded ? t.about.less : t.about.more}
<span className={`transition-transform ${expanded ? 'rotate-180' : ''}`}>˅</span>
</button>
</div>
</section>
);
{/* faz 1 */}
{/* <button
onClick={() => setExpanded((v) => !v)}
className="mt-6 inline-flex items-center gap-2 text-brand-400 hover:text-brand-300 text-sm font-semibold transition-colors"
>
{expanded ? t.about.less : t.about.more}
<span className={`transition-transform ${expanded ? 'rotate-180' : ''}`}>˅</span>
</button>*/}
</div>
</section>
);
}
+3 -2
View File
@@ -75,7 +75,8 @@ export default function Header() {
{t.nav.login}
</Button>
<Badge count={cartCount} size="small" offset={[-2, 2]}>
{/* faz 1 */}
{/* <Badge count={cartCount} size="small" offset={[-2, 2]}>
<Button
shape="circle"
size="large"
@@ -83,7 +84,7 @@ export default function Header() {
onClick={() => dispatch(openDrawer())}
aria-label="cart"
/>
</Badge>
</Badge>*/}
<button
className="xl:hidden text-brand-400 text-2xl"
-1
View File
@@ -1,6 +1,5 @@
'use client';
// دکمه سوییچ حالت روشن/تیره.
import { Button, Tooltip } from 'antd';
import { SunOutlined, MoonOutlined } from '@ant-design/icons';
+2 -2
View File
@@ -101,9 +101,9 @@ export default function VendingCard({machine, onQuickView}) {
<p className="text-xl md:text-2xl font-bold text-primary mt-2">{machine.priceLabel}</p>
<div className="flex flex-wrap items-center gap-2 mt-2 ">
<Button type="primary" size="large" icon={<ShoppingCartOutlined/>} onClick={handleAddToCart}>
{/* <Button type="primary" size="large" icon={<ShoppingCartOutlined/>} onClick={handleAddToCart}>
{t.machineActions.addToCart}
</Button>
</Button>*/}
<Button size="large" icon={<EyeOutlined/>} onClick={() => onQuickView?.(machine)}>
{t.machineActions.quickView}
</Button>