update
This commit is contained in:
Generated
+28
-18
@@ -3,22 +3,15 @@
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="bb7b50a5-be9c-4cd7-a05b-979f0e91b173" name="Changes" comment="update">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/globals.css" beforeDir="false" afterPath="$PROJECT_DIR$/app/globals.css" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/components/Header.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/components/Header.jsx" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/components/HeroSection.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/components/HeroSection.jsx" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/data/content.js" beforeDir="false" afterPath="$PROJECT_DIR$/data/content.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/jsconfig.json" beforeDir="false" afterPath="$PROJECT_DIR$/jsconfig.json" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/public/images/logo.svg" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/public/images/machine-35-base.svg" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/public/images/machine-35-white.svg" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/public/images/machine-48-base.svg" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/public/images/machine-48-white.svg" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/public/images/machine-60-base.svg" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/public/images/machine-60-white.svg" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/public/images/snacks/chips-1.svg" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/public/images/snacks/chips-2.svg" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/public/images/snacks/soda-1.svg" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/public/images/snacks/soda-2.svg" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/context/LanguageContext.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/app/context/LanguageContext.jsx" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/context/ThemeContext.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/app/context/ThemeContext.jsx" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/layout.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/app/layout.jsx" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/providers.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/app/providers.jsx" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/components/HorizontalShowcase.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/components/HorizontalShowcase.jsx" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/public/images/machine-slide-0.png" beforeDir="false" afterPath="$PROJECT_DIR$/public/images/machine-slide-0.png" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/public/images/machine-slide-1.png" beforeDir="false" afterPath="$PROJECT_DIR$/public/images/machine-slide-1.png" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/public/video/company-intro-placeholder.mp4" beforeDir="false" afterPath="$PROJECT_DIR$/public/video/company-intro-placeholder.mp4" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/public/video/showcase-placeholder.mp4" beforeDir="false" afterPath="$PROJECT_DIR$/public/video/showcase-placeholder.mp4" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@@ -51,6 +44,7 @@
|
||||
"RunOnceActivity.typescript.service.memoryLimit.init": "true",
|
||||
"codeWithMe.voiceChat.enabledByDefault": "false",
|
||||
"git-widget-placeholder": "main",
|
||||
"javascript.preferred.runtime.type.id": "node",
|
||||
"js.debugger.nextJs.config.created.client": "true",
|
||||
"js.debugger.nextJs.config.created.server": "true",
|
||||
"last_opened_file_path": "D:/Project/GitHubRepo/robot-market-landing",
|
||||
@@ -99,7 +93,7 @@
|
||||
<workItem from="1785583486761" duration="9000" />
|
||||
<workItem from="1785583517424" duration="145000" />
|
||||
<workItem from="1785645096071" duration="26000" />
|
||||
<workItem from="1785646314677" duration="10534000" />
|
||||
<workItem from="1785646314677" duration="16547000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="update">
|
||||
<option name="closed" value="true" />
|
||||
@@ -141,7 +135,23 @@
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1785646373594</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="6" />
|
||||
<task id="LOCAL-00006" summary="update">
|
||||
<option name="closed" value="true" />
|
||||
<created>1785661529816</created>
|
||||
<option name="number" value="00006" />
|
||||
<option name="presentableId" value="LOCAL-00006" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1785661529816</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00007" summary="update">
|
||||
<option name="closed" value="true" />
|
||||
<created>1785661545228</created>
|
||||
<option name="number" value="00007" />
|
||||
<option name="presentableId" value="LOCAL-00007" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1785661545228</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="8" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
'use client';
|
||||
|
||||
// context زبان سایت: نگهداری زبان فعلی (fa/en)، ذخیره در localStorage، و تنظیم جهت صفحه (rtl/ltr).
|
||||
|
||||
import {createContext, useContext, useEffect, useState} from 'react';
|
||||
import {content} from '@/data/content';
|
||||
|
||||
@@ -5,14 +5,11 @@ import { createContext, useContext, useEffect, useState } from 'react';
|
||||
const ThemeContext = createContext(null);
|
||||
|
||||
export function ThemeProvider({children}) {
|
||||
// پیشفرض سایت حالا «روشن» (light) است. اگر کاربر قبلاً تم را عوض کرده باشد
|
||||
// (ذخیرهشده در localStorage) همان ترجیح رو حفظ میکنیم؛ در غیر این صورت فقط
|
||||
// اگر سیستم کاربر صراحتاً روی حالت تیره تنظیم شده باشد، تیره را انتخاب میکنیم.
|
||||
|
||||
const [theme, setTheme] = useState('light');
|
||||
const [mounted, setMounted] = useState(false);
|
||||
|
||||
// On mount: read saved preference, else fall back to system preference
|
||||
// (but default stays light unless the OS explicitly prefers dark).
|
||||
|
||||
useEffect(() => {
|
||||
const saved = window.localStorage.getItem('rm-theme');
|
||||
if (saved === 'light' || saved === 'dark') {
|
||||
@@ -23,7 +20,7 @@ export function ThemeProvider({ children }) {
|
||||
setMounted(true);
|
||||
}, []);
|
||||
|
||||
// Reflect theme on <html> class + persist.
|
||||
|
||||
useEffect(() => {
|
||||
const root = document.documentElement;
|
||||
root.classList.remove('light', 'dark');
|
||||
|
||||
+1
-4
@@ -15,10 +15,7 @@ export const metadata = {
|
||||
};
|
||||
|
||||
export default function RootLayout({children}) {
|
||||
// پوسته پیشفرض سمت سرور: فارسی + حالت روشن (Light).
|
||||
// ThemeProvider/LanguageProvider بعد از mount شدن، اگر کاربر قبلاً تم/زبان
|
||||
// دیگری را انتخاب کرده بود (ذخیرهشده در localStorage)، آن را روی <html> اعمال
|
||||
// میکنند؛ suppressHydrationWarning جلوی هشدار بیضرر عدمتطابق را میگیرد.
|
||||
|
||||
return (
|
||||
<html lang="fa" dir="rtl" className={`${vazirmatn.variable} light`} suppressHydrationWarning>
|
||||
<body className="bg-page text-primary antialiased transition-colors duration-300">
|
||||
|
||||
@@ -115,10 +115,12 @@ export default function HorizontalShowcase() {
|
||||
>
|
||||
{quickViewMachine && (
|
||||
<div className="flex flex-col gap-4">
|
||||
<img src={quickViewMachine.image} alt={quickViewMachine.name} className="w-full h-64 object-contain" />
|
||||
<img src={quickViewMachine.image} alt={quickViewMachine.name}
|
||||
className="w-full h-64 object-contain"/>
|
||||
<p className="text-secondary leading-7">{quickViewMachine.description}</p>
|
||||
<p className="text-xl font-bold text-primary">{quickViewMachine.priceLabel}</p>
|
||||
<Button type="primary" size="large" icon={<ShoppingCartOutlined />} onClick={handleModalAddToCart}>
|
||||
<Button type="primary" size="large" icon={<ShoppingCartOutlined/>}
|
||||
onClick={handleModalAddToCart}>
|
||||
{t.machineActions.addToCart}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.7 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.7 MiB After Width: | Height: | Size: 290 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.0 MiB |
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user