diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 9713eda..0000000 --- a/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM node:20.10.0 - -WORKDIR /app -COPY . . - -RUN npm install --force -RUN npm run build - -EXPOSE 6080 - -CMD ["npm", "run", "start"] diff --git a/components/Footer.jsx b/components/Footer.jsx index 4a08441..4a1a721 100644 --- a/components/Footer.jsx +++ b/components/Footer.jsx @@ -13,6 +13,7 @@ export function Footer() { {t('navigation.features')} {t('navigation.download')} {t('navigation.community')} + {t('navigation.join')} {t('navigation.blog')} {t('navigation.team')} {t('footer.privacyPolicy')} diff --git a/data/community.js b/data/community.js new file mode 100644 index 0000000..3bed1f7 --- /dev/null +++ b/data/community.js @@ -0,0 +1,58 @@ +const category = { + develop: { + en: 'Develop', + fa: 'توسعه' + }, + communication: { + en: 'Communication', + fa: 'ارتباطات' + }, + multimedia: { + en: 'Multimedia', + fa: 'چندرسانه‌ای' + }, +} + +const communityData = { + categories: Object.values(category), + apps: [ + { + name: { + en: 'Neovim', + fa: 'نئوویم', + }, + desc: { + en: 'Powerful and extendable text editor', + fa: 'ویرایشگر متن قدرتمند و قابل تمدید', + }, + cat: category.develop, + href: '#' + }, + { + name: { + en: 'Discord', + fa: 'دیسکورد', + }, + desc: { + en: 'Voice & text chat application', + fa: 'اپلیکیشن چت صوتی و متنی', + }, + cat: category.communication, + href: '#' + }, + { + name: { + en: 'OBS Studio', + fa: 'OBS استودیو', + }, + desc: { + en: 'Screen recorder and streaming software', + fa: 'نرم‌افزار ضبط صفحه نمایش و پخش زنده', + }, + cat: category.multimedia, + href: '#' + }, + ] +} + +export default communityData; diff --git a/i18n/en.js b/i18n/en.js index 253cb2f..e92b6e6 100644 --- a/i18n/en.js +++ b/i18n/en.js @@ -17,6 +17,7 @@ export default { navigation: { blog: 'Blog', community: 'Community', + join: 'Join', download: 'Download', features: 'Features', team: 'Team', @@ -34,6 +35,11 @@ export default { }, community: { + title: 'Parch Linux Community Software', + search: 'Search apps...' + }, + + join: { title: 'Join Our Community', caption: { forum: 'Forums', diff --git a/i18n/fa.js b/i18n/fa.js index a4cf57e..e7634bf 100644 --- a/i18n/fa.js +++ b/i18n/fa.js @@ -17,6 +17,7 @@ export default { navigation: { blog: 'بلاگ', community: 'جامعه', + join: 'پیوستن', download: 'دانلود', features: 'امکانات', team: 'تیم', @@ -34,6 +35,12 @@ export default { }, community: { + title: 'برنامه‌های جامعه پارچ لینوکس', + search: 'جستجوی برنامه‌ها...' + }, + + + join: { title: 'به جامعهٔ ما بپیوندید', caption: { forum: 'فروم', diff --git a/pages/community.jsx b/pages/community.jsx index ab7a073..c28270b 100644 --- a/pages/community.jsx +++ b/pages/community.jsx @@ -1,65 +1,52 @@ -import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" -import { useTranslation } from "@/utils/translation" -import { Users, Book, MessageCircle, Code, ArrowLeftCircle, ArrowRightCircle } from 'lucide-react' -import { Button } from "@/components/ui/button" -import Link from "next/link" -import { SiBluesky, SiDiscord, SiMastodon, SiTelegram, SiX } from "@icons-pack/react-simple-icons"; +import { Button } from "@/components/ui/button"; +import { Card, CardHeader } from "@/components/ui/card"; +import { SiGitlab } from "@icons-pack/react-simple-icons"; +import { useTranslation } from "@/utils/translation"; -const CommunityCard = ({ icon: Icon, caption, link, text, url, arrow: Arrow }) => ( - - -
- - - {caption} - - -
-
- {text} -
-) +import communityData from "@/data/community"; +import { useCallback, useEffect, useState } from "react"; export default function Community() { const { t, lang } = useTranslation(); + const [apps, setApps] = useState(communityData.apps); - const arrow = lang == 'fa' ? ArrowLeftCircle : ArrowRightCircle + const search = q => { + setApps(communityData.apps.filter(app => JSON.stringify(app).toLowerCase().includes(q))) + } return (
-

{t('community.title')}

-
- - - - +

+ {t("community.title")} +

+
+ search(e.target.value.trim().toLowerCase())} /> +
+
+ {apps.map(app => ( + + +
+
+

{app.name[lang]}

+

{app.desc[lang]}

+

{app.cat[lang]}

+
+
+ +
+
+
+
+ ))}
diff --git a/pages/join.jsx b/pages/join.jsx new file mode 100644 index 0000000..4c5d2cb --- /dev/null +++ b/pages/join.jsx @@ -0,0 +1,67 @@ +import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" +import { useTranslation } from "@/utils/translation" +import { Users, Book, MessageCircle, Code, ArrowLeftCircle, ArrowRightCircle } from 'lucide-react' +import { Button } from "@/components/ui/button" +import Link from "next/link" +import { SiBluesky, SiDiscord, SiMastodon, SiTelegram, SiX } from "@icons-pack/react-simple-icons"; + +const JoinCard = ({ icon: Icon, caption, link, text, url, arrow: Arrow }) => ( + + +
+ + + {caption} + + +
+
+ {text} +
+) + +export default function Join() { + const { t, lang } = useTranslation(); + + const arrow = lang == 'fa' ? ArrowLeftCircle : ArrowRightCircle + + return ( +
+
+

{t('join.title')}

+
+ + + + +
+
+
+ ) +}