diff --git a/messages/fa.json b/messages/fa.json new file mode 100644 index 0000000..24e9065 --- /dev/null +++ b/messages/fa.json @@ -0,0 +1,4 @@ +{ + "loading": "درحال دریافت داده", + "error_fetch_data": "مشکلی در دریافت داده رخ داده است." +} diff --git a/next.config.ts b/next.config.ts new file mode 100644 index 0000000..9027e79 --- /dev/null +++ b/next.config.ts @@ -0,0 +1,25 @@ +// next.config.ts +import type { NextConfig } from "next"; +import createNextIntlPlugin from "next-intl/plugin"; + +// @ts-ignore – no types for next-pwa +const withPWA = require("next-pwa")({ + dest: "public", + disable: process.env.NODE_ENV === "development", + register: true, + skipWaiting: true, + navigateFallback: "/offline.html", // fallback page +}); + +const withNextIntl = createNextIntlPlugin(); + +const nextConfig: NextConfig = { + // output : "standalone", + images: { + remotePatterns: [], + }, +}; + +const configWithIntl = withNextIntl(nextConfig); + +export default withPWA(configWithIntl); diff --git a/public/logo/144px.png b/public/logo/144px.png new file mode 100644 index 0000000..dbaf7a0 Binary files /dev/null and b/public/logo/144px.png differ diff --git a/public/logo/152px.png b/public/logo/152px.png new file mode 100644 index 0000000..0b03d70 Binary files /dev/null and b/public/logo/152px.png differ diff --git a/public/logo/192px.png b/public/logo/192px.png new file mode 100644 index 0000000..61e8a30 Binary files /dev/null and b/public/logo/192px.png differ diff --git a/public/logo/384px.png b/public/logo/384px.png new file mode 100644 index 0000000..d99e54b Binary files /dev/null and b/public/logo/384px.png differ diff --git a/public/logo/512px.png b/public/logo/512px.png new file mode 100644 index 0000000..065df8b Binary files /dev/null and b/public/logo/512px.png differ diff --git a/public/manifest.json b/public/manifest.json new file mode 100644 index 0000000..426125a --- /dev/null +++ b/public/manifest.json @@ -0,0 +1,38 @@ +{ + "id": "/", + "name": "Theater of dreams", + "short_name": "Theater of dreams", + "description": "Theater of dreams", + "start_url": "/", + "display": "standalone", + "orientation": "portrait", + "theme_color": "#283618", + "background_color": "#ffffff", + "icons": [ + { + "src": "logo/144px.png", + "sizes": "144x144", + "type": "image/png" + }, + { + "src": "logo/152px.png", + "sizes": "152x152", + "type": "image/png" + }, + { + "src": "logo/192px.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "logo/384px.png", + "sizes": "384x384", + "type": "image/png" + }, + { + "src": "logo/512px.png", + "sizes": "512x512", + "type": "image/png" + } + ] +} diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 897d898..e06c8d3 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,12 +1,35 @@ import { ClientAppProvider } from "@/providers/ClientAppProvider"; import "@/styles/globals.css"; import type { Metadata } from "next"; +import { getLocale, getMessages } from "next-intl/server"; +import { NextIntlClientProvider } from "next-intl"; export const metadata: Metadata = { - title: "Theater of dreams", + title: { + template: "%s | Theater of dreams", + default: "Theater of dreams", + }, + description: "Theater of dreams", + authors: { + name: "شرکت دانش بنیان ویرا ارتباطات یکتا تلفن (وایتل)", + url: "https://witel.ir", + }, + + manifest: "/manifest.json", + icons: { + icon: "/logo/192px.png", + apple: "/logo/512px.png", + }, +}; +export const viewport = { + width: "device-width", + initialScale: 1, + maximumScale: 1, }; -export default function RootLayout({ children }: { children: React.ReactNode }) { +export default async function RootLayout({ children }: { children: React.ReactNode }) { + const locale = await getLocale(); + const messages = await getMessages({ locale }); return (
@@ -27,7 +50,9 @@ export default function RootLayout({ children }: { children: React.ReactNode }) -متاسفانه صفحهای مورد نظر وجود ندارد.
+ + {/* دکمه بازگشت با استفاده از کامپوننت Link */} + + بازگشت به صفحه اصلی + +