diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index 02c2006..7749ee7 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -40,7 +40,8 @@ "staffSection": { "title": "Active members of the Persian Flutter community", "description": "In this section, you will get to know the individuals who are the driving force behind the Persian Flutter community with their efforts and enthusiasm. These active members, with various specialties, play key roles in advancing our community's goals and growth. From managing social media to organizing events, each of these individuals has an important role in the dynamism and progress of the Persian Flutter ecosystem.", - "descriptionShort": "In this section, you will get to know the individuals who are the driving force behind the Persian Flutter community with their efforts and enthusiasm. These active members, with various specialties, play key roles in advancing our community's goals and growth." + "descriptionShort": "In this section, you will get to know the individuals who are the driving force behind the Persian Flutter community with their efforts and enthusiasm. These active members, with various specialties, play key roles in advancing our community's goals and growth.", + "viewButton": "View All" }, "comments": [], "donation": { diff --git a/public/locales/fa/translation.json b/public/locales/fa/translation.json index 2da4956..1e18018 100644 --- a/public/locales/fa/translation.json +++ b/public/locales/fa/translation.json @@ -40,7 +40,8 @@ "staffSection": { "title": "اعضای فعال جامعه فلاتر فارسی", "description": " در این بخش با افرادی آشنا می‌شوید که با تلاش و اشتیاق خود، موتور محرکه جامعه فلاتر فارسی هستند. این اعضای فعال با تخصص‌های گوناگون، نقش‌های کلیدی در پیشبرد اهداف و رشد جامعه ما ایفا می‌کنند. از مدیریت رسانه‌های اجتماعی تا برگزاری رویدادها، هر یک از این افراد سهم مهمی در پویایی و پیشرفت اکوسیستم فلاتر فارسی دارند. ", - "descriptionShort": " در این بخش با افرادی آشنا می‌شوید که با تلاش و اشتیاق خود، موتور محرکه جامعه فلاتر فارسی هستند. این اعضای فعال با تخصص‌های گوناگون، نقش‌های کلیدی در پیشبرد اهداف و رشد جامعه ما ایفا می‌کنند. " + "descriptionShort": " در این بخش با افرادی آشنا می‌شوید که با تلاش و اشتیاق خود، موتور محرکه جامعه فلاتر فارسی هستند. این اعضای فعال با تخصص‌های گوناگون، نقش‌های کلیدی در پیشبرد اهداف و رشد جامعه ما ایفا می‌کنند. ", + "viewButton": "مشاهده همه" }, "comments": [], "donation": { diff --git a/src/assets/images/avatar/sample-avatar-1.png b/src/assets/images/avatar/sample-avatar-1.png deleted file mode 100644 index 8339651..0000000 Binary files a/src/assets/images/avatar/sample-avatar-1.png and /dev/null differ diff --git a/src/assets/images/avatar/sample-avatar-2.png b/src/assets/images/avatar/sample-avatar-2.png deleted file mode 100644 index 8c47bd3..0000000 Binary files a/src/assets/images/avatar/sample-avatar-2.png and /dev/null differ diff --git a/src/assets/images/avatar/sample-avatar-3.png b/src/assets/images/avatar/sample-avatar-3.png deleted file mode 100644 index 304b7c1..0000000 Binary files a/src/assets/images/avatar/sample-avatar-3.png and /dev/null differ diff --git a/src/assets/images/avatar/sample-avatar-4.png b/src/assets/images/avatar/sample-avatar-4.png deleted file mode 100644 index cd4c4e3..0000000 Binary files a/src/assets/images/avatar/sample-avatar-4.png and /dev/null differ diff --git a/src/assets/images/bigImage.png b/src/assets/images/bigImage.png deleted file mode 100644 index 3b2f318..0000000 Binary files a/src/assets/images/bigImage.png and /dev/null differ diff --git a/src/components/widgets/StaffCard.astro b/src/components/widgets/StaffCard.astro index b390be8..f5e9d03 100644 --- a/src/components/widgets/StaffCard.astro +++ b/src/components/widgets/StaffCard.astro @@ -25,14 +25,16 @@ const data = member.data; >
- {data.name +
+ {data.name +
diff --git a/src/components/widgets/StaffSection.astro b/src/components/widgets/StaffSection.astro index 8689e17..e2b651f 100644 --- a/src/components/widgets/StaffSection.astro +++ b/src/components/widgets/StaffSection.astro @@ -36,6 +36,21 @@ const translations = i18n.t();
{effectiveMembers.map((member) => )}
+ + + {translations.home.staffSection.viewButton} +
diff --git a/src/content/config.ts b/src/content/config.ts index 1e536bc..0116cb6 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -73,27 +73,28 @@ const topicCollection = defineCollection({ const memberCollection = defineCollection({ type: 'content', - schema: z.object({ - name: z.string().min(1, { message: 'Name is required' }), - family: z.string().min(1, { message: 'Family name is required' }), - title: z.string().min(1, { message: 'Title is required' }), - image: z.string().min(1, { message: 'Image path is required' }), - description: z - .string() - .min(10, { message: 'Description must be at least 10 characters' }) - .max(200, { message: 'Description must not exceed 200 characters' }), - topics: z.array(reference('topic')).min(1, { message: 'Member must have at least one topic' }), - social: z - .object({ - twitter: z.string().url().optional(), - linkedin: z.string().url().optional(), - github: z.string().url().optional(), - telegram: z.string().url().optional(), - website: z.string().url().optional(), - }) - .optional(), - metadata: metadataDefinition(), - }), + schema: ({ image }) => + z.object({ + name: z.string().min(1, { message: 'Name is required' }), + family: z.string().min(1, { message: 'Family name is required' }), + title: z.string().min(1, { message: 'Title is required' }), + image: image(), + description: z + .string() + .min(10, { message: 'Description must be at least 10 characters' }) + .max(200, { message: 'Description must not exceed 200 characters' }), + topics: z.array(reference('topic')).min(1, { message: 'Member must have at least one topic' }), + social: z + .object({ + twitter: z.string().url().optional(), + linkedin: z.string().url().optional(), + github: z.string().url().optional(), + telegram: z.string().url().optional(), + website: z.string().url().optional(), + }) + .optional(), + metadata: metadataDefinition(), + }), }); export const collections = { diff --git a/src/content/member/en/abolfazlirani.md b/src/content/member/en/abolfazlirani.md index c6a0efa..f867e81 100644 --- a/src/content/member/en/abolfazlirani.md +++ b/src/content/member/en/abolfazlirani.md @@ -2,7 +2,7 @@ name: 'Abolfazl' family: 'Irani' title: 'Programmer and Designer' -image: '/src/assets/images/avatar/sample-avatar-1.png' #'/images/members/amir.jpg' +image: './../images/abolfazlirani.jpg' description: 'Abolfazl is a mobile programmer who used to be a UI designer and has always tried to publish great apps.' topics: - collection: 'topic' diff --git a/src/content/member/en/payamzahedi.md b/src/content/member/en/payamzahedi95.md similarity index 69% rename from src/content/member/en/payamzahedi.md rename to src/content/member/en/payamzahedi95.md index af27924..2d10854 100644 --- a/src/content/member/en/payamzahedi.md +++ b/src/content/member/en/payamzahedi95.md @@ -1,18 +1,18 @@ --- -name: Payam -family: Zahedi -title: Software Engineer -image: '/src/assets/images/avatar/sample-avatar-4.png' #/images/members/amir.jpg -description: Payam is one of the co-founders of Flutter Persian and actively contributes to our open-source projects. He plays a key role in managing tasks and ensuring everything runs smoothly and efficiently! 🚀 +name: 'Payam' +family: 'Zahedi' +title: 'Software Engineer' +image: './../images/payamzahedi95.jpg' +description: 'Payam is one of the co-founders of Flutter Persian and actively contributes to our open-source projects. He plays a key role in managing tasks and ensuring everything runs smoothly and efficiently! 🚀' topics: - collection: 'topic' slug: 'en/open-source' social: - website: https://payamzahedi.com/ - github: https://github.com/payam-zahedi/ - linkedin: https://linkedin.com/in/payamzahedi95/ - twitter: https://x.com/payamzahedi95/ - telegram: https://t.me/payamzahedi95/ + website: 'https://payamzahedi.com/' + github: 'https://github.com/payam-zahedi/' + linkedin: 'https://linkedin.com/in/payamzahedi95/' + twitter: 'https://x.com/payamzahedi95/' + telegram: 'https://t.me/payamzahedi95/' --- # Hi, I'm Payam Zahedi diff --git a/src/content/member/fa/abolfazlirani.md b/src/content/member/fa/abolfazlirani.md index 629d10f..d5a8dea 100644 --- a/src/content/member/fa/abolfazlirani.md +++ b/src/content/member/fa/abolfazlirani.md @@ -2,7 +2,7 @@ name: 'ابوالفضل' family: 'ایرانی' title: 'برنامه‌نویس و طراح' -image: '/src/assets/images/avatar/sample-avatar-1.png' #'/images/members/amir.jpg' +image: './../images/abolfazlirani.jpg' description: 'ابوالفضل یه برنامه‌نویس موبایله که در گذشتش طراح رابط کاربریم بوده و همیشه سعی کرده اپلیکیشن‌های خوبی رو منتشر کنه.' topics: - collection: 'topic' diff --git a/src/content/member/fa/payamzahedi.md b/src/content/member/fa/payamzahedi95.md similarity index 74% rename from src/content/member/fa/payamzahedi.md rename to src/content/member/fa/payamzahedi95.md index 9e266a5..d9982ea 100644 --- a/src/content/member/fa/payamzahedi.md +++ b/src/content/member/fa/payamzahedi95.md @@ -1,18 +1,18 @@ --- -name: پیام -family: زاهدی -title: مهندس نرم افزار -image: '/src/assets/images/avatar/sample-avatar-4.png' #/images/members/amir.jpg -description: پیام، یکی از پایه‌گذارای فلاتر فارسیه و الان تو بخش پروژه‌های متن‌باز بهمون کمک می‌کنه و مدیریت کارا رو بر عهده داره. کلی حمایت می‌کنه که کارا بهتر و قوی‌تر پیش برن! 🚀 +name: 'پیام' +family: 'زاهدی' +title: 'مهندس نرم افزار' +image: './../images/payamzahedi95.jpg' +description: 'پیام، یکی از پایه‌گذارای فلاتر فارسیه و الان تو بخش پروژه‌های متن‌باز بهمون کمک می‌کنه و مدیریت کارا رو بر عهده داره. کلی حمایت می‌کنه که کارا بهتر و قوی‌تر پیش برن! 🚀' topics: - collection: 'topic' slug: 'fa/open-source' social: - website: https://payamzahedi.com/ - github: https://github.com/payam-zahedi/ - linkedin: https://linkedin.com/in/payamzahedi95/ - twitter: https://x.com/payamzahedi95/ - telegram: https://t.me/payamzahedi95/ + website: 'https://payamzahedi.com/' + github: 'https://github.com/payam-zahedi/' + linkedin: 'https://linkedin.com/in/payamzahedi95/' + twitter: 'https://x.com/payamzahedi95/' + telegram: 'https://t.me/payamzahedi95/' --- # سلام، من پیام زاهدی هستم diff --git a/src/content/member/images/abolfazlirani.jpg b/src/content/member/images/abolfazlirani.jpg new file mode 100644 index 0000000..ce90493 Binary files /dev/null and b/src/content/member/images/abolfazlirani.jpg differ diff --git a/src/content/member/images/payamzahedi95.jpg b/src/content/member/images/payamzahedi95.jpg new file mode 100644 index 0000000..f7ace3e Binary files /dev/null and b/src/content/member/images/payamzahedi95.jpg differ diff --git a/src/layouts/PageLayout.astro b/src/layouts/PageLayout.astro index 836be84..ba9445b 100644 --- a/src/layouts/PageLayout.astro +++ b/src/layouts/PageLayout.astro @@ -11,14 +11,18 @@ const translations = i18n.t(); export interface Props { metadata?: MetaData; } - const { metadata } = Astro.props; ---
-
+
diff --git a/src/navigation.ts b/src/navigation.ts index 4db330a..0a068d8 100644 --- a/src/navigation.ts +++ b/src/navigation.ts @@ -1,3 +1,4 @@ +import { getRelativeLocaleUrl } from 'astro:i18n'; import type { TranslationValues } from './utils/i18n'; import { getPermalink, getAsset } from './utils/permalinks'; import type { CallToAction } from '~/types'; @@ -34,7 +35,7 @@ export const socialData = { // We need to pass translation function to this function -export function headerData(translation: TranslationValues) { +export function headerData(locale: string, translation: TranslationValues) { return { links: [ { @@ -51,7 +52,7 @@ export function headerData(translation: TranslationValues) { }, { text: translation.header.menu.team, - href: '/members', + href: getRelativeLocaleUrl(locale, '/members'), }, ], actions: [ diff --git a/src/pages/en/members/[slug].astro b/src/pages/en/members/[slug].astro index 0ef384d..623c6d8 100644 --- a/src/pages/en/members/[slug].astro +++ b/src/pages/en/members/[slug].astro @@ -2,15 +2,10 @@ import { Image } from 'astro:assets'; import MembersLayout from '~/layouts/MembersLayout.astro'; import i18n from '~/utils/i18n'; -import bigImage from '~/assets/images/bigImage.png'; import { Icon } from 'astro-icon/components'; import { getCollection } from 'astro:content'; import MemberProse from '~/components/widgets/MemberProse.astro'; -const { member } = Astro.props; -const data = member.data; -const { Content } = await member.render(); - export async function getStaticPaths() { const members = await getCollection('member'); @@ -32,6 +27,10 @@ export async function getStaticPaths() { }); } +const { member } = Astro.props; +const data = member.data; +const { Content } = await member.render(); + const socialIcons = { website: 'tabler:world', github: 'tabler:brand-github', @@ -51,8 +50,9 @@ i18n.setLang(Astro.currentLocale);
picture
picture