From 09d18e8cbd66cd6287602dda192384f4db9456e4 Mon Sep 17 00:00:00 2001 From: luojiyin Date: Tue, 6 Aug 2024 00:02:16 +0800 Subject: [PATCH 1/9] save --- components/PersonCard.tsx | 45 +++++ components/SectionTitle.tsx | 19 +++ components/data.ts | 4 + pages/api/city.ts | 317 ++++++++++++++++++++++++++++++++++++ pages/volunteer.tsx | 54 ++++++ 5 files changed, 439 insertions(+) create mode 100644 components/PersonCard.tsx create mode 100644 components/SectionTitle.tsx create mode 100644 pages/api/city.ts create mode 100644 pages/volunteer.tsx diff --git a/components/PersonCard.tsx b/components/PersonCard.tsx new file mode 100644 index 0000000..57a0fac --- /dev/null +++ b/components/PersonCard.tsx @@ -0,0 +1,45 @@ +import { FC } from 'react'; +import { Badge, Card, Col } from 'react-bootstrap'; + +export type PersonCardProps = { + avatar: string; + name: string; + link?: string; + position?: string; + count?: number; +}; + +export const PersonCard: FC = ({ + avatar, + name, + link, + position, + count, +}) => ( + + + {count != null && ( + + {count} + + )} + + + + {name} + + {position} + + + +); diff --git a/components/SectionTitle.tsx b/components/SectionTitle.tsx new file mode 100644 index 0000000..a7e0d92 --- /dev/null +++ b/components/SectionTitle.tsx @@ -0,0 +1,19 @@ +import { FC, HTMLAttributes, PropsWithChildren } from 'react'; +import { Badge } from 'react-bootstrap'; + +export type SectionTitleProps = PropsWithChildren< + HTMLAttributes & { count?: number } +>; + +export const SectionTitle: FC = ({ + className = '', + count, + children, +}) => ( +

+ {children} + + {count} + +

+); diff --git a/components/data.ts b/components/data.ts index 4e0d0be..ccaa5f0 100644 --- a/components/data.ts +++ b/components/data.ts @@ -31,4 +31,8 @@ export const MainRoutes: () => Link[] = () => [ title: t('source_code'), path: 'https://github.com/kaiyuanshe/OSS-toolbox', }, + { + title: 'volunteer', + path: '/volunteer', + }, ]; diff --git a/pages/api/city.ts b/pages/api/city.ts new file mode 100644 index 0000000..8aa76b0 --- /dev/null +++ b/pages/api/city.ts @@ -0,0 +1,317 @@ +export interface Person { + name?: string; + pic: string; + link?: string; +} + +export interface CityCommunityMeta + extends Partial< + Record<'banner' | 'website' | 'wechat' | 'weibo' | 'github', string> & + Record<'organizers' | 'speakers' | 'partners', Person[]> + > { + name: string; + brief?: string[]; +} + +export const chengdu: CityCommunityMeta = { + name: '成都', + banner: 'chengdu.png', + website: 'https://fcc-cd.dev/', + wechat: 'gh_b8b06d05cfa6', + weibo: 'https://weibo.com/u/6165665516?is_all=1', + github: 'https://github.com/FreeCodeCamp-Chengdu', + brief: [ + 'freeCodeCamp 成都社区到目前为止已有社区组织成员:姜玉珍、袁民成、石垚、王波、刘博、余琦、陈小山、曾昌强、尹婷、王杰、刘南宾、蔡婷、陈灿彬、李宁川、谢佳琦、魏朝欣、张小白、刘博、何青松共计19人。', + '成都社区主要活动有前端大会、黑客松、编程静修日、小的分享沙龙、技术专场活动、编程道场等,社区在每一个月都会输出相应的技术活动,社区秉承“为开发者服务”的理念,努力搭建一个友好的交流、学习、互助的平台,帮助开发者、技术爱好者提升个人技术能力,同时帮助当地企业解决人才问题。', + ], + speakers: [ + { name: 'Adieu', pic: 'Adieu.png' }, + { name: 'Ak', pic: 'Ak.png' }, + { name: 'Helen', pic: 'Helen.png' }, + { name: 'Steven Ou', pic: 'steven_Ou.png' }, + { name: '陈斌', pic: 'chenbin.png' }, + { name: '陈嘉', pic: 'chenjia.png' }, + { name: '陈津', pic: 'chenjin.png' }, + { name: '陈洋彬', pic: 'chenyangbin.png' }, + { name: '代波', pic: 'daibo.png' }, + { name: '董涛', pic: 'dongtao.png' }, + { name: '杜屹东', pic: 'duyidong.png' }, + { name: '范卿麟', pic: 'fanqinlin.png' }, + { name: '樊晓兵', pic: 'fanxiaobin.png' }, + { name: '郭洪伟', pic: 'guohongwei.png' }, + { name: '郭庆', pic: 'guoqing.png' }, + { name: '胡桓铭', pic: 'huhengming.png' }, + { name: '胡敏', pic: 'huming.png' }, + { name: '胡胜全', pic: 'hushengquan.png' }, + { name: '姜姜姜', pic: 'jiangjiang.png' }, + { name: '简念', pic: 'jiannian.png' }, + { name: '梁桐铭', pic: 'liangtongmin.png' }, + { name: '廖伟', pic: 'liaowei.png' }, + { name: '林水强', pic: 'linshuiqiang.png' }, + { name: '刘博', pic: 'liubo.png' }, + { name: '刘杰', pic: 'liujie.png' }, + { name: '刘洋河', pic: 'liuyanghe.png' }, + { name: '李万鹏', pic: 'liwanpeng.png' }, + { name: '龙佳文', pic: 'longjiawen.png' }, + { name: '卢林', pic: 'lulin.png' }, + { name: '吕靖', pic: 'lvjing.png' }, + { name: '吕彦', pic: 'lvyan.png' }, + { name: '毛玉峰', pic: 'maoyufeng.png' }, + { name: '潘越', pic: 'panyue.png' }, + { name: '钱晟龙', pic: 'qianshenglong.png' }, + { name: '卿粼波', pic: 'qinlinbo.png' }, + { name: '任远', pic: 'renyuan.png' }, + { name: '沈长锟', pic: 'shenchangkun.png' }, + { name: '水歌', pic: 'shuige.png' }, + { name: '苏龙', pic: 'sulong.png' }, + { name: '唐超', pic: 'tangchao.png' }, + { name: '田泱', pic: 'tianyang.png' }, + { name: '王蒙', pic: 'wangmeng.png' }, + { name: '闻其详', pic: 'wenqixiang.png' }, + { name: '吴浩麟', pic: 'wuhaolin.png' }, + { name: '徐孝增', pic: 'xuxiaozen.png' }, + { name: '杨鸿翼', pic: 'yanghongyi.png' }, + { name: '杨义天', pic: 'yangyitian.png' }, + { name: '叶小钗', pic: 'yexiaochai.png' }, + { name: '余泽江', pic: 'yuzejiang.png' }, + { name: '曾磊', pic: 'zenlei.png' }, + { name: '张瑞', pic: 'zhangrui.png' }, + { name: '张伟', pic: 'zhangwei.png' }, + { name: '赵芝明', pic: 'zhaozhiming.png' }, + ], + partners: [ + { pic: 'BBD.png', link: '' }, + { pic: 'baozun.png', link: 'http://www.baozun.com/' }, + { pic: 'coding.png', link: 'https://coding.net' }, + { pic: 'getui.png', link: 'https://www.getui.com' }, + { pic: 'jingrongguoji.png', link: '' }, + { pic: 'juejin.png', link: 'https://juejin.im' }, + { pic: 'shangxianle.png', link: 'https://www.sxl.cn/' }, + { pic: 'xiaoyang.png', link: '' }, + ], + organizers: [ + { name: '袁民成', pic: 'yuanmincheng.png', link: 'yuanmincheng' }, + { name: '姜玉珍', pic: 'jiangyuzhen.png', link: 'jiangyuzhen' }, + { name: '石垚', pic: 'shiyao.png', link: '' }, + { name: '何青松', pic: 'heqingsong.png', link: 'heqingsong' }, + { name: '张小白', pic: 'zhangxiaobai.png', link: '' }, + { name: '陈小山', pic: 'chenxiaoshan.png', link: '' }, + { name: '王波', pic: 'wangbo.png', link: '' }, + { name: '谢佳琦', pic: 'xiejiaqi.png', link: '' }, + { name: '余琦', pic: 'yuqi.png', link: '' }, + { name: '魏朝欣', pic: 'weichaoxin.png', link: '' }, + { name: '刘博', pic: 'liubo.png', link: '' }, + { name: '蓝浩', pic: 'lanhao.png', link: '' }, + { name: '尹婷', pic: 'yinting.png', link: '' }, + { name: '王杰', pic: 'wangjie.png', link: '' }, + { name: '蔡婷', pic: 'caiting.png', link: '' }, + { name: '陈灿彬', pic: 'chencanbin.png', link: '' }, + { name: '李宁川', pic: 'liningchuan.png', link: '' }, + { name: '刘南宾', pic: 'liunanbin.png', link: '' }, + { name: '冯博', pic: 'fengbo.png', link: '' }, + { name: '林东闻', pic: 'lindongwen.png', link: '' }, + { name: '刘倩玉', pic: 'qianyu.png', link: '' }, + { name: '王东', pic: 'wangdong.png', link: '' }, + { name: '曾昌强', pic: 'zengchangqiang.png', link: '' }, + { name: '郑梦雨', pic: 'zhengmengyu.png', link: '' }, + ], +}; + +export const chongqing: CityCommunityMeta = { + name: '重庆', + banner: 'chongqing.png', + website: 'https://freecodecamp-chongqing.github.io/', + wechat: '', + weibo: '', + github: 'https://github.com/FreeCodeCamp-Chongqing', + brief: [ + 'freeCodeCamp 重庆社区成立在第三届重庆前端交流大会上正式宣告成立,社区核心组织者有程江东,冯中梅,吴建军,满远荣,唐天强,张元英等,目前社区成员有120余人。', + 'freeCodeCamp 重庆社区成立第二天即举办了首次线下碰面会,快速确定了志愿者的分工形成自己独特的团队文化,并在中国国际智能产业博览会现场崭露头角,让更多人认识了freeCodeCamp,freeCodeCamp重庆社区链接人与技术,共创共赢,共建一个有爱有温度的技术社区。', + ], + speakers: [], + organizers: [ + { name: '冯中梅', pic: 'fengzhongmei.png', link: '' }, + { name: '刘东', pic: 'liudong.png', link: '' }, + { name: '满远荣', pic: 'manyuanrong.png', link: '' }, + { name: '唐友华', pic: 'tangyouhua.png', link: '' }, + { name: '朱晓鹏', pic: 'zhuxiaopeng.png', link: '' }, + ], + partners: [], +}; + +export const guangzhou: CityCommunityMeta = { + name: '广州', + banner: 'guangzhou.png', + website: 'https://freecodecamp-guangzhou.github.io/', + wechat: 'FCC_GuangZhou', + weibo: '', + github: 'https://github.com/FreeCodeCamp-Guangzhou', + brief: [ + 'freeCodeCamp 广州社区由梁彩仪发起,期间由程晓琳、吴亚楠接任,目前由伍裕平、梁莹接管负责全面对外接洽和组织活动,由伍裕平负责技术支持、梁莹负责对外合作和活动组织,线下社区成员共有480多人,并在不断增加中。', + '社区成立以来曾经组织过30多次活动,活动类型包括:结对编程、研bug会、技术分享会、技术沙龙。freeCodeCamp广州社区历届志愿者均致力于:用技术重新点亮广州这座千年老城。', + ], + organizers: [ + { name: '程晓琳', pic: 'chengxiaolin.png', link: '' }, + { name: '梁彩仪', pic: 'liangcaiyi.png', link: '' }, + { name: '吴亚楠', pic: 'wuyanan.png', link: '' }, + { name: '伍裕平', pic: 'wuyuping.png', link: '' }, + { name: 'Christy Leung 梁莹', pic: 'christyleung.png', link: '' }, + ], + speakers: [{ name: '魏朝欣', pic: 'weichaoxin.png', link: '' }], + partners: [], +}; + +export const hangzhou: CityCommunityMeta = { + name: '杭州', + banner: 'hangzhou.png', + website: 'https://fcchz.github.io/FCCHangZhou/', + wechat: 'TianXing_Community', + weibo: '', + github: 'https://github.com/FCCHZ', + brief: [], + speakers: [], + organizers: [ + { name: '陈杰', pic: 'chenjie.png', link: '' }, + { name: '黄金良', pic: 'huangjinliang.png', link: '' }, + { name: '李序锴', pic: 'lixukai.png', link: '' }, + ], + partners: [], +}; + +export const jinan: CityCommunityMeta = { + name: '济南', + banner: '', + website: '', + wechat: '', + weibo: '', + github: 'https://github.com/jinanfreeCodeCamp', + brief: [], + speakers: [], + organizers: [{ name: '王军', pic: 'wangjun.png', link: 'javascript;' }], + partners: [], +}; + +export const shanghai: CityCommunityMeta = { + name: '上海', + banner: 'shanghai.png', + website: 'https://freecodecamp-shanghai.github.io/', + wechat: 'FCCShangHai', + weibo: '', + github: 'https://github.com/FreeCodeCamp-Shanghai', + brief: [ + 'freeCodeCamp 上海社区拥有众多组织者,他们是:王皓、范弘琰、吴杨、潘娜娜、梁健、于益、陈天宇、唐小芳、龚雪薇、陶永。线下社区成员共有385人,并在不断增加之中。', + '社区成立以来共举办了3次30人左右的小型沙龙活动,以及2次100人左右的中型主题分享会,即freeCodeCamp上海四季分享会的夏季和秋季场。freeCodeCamp上海社区的目标是:为上海的互联网技术开发者提供一个可以进行交流的平台。', + ], + speakers: [], + organizers: [ + { name: '唐小芳', pic: 'tangxiaofang.png', link: '' }, + { name: '于航', pic: 'yuhang.png', link: '' }, + ], + partners: [], +}; + +export const shenzhen: CityCommunityMeta = { + name: '深圳', + banner: 'shenzhen.png', + website: 'https://freecodecamp-shenzhen.github.io/', + wechat: 'nixibuxisala', + weibo: '', + github: 'https://github.com/FreeCodeCamp-ShenZhen', + brief: [ + 'freeCodeCamp 深圳社区目前由陈志成和游首杰负责现阶段的整体运营工作。社区核心组织者有聂鹏程、钦潮、郑惠君、霍文艺、徐家俊等人。', + '社区成立以来共举办了10次100人左右的线下活动,以及3次大型主题分享会。从0到1,线下社区成员已有467人。深圳社区的主要目标和责任是做有趣有料的线下活动,目前深圳社区将会致力于发展 Coffee and Code 的形式,丰富线下编程学习的场景。', + ], + speakers: [], + organizers: [ + { name: '陈钦潮', pic: 'chenqinchao.png', link: '' }, + { name: '陈志成', pic: 'chenzhicheng.png', link: '' }, + { name: '游首杰', pic: 'youshoujie.png', link: '' }, + ], + partners: [], +}; + +export const tianjin: CityCommunityMeta = { + name: '天津', + banner: 'tianjin.png', + website: '', + wechat: '', + weibo: '', + github: '', + brief: [ + 'freeCodeCamp 天津社区现阶段拥有五名组织者:张烁、伊丽娜、刘柱、刘忆文、阚自强,和四名志愿者:宋佳欣、蔡文龙、付呈欣、王瑞。线下社区成员共323人。', + '社区成立以来共举办14次 Coffee and Code 活动和一次技术主题分享会。天津社区的目标和责任是:让天津的互联网技术氛围因有我的存在而有一点点不同。', + ], + speakers: [], + organizers: [ + { name: '阚自强', pic: 'kanziqiang.png', link: 'kanziqiang' }, + { name: '刘柱', pic: 'liuzhu.png', link: 'liuzhu' }, + { name: '伊丽娜', pic: 'yilina.png', link: 'yilina' }, + ], + partners: [], +}; + +export const wuhan: CityCommunityMeta = { + name: '武汉', + banner: 'wuhan.png', + website: '', + wechat: '', + weibo: '', + github: '', + brief: [ + 'freeCodeCamp 武汉社区目前由王川全面负责对外接洽、活动组织。社区核心志愿者有许志豪、王圣松等。线下社区成员有200余人,并在不断增加之中。', + '成立来,除了定期举办线下交流活动,给予大家的线下交流机会,线上也会带领大家参与诸如官网页面开发等实战项目。', + ], + speakers: [], + organizers: [ + { name: '王川', pic: 'wangchuan.png', link: '' }, + { name: '王圣松', pic: 'wangshengsong.png', link: '' }, + ], + partners: [], +}; + +export const xian: CityCommunityMeta = { + name: '西安', + banner: 'xian.png', + website: 'https://freecodecamp-xian.github.io/activity-network/', + wechat: 'gh_a964d2836db4', + weibo: '', + github: 'https://github.com/freeCodeCamp-XiAn', + brief: [ + 'freeCodeCamp 西安社区现阶段拥有多位组织者:张峰涛、薛开麒、罗铭、王晨宇、谷中仁、易海门,线下社区成员共计350余人。', + '在发起人韩亦乐的主导下,社区两年来已举办近十次线下技术交流活动和一场前端大会。freeCodeCamp西安社区将以开源、活动和招聘三大板块为发展重心,逐步搭建更完整的技术社区,服务更多的西安本土开发者、企业,努力让每一个社区成员能够在这里得到成长。', + ], + speakers: [], + organizers: [ + { name: '韩亦乐', pic: 'hanyile.png', link: '' }, + { name: '薛开麒', pic: 'xuekaiqi.png', link: '' }, + { name: '张峰涛', pic: 'zhangfengtao.png', link: '' }, + ], + partners: [], +}; + +export const zhengzhou: CityCommunityMeta = { + name: '郑州', + banner: 'zhengzhou.png', + website: 'https://freecodecamp-zhengzhou.github.io/', + wechat: '', + weibo: '', + github: 'https://github.com/FreeCodeCamp-Zhengzhou', + brief: [ + 'freeCodeCamp 郑州社区由石中玉发起并开始组织相关交流活动,核心组织成员有石中玉、徐启、张银龙。于2017年3月22日组织第一次线下沙龙,我们先后尝试了线上和线下分享相结合的方式来探索社区运营方式和思路。', + '我们致力于为热爱前端,热爱技术的小伙伴提供一个可以交流、学习的社群氛围,在让大家能力提升的同时,努力成为当地有温度的属于技术爱好者家门口的技术社区。', + ], + speakers: [], + organizers: [], + partners: [], +}; + +export const HongKong: CityCommunityMeta = { + name: '香港', + website: 'https://freecodecamphongkong.github.io/', + github: 'https://github.com/FreeCodeCampHongKong', +}; + +export const TaiWan: CityCommunityMeta = { + name: '台湾', + github: 'https://github.com/freeCodeCampTaiwan', +}; diff --git a/pages/volunteer.tsx b/pages/volunteer.tsx new file mode 100644 index 0000000..df63d24 --- /dev/null +++ b/pages/volunteer.tsx @@ -0,0 +1,54 @@ +import { Contributor } from 'mobx-github'; +import { InferGetServerSidePropsType } from 'next'; +import { cache, compose, errorLogger } from 'next-ssr-middleware'; +import { FC } from 'react'; +import { Container, Row } from 'react-bootstrap'; + +import { PageHead } from '../components/PageHead'; +import { PersonCard } from '../components/PersonCard'; +import { SectionTitle } from '../components/SectionTitle'; +import { repositoryStore } from '../models/Repository'; +import { i18n } from '../models/Translation'; +import * as cityData from './api/city'; + +export const getServerSideProps = compose(cache(), errorLogger, async () => { + const organizers = Object.values(cityData).flatMap( + ({ organizers }) => organizers || [], + ); + const contributors: Contributor[] = + // @ts-ignore + await new RepositoryModel().getAllContributors(); + + return { props: { organizers, contributors } }; +}); + +const Organizer: FC> = ({ + organizers, + contributors, +}) => ( + + +

志愿者

+ + 线上开源志愿者 + + {contributors.map(({ login, html_url, contributions }) => ( + + ))} + +
+); + +export default Organizer; From 2a4353b4b95aad89e02f4cdca33d6408a3c8f4e0 Mon Sep 17 00:00:00 2001 From: luojiyin Date: Tue, 6 Aug 2024 11:02:01 +0800 Subject: [PATCH 2/9] code clear --- pages/volunteer.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pages/volunteer.tsx b/pages/volunteer.tsx index df63d24..b811713 100644 --- a/pages/volunteer.tsx +++ b/pages/volunteer.tsx @@ -7,8 +7,7 @@ import { Container, Row } from 'react-bootstrap'; import { PageHead } from '../components/PageHead'; import { PersonCard } from '../components/PersonCard'; import { SectionTitle } from '../components/SectionTitle'; -import { repositoryStore } from '../models/Repository'; -import { i18n } from '../models/Translation'; +import { GitRepositoryModel } from '../models/Repository'; import * as cityData from './api/city'; export const getServerSideProps = compose(cache(), errorLogger, async () => { @@ -17,7 +16,7 @@ export const getServerSideProps = compose(cache(), errorLogger, async () => { ); const contributors: Contributor[] = // @ts-ignore - await new RepositoryModel().getAllContributors(); + await new GitRepositoryModel().getAllContributors(); return { props: { organizers, contributors } }; }); From 0ca3515a2f5977ea67f2e9d1de83b212c3f229e4 Mon Sep 17 00:00:00 2001 From: luojiyin Date: Tue, 6 Aug 2024 14:41:10 +0800 Subject: [PATCH 3/9] code clear --- pages/volunteer.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pages/volunteer.tsx b/pages/volunteer.tsx index b811713..96e6784 100644 --- a/pages/volunteer.tsx +++ b/pages/volunteer.tsx @@ -8,21 +8,16 @@ import { PageHead } from '../components/PageHead'; import { PersonCard } from '../components/PersonCard'; import { SectionTitle } from '../components/SectionTitle'; import { GitRepositoryModel } from '../models/Repository'; -import * as cityData from './api/city'; export const getServerSideProps = compose(cache(), errorLogger, async () => { - const organizers = Object.values(cityData).flatMap( - ({ organizers }) => organizers || [], - ); const contributors: Contributor[] = // @ts-ignore await new GitRepositoryModel().getAllContributors(); - return { props: { organizers, contributors } }; + return { props: { contributors } }; }); const Organizer: FC> = ({ - organizers, contributors, }) => ( From f1e54aa7dc8aa7632de3dd51c77341a1978226ec Mon Sep 17 00:00:00 2001 From: luojiyin Date: Tue, 6 Aug 2024 18:12:24 +0800 Subject: [PATCH 4/9] 401 error --- pages/volunteer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/volunteer.tsx b/pages/volunteer.tsx index 96e6784..b802421 100644 --- a/pages/volunteer.tsx +++ b/pages/volunteer.tsx @@ -7,12 +7,12 @@ import { Container, Row } from 'react-bootstrap'; import { PageHead } from '../components/PageHead'; import { PersonCard } from '../components/PersonCard'; import { SectionTitle } from '../components/SectionTitle'; -import { GitRepositoryModel } from '../models/Repository'; +import { repositoryStore } from '../models/Repository'; export const getServerSideProps = compose(cache(), errorLogger, async () => { const contributors: Contributor[] = // @ts-ignore - await new GitRepositoryModel().getAllContributors(); + await new repositoryStore('kaiyuanshe').getAllContributors(); return { props: { contributors } }; }); From 8d0d7e4a160ad94991d07df6ad359a44c5e0dcc9 Mon Sep 17 00:00:00 2001 From: luojiyin Date: Tue, 6 Aug 2024 18:13:23 +0800 Subject: [PATCH 5/9] rm no use data --- pages/api/city.ts | 317 ---------------------------------------------- 1 file changed, 317 deletions(-) delete mode 100644 pages/api/city.ts diff --git a/pages/api/city.ts b/pages/api/city.ts deleted file mode 100644 index 8aa76b0..0000000 --- a/pages/api/city.ts +++ /dev/null @@ -1,317 +0,0 @@ -export interface Person { - name?: string; - pic: string; - link?: string; -} - -export interface CityCommunityMeta - extends Partial< - Record<'banner' | 'website' | 'wechat' | 'weibo' | 'github', string> & - Record<'organizers' | 'speakers' | 'partners', Person[]> - > { - name: string; - brief?: string[]; -} - -export const chengdu: CityCommunityMeta = { - name: '成都', - banner: 'chengdu.png', - website: 'https://fcc-cd.dev/', - wechat: 'gh_b8b06d05cfa6', - weibo: 'https://weibo.com/u/6165665516?is_all=1', - github: 'https://github.com/FreeCodeCamp-Chengdu', - brief: [ - 'freeCodeCamp 成都社区到目前为止已有社区组织成员:姜玉珍、袁民成、石垚、王波、刘博、余琦、陈小山、曾昌强、尹婷、王杰、刘南宾、蔡婷、陈灿彬、李宁川、谢佳琦、魏朝欣、张小白、刘博、何青松共计19人。', - '成都社区主要活动有前端大会、黑客松、编程静修日、小的分享沙龙、技术专场活动、编程道场等,社区在每一个月都会输出相应的技术活动,社区秉承“为开发者服务”的理念,努力搭建一个友好的交流、学习、互助的平台,帮助开发者、技术爱好者提升个人技术能力,同时帮助当地企业解决人才问题。', - ], - speakers: [ - { name: 'Adieu', pic: 'Adieu.png' }, - { name: 'Ak', pic: 'Ak.png' }, - { name: 'Helen', pic: 'Helen.png' }, - { name: 'Steven Ou', pic: 'steven_Ou.png' }, - { name: '陈斌', pic: 'chenbin.png' }, - { name: '陈嘉', pic: 'chenjia.png' }, - { name: '陈津', pic: 'chenjin.png' }, - { name: '陈洋彬', pic: 'chenyangbin.png' }, - { name: '代波', pic: 'daibo.png' }, - { name: '董涛', pic: 'dongtao.png' }, - { name: '杜屹东', pic: 'duyidong.png' }, - { name: '范卿麟', pic: 'fanqinlin.png' }, - { name: '樊晓兵', pic: 'fanxiaobin.png' }, - { name: '郭洪伟', pic: 'guohongwei.png' }, - { name: '郭庆', pic: 'guoqing.png' }, - { name: '胡桓铭', pic: 'huhengming.png' }, - { name: '胡敏', pic: 'huming.png' }, - { name: '胡胜全', pic: 'hushengquan.png' }, - { name: '姜姜姜', pic: 'jiangjiang.png' }, - { name: '简念', pic: 'jiannian.png' }, - { name: '梁桐铭', pic: 'liangtongmin.png' }, - { name: '廖伟', pic: 'liaowei.png' }, - { name: '林水强', pic: 'linshuiqiang.png' }, - { name: '刘博', pic: 'liubo.png' }, - { name: '刘杰', pic: 'liujie.png' }, - { name: '刘洋河', pic: 'liuyanghe.png' }, - { name: '李万鹏', pic: 'liwanpeng.png' }, - { name: '龙佳文', pic: 'longjiawen.png' }, - { name: '卢林', pic: 'lulin.png' }, - { name: '吕靖', pic: 'lvjing.png' }, - { name: '吕彦', pic: 'lvyan.png' }, - { name: '毛玉峰', pic: 'maoyufeng.png' }, - { name: '潘越', pic: 'panyue.png' }, - { name: '钱晟龙', pic: 'qianshenglong.png' }, - { name: '卿粼波', pic: 'qinlinbo.png' }, - { name: '任远', pic: 'renyuan.png' }, - { name: '沈长锟', pic: 'shenchangkun.png' }, - { name: '水歌', pic: 'shuige.png' }, - { name: '苏龙', pic: 'sulong.png' }, - { name: '唐超', pic: 'tangchao.png' }, - { name: '田泱', pic: 'tianyang.png' }, - { name: '王蒙', pic: 'wangmeng.png' }, - { name: '闻其详', pic: 'wenqixiang.png' }, - { name: '吴浩麟', pic: 'wuhaolin.png' }, - { name: '徐孝增', pic: 'xuxiaozen.png' }, - { name: '杨鸿翼', pic: 'yanghongyi.png' }, - { name: '杨义天', pic: 'yangyitian.png' }, - { name: '叶小钗', pic: 'yexiaochai.png' }, - { name: '余泽江', pic: 'yuzejiang.png' }, - { name: '曾磊', pic: 'zenlei.png' }, - { name: '张瑞', pic: 'zhangrui.png' }, - { name: '张伟', pic: 'zhangwei.png' }, - { name: '赵芝明', pic: 'zhaozhiming.png' }, - ], - partners: [ - { pic: 'BBD.png', link: '' }, - { pic: 'baozun.png', link: 'http://www.baozun.com/' }, - { pic: 'coding.png', link: 'https://coding.net' }, - { pic: 'getui.png', link: 'https://www.getui.com' }, - { pic: 'jingrongguoji.png', link: '' }, - { pic: 'juejin.png', link: 'https://juejin.im' }, - { pic: 'shangxianle.png', link: 'https://www.sxl.cn/' }, - { pic: 'xiaoyang.png', link: '' }, - ], - organizers: [ - { name: '袁民成', pic: 'yuanmincheng.png', link: 'yuanmincheng' }, - { name: '姜玉珍', pic: 'jiangyuzhen.png', link: 'jiangyuzhen' }, - { name: '石垚', pic: 'shiyao.png', link: '' }, - { name: '何青松', pic: 'heqingsong.png', link: 'heqingsong' }, - { name: '张小白', pic: 'zhangxiaobai.png', link: '' }, - { name: '陈小山', pic: 'chenxiaoshan.png', link: '' }, - { name: '王波', pic: 'wangbo.png', link: '' }, - { name: '谢佳琦', pic: 'xiejiaqi.png', link: '' }, - { name: '余琦', pic: 'yuqi.png', link: '' }, - { name: '魏朝欣', pic: 'weichaoxin.png', link: '' }, - { name: '刘博', pic: 'liubo.png', link: '' }, - { name: '蓝浩', pic: 'lanhao.png', link: '' }, - { name: '尹婷', pic: 'yinting.png', link: '' }, - { name: '王杰', pic: 'wangjie.png', link: '' }, - { name: '蔡婷', pic: 'caiting.png', link: '' }, - { name: '陈灿彬', pic: 'chencanbin.png', link: '' }, - { name: '李宁川', pic: 'liningchuan.png', link: '' }, - { name: '刘南宾', pic: 'liunanbin.png', link: '' }, - { name: '冯博', pic: 'fengbo.png', link: '' }, - { name: '林东闻', pic: 'lindongwen.png', link: '' }, - { name: '刘倩玉', pic: 'qianyu.png', link: '' }, - { name: '王东', pic: 'wangdong.png', link: '' }, - { name: '曾昌强', pic: 'zengchangqiang.png', link: '' }, - { name: '郑梦雨', pic: 'zhengmengyu.png', link: '' }, - ], -}; - -export const chongqing: CityCommunityMeta = { - name: '重庆', - banner: 'chongqing.png', - website: 'https://freecodecamp-chongqing.github.io/', - wechat: '', - weibo: '', - github: 'https://github.com/FreeCodeCamp-Chongqing', - brief: [ - 'freeCodeCamp 重庆社区成立在第三届重庆前端交流大会上正式宣告成立,社区核心组织者有程江东,冯中梅,吴建军,满远荣,唐天强,张元英等,目前社区成员有120余人。', - 'freeCodeCamp 重庆社区成立第二天即举办了首次线下碰面会,快速确定了志愿者的分工形成自己独特的团队文化,并在中国国际智能产业博览会现场崭露头角,让更多人认识了freeCodeCamp,freeCodeCamp重庆社区链接人与技术,共创共赢,共建一个有爱有温度的技术社区。', - ], - speakers: [], - organizers: [ - { name: '冯中梅', pic: 'fengzhongmei.png', link: '' }, - { name: '刘东', pic: 'liudong.png', link: '' }, - { name: '满远荣', pic: 'manyuanrong.png', link: '' }, - { name: '唐友华', pic: 'tangyouhua.png', link: '' }, - { name: '朱晓鹏', pic: 'zhuxiaopeng.png', link: '' }, - ], - partners: [], -}; - -export const guangzhou: CityCommunityMeta = { - name: '广州', - banner: 'guangzhou.png', - website: 'https://freecodecamp-guangzhou.github.io/', - wechat: 'FCC_GuangZhou', - weibo: '', - github: 'https://github.com/FreeCodeCamp-Guangzhou', - brief: [ - 'freeCodeCamp 广州社区由梁彩仪发起,期间由程晓琳、吴亚楠接任,目前由伍裕平、梁莹接管负责全面对外接洽和组织活动,由伍裕平负责技术支持、梁莹负责对外合作和活动组织,线下社区成员共有480多人,并在不断增加中。', - '社区成立以来曾经组织过30多次活动,活动类型包括:结对编程、研bug会、技术分享会、技术沙龙。freeCodeCamp广州社区历届志愿者均致力于:用技术重新点亮广州这座千年老城。', - ], - organizers: [ - { name: '程晓琳', pic: 'chengxiaolin.png', link: '' }, - { name: '梁彩仪', pic: 'liangcaiyi.png', link: '' }, - { name: '吴亚楠', pic: 'wuyanan.png', link: '' }, - { name: '伍裕平', pic: 'wuyuping.png', link: '' }, - { name: 'Christy Leung 梁莹', pic: 'christyleung.png', link: '' }, - ], - speakers: [{ name: '魏朝欣', pic: 'weichaoxin.png', link: '' }], - partners: [], -}; - -export const hangzhou: CityCommunityMeta = { - name: '杭州', - banner: 'hangzhou.png', - website: 'https://fcchz.github.io/FCCHangZhou/', - wechat: 'TianXing_Community', - weibo: '', - github: 'https://github.com/FCCHZ', - brief: [], - speakers: [], - organizers: [ - { name: '陈杰', pic: 'chenjie.png', link: '' }, - { name: '黄金良', pic: 'huangjinliang.png', link: '' }, - { name: '李序锴', pic: 'lixukai.png', link: '' }, - ], - partners: [], -}; - -export const jinan: CityCommunityMeta = { - name: '济南', - banner: '', - website: '', - wechat: '', - weibo: '', - github: 'https://github.com/jinanfreeCodeCamp', - brief: [], - speakers: [], - organizers: [{ name: '王军', pic: 'wangjun.png', link: 'javascript;' }], - partners: [], -}; - -export const shanghai: CityCommunityMeta = { - name: '上海', - banner: 'shanghai.png', - website: 'https://freecodecamp-shanghai.github.io/', - wechat: 'FCCShangHai', - weibo: '', - github: 'https://github.com/FreeCodeCamp-Shanghai', - brief: [ - 'freeCodeCamp 上海社区拥有众多组织者,他们是:王皓、范弘琰、吴杨、潘娜娜、梁健、于益、陈天宇、唐小芳、龚雪薇、陶永。线下社区成员共有385人,并在不断增加之中。', - '社区成立以来共举办了3次30人左右的小型沙龙活动,以及2次100人左右的中型主题分享会,即freeCodeCamp上海四季分享会的夏季和秋季场。freeCodeCamp上海社区的目标是:为上海的互联网技术开发者提供一个可以进行交流的平台。', - ], - speakers: [], - organizers: [ - { name: '唐小芳', pic: 'tangxiaofang.png', link: '' }, - { name: '于航', pic: 'yuhang.png', link: '' }, - ], - partners: [], -}; - -export const shenzhen: CityCommunityMeta = { - name: '深圳', - banner: 'shenzhen.png', - website: 'https://freecodecamp-shenzhen.github.io/', - wechat: 'nixibuxisala', - weibo: '', - github: 'https://github.com/FreeCodeCamp-ShenZhen', - brief: [ - 'freeCodeCamp 深圳社区目前由陈志成和游首杰负责现阶段的整体运营工作。社区核心组织者有聂鹏程、钦潮、郑惠君、霍文艺、徐家俊等人。', - '社区成立以来共举办了10次100人左右的线下活动,以及3次大型主题分享会。从0到1,线下社区成员已有467人。深圳社区的主要目标和责任是做有趣有料的线下活动,目前深圳社区将会致力于发展 Coffee and Code 的形式,丰富线下编程学习的场景。', - ], - speakers: [], - organizers: [ - { name: '陈钦潮', pic: 'chenqinchao.png', link: '' }, - { name: '陈志成', pic: 'chenzhicheng.png', link: '' }, - { name: '游首杰', pic: 'youshoujie.png', link: '' }, - ], - partners: [], -}; - -export const tianjin: CityCommunityMeta = { - name: '天津', - banner: 'tianjin.png', - website: '', - wechat: '', - weibo: '', - github: '', - brief: [ - 'freeCodeCamp 天津社区现阶段拥有五名组织者:张烁、伊丽娜、刘柱、刘忆文、阚自强,和四名志愿者:宋佳欣、蔡文龙、付呈欣、王瑞。线下社区成员共323人。', - '社区成立以来共举办14次 Coffee and Code 活动和一次技术主题分享会。天津社区的目标和责任是:让天津的互联网技术氛围因有我的存在而有一点点不同。', - ], - speakers: [], - organizers: [ - { name: '阚自强', pic: 'kanziqiang.png', link: 'kanziqiang' }, - { name: '刘柱', pic: 'liuzhu.png', link: 'liuzhu' }, - { name: '伊丽娜', pic: 'yilina.png', link: 'yilina' }, - ], - partners: [], -}; - -export const wuhan: CityCommunityMeta = { - name: '武汉', - banner: 'wuhan.png', - website: '', - wechat: '', - weibo: '', - github: '', - brief: [ - 'freeCodeCamp 武汉社区目前由王川全面负责对外接洽、活动组织。社区核心志愿者有许志豪、王圣松等。线下社区成员有200余人,并在不断增加之中。', - '成立来,除了定期举办线下交流活动,给予大家的线下交流机会,线上也会带领大家参与诸如官网页面开发等实战项目。', - ], - speakers: [], - organizers: [ - { name: '王川', pic: 'wangchuan.png', link: '' }, - { name: '王圣松', pic: 'wangshengsong.png', link: '' }, - ], - partners: [], -}; - -export const xian: CityCommunityMeta = { - name: '西安', - banner: 'xian.png', - website: 'https://freecodecamp-xian.github.io/activity-network/', - wechat: 'gh_a964d2836db4', - weibo: '', - github: 'https://github.com/freeCodeCamp-XiAn', - brief: [ - 'freeCodeCamp 西安社区现阶段拥有多位组织者:张峰涛、薛开麒、罗铭、王晨宇、谷中仁、易海门,线下社区成员共计350余人。', - '在发起人韩亦乐的主导下,社区两年来已举办近十次线下技术交流活动和一场前端大会。freeCodeCamp西安社区将以开源、活动和招聘三大板块为发展重心,逐步搭建更完整的技术社区,服务更多的西安本土开发者、企业,努力让每一个社区成员能够在这里得到成长。', - ], - speakers: [], - organizers: [ - { name: '韩亦乐', pic: 'hanyile.png', link: '' }, - { name: '薛开麒', pic: 'xuekaiqi.png', link: '' }, - { name: '张峰涛', pic: 'zhangfengtao.png', link: '' }, - ], - partners: [], -}; - -export const zhengzhou: CityCommunityMeta = { - name: '郑州', - banner: 'zhengzhou.png', - website: 'https://freecodecamp-zhengzhou.github.io/', - wechat: '', - weibo: '', - github: 'https://github.com/FreeCodeCamp-Zhengzhou', - brief: [ - 'freeCodeCamp 郑州社区由石中玉发起并开始组织相关交流活动,核心组织成员有石中玉、徐启、张银龙。于2017年3月22日组织第一次线下沙龙,我们先后尝试了线上和线下分享相结合的方式来探索社区运营方式和思路。', - '我们致力于为热爱前端,热爱技术的小伙伴提供一个可以交流、学习的社群氛围,在让大家能力提升的同时,努力成为当地有温度的属于技术爱好者家门口的技术社区。', - ], - speakers: [], - organizers: [], - partners: [], -}; - -export const HongKong: CityCommunityMeta = { - name: '香港', - website: 'https://freecodecamphongkong.github.io/', - github: 'https://github.com/FreeCodeCampHongKong', -}; - -export const TaiWan: CityCommunityMeta = { - name: '台湾', - github: 'https://github.com/freeCodeCampTaiwan', -}; From bf4a7e13508aa10e674ccbe4d4c4b1d1ce8b4fbe Mon Sep 17 00:00:00 2001 From: luojiyin Date: Tue, 6 Aug 2024 18:23:15 +0800 Subject: [PATCH 6/9] i18n --- pages/volunteer.tsx | 11 ++++++++--- translation/en-US.ts | 4 ++++ translation/zh-CN.ts | 4 ++++ translation/zh-TW.ts | 4 ++++ 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/pages/volunteer.tsx b/pages/volunteer.tsx index b802421..e307be4 100644 --- a/pages/volunteer.tsx +++ b/pages/volunteer.tsx @@ -8,6 +8,9 @@ import { PageHead } from '../components/PageHead'; import { PersonCard } from '../components/PersonCard'; import { SectionTitle } from '../components/SectionTitle'; import { repositoryStore } from '../models/Repository'; +import { i18n } from '../models/Translation'; + +const { t } = i18n; export const getServerSideProps = compose(cache(), errorLogger, async () => { const contributors: Contributor[] = @@ -21,10 +24,12 @@ const Organizer: FC> = ({ contributors, }) => ( - -

志愿者

+ +

{t('volunteer')}

- 线上开源志愿者 + + {t('online_volunteer')} + Date: Tue, 6 Aug 2024 18:25:24 +0800 Subject: [PATCH 7/9] i18n --- components/data.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/data.ts b/components/data.ts index ccaa5f0..cd4c9e9 100644 --- a/components/data.ts +++ b/components/data.ts @@ -32,7 +32,7 @@ export const MainRoutes: () => Link[] = () => [ path: 'https://github.com/kaiyuanshe/OSS-toolbox', }, { - title: 'volunteer', + title: t('volunteer'), path: '/volunteer', }, ]; From 54916139af8a3447230c03fee9e64d4e342052c5 Mon Sep 17 00:00:00 2001 From: luojiyin Date: Tue, 6 Aug 2024 18:38:02 +0800 Subject: [PATCH 8/9] this.getAll is not a function --- pages/volunteer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/volunteer.tsx b/pages/volunteer.tsx index e307be4..8901e3f 100644 --- a/pages/volunteer.tsx +++ b/pages/volunteer.tsx @@ -15,7 +15,7 @@ const { t } = i18n; export const getServerSideProps = compose(cache(), errorLogger, async () => { const contributors: Contributor[] = // @ts-ignore - await new repositoryStore('kaiyuanshe').getAllContributors(); + await repositoryStore.getAllContributors(); return { props: { contributors } }; }); From ff21c85031912539033bc41a84c122d80c560fb0 Mon Sep 17 00:00:00 2001 From: luojiyin Date: Tue, 6 Aug 2024 20:12:59 +0800 Subject: [PATCH 9/9] fix from review --- pages/volunteer.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/pages/volunteer.tsx b/pages/volunteer.tsx index 8901e3f..6e5a59e 100644 --- a/pages/volunteer.tsx +++ b/pages/volunteer.tsx @@ -14,9 +14,7 @@ const { t } = i18n; export const getServerSideProps = compose(cache(), errorLogger, async () => { const contributors: Contributor[] = - // @ts-ignore await repositoryStore.getAllContributors(); - return { props: { contributors } }; });