Code Monkey home page Code Monkey logo

kaiyuanshe.github.io's Issues

Integrate with Travis CI

Kaiyuanshe members(not the dev team) will send out new content/pages in MD format via PR. We need a tool like Travis CI to automatically convert MD to html files

新模块:大会日程安排

一个类似于 sched 的大会日程安排的展示、订阅、提醒项目。

目前的设想如下:

  • 会议组织者:发布/管理大会日程
  • 访客:查看日程,筛选日程
  • 注册会员:订阅日程,获得订阅的日历(CalDAV)

活动文章日历

界面参考

https://kaiyuanshe.github.io/#Activity

基础组件

idea2app/Idea-React#35

核心需求

开源文库中所有含“活动”标签的文章显示在日历视图中。

参考代码

数据查询

makeFilter({ position, passed, ...filter }: NewData<Personnel>) {
const { currentYear } = this;
return [
currentYear && `CurrentValue.[createdAt]>=TODATE("${currentYear}-01-01")`,
currentYear && `CurrentValue.[createdAt]<=TODATE("${currentYear}-12-31")`,
position && makeSimpleFilter({ position }, '=', 'OR'),
passed && `CurrentValue.[passed]=${passed}`,
!isEmpty(filter) && makeSimpleFilter(filter),
]
.filter(Boolean)
.join('&&');
}

在 main 分支中运行 `npm build ` 报 `Type error: 'MainNav' cannot be used as a JSX component.`

git hash 4d22352
具体报错信息

./pages/_app.tsx:21:8
Type error: 'MainNav' cannot be used as a JSX component.
  Its element type 'ReactElement<any, any> | Component<ExcludeRouterProps<MainNavProps>, any, any> | null' is not a valid JSX element.
    Type 'Component<ExcludeRouterProps<MainNavProps>, any, any>' is not assignable to type 'Element | ElementClass | null'.
      Type 'Component<ExcludeRouterProps<MainNavProps>, any, any>' is not assignable to type 'ElementClass'.
        The types returned by 'render()' are incompatible between these types.
          Type 'React.ReactNode' is not assignable to type 'import("/home/luo/nodeWork/kaiyuanshe.github.io/node_modules/@types/react-transition-group/node_modules/@types/react/index").ReactNode'.
            Type '{}' is not assignable to type 'ReactNode'.

  19 |       </Head>
  20 |
> 21 |       <MainNav title={Name} logo={Logo} links={MainRoutes} />
     |        ^
  22 |
  23 |       <div className="mt-5 pt-4">
  24 |         <Component {...pageProps} />
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

添加 KToken 前端主页

KToken 项目需要一个前端页面,其主要功能包括:

  1. 展示所有人的积分
  2. 展示排名
  3. 用户可以连接自己的钱包,查看所有相关交易
  4. 保留领取NFT的空间

image

议题详情页

竞品

https://coscup.org/2019/programs/b6545d0f-42de-4b72-83c0-35bf8fba92be

旧版

任务

代码

页面

https://github.com/kaiyuanshe/PWA/blob/ab4ec1bfb360a0f90c18631f446b198236aff9da/src/page/Activity/AgendaDetail.tsx

日历

hexo.extend.helper.register(
'eventOf',
(title, description, start, end, location) => {
const event = new VEvent();
event.setSummary(title);
event.setDescription(description);
event.setDate(new Date(start), new Date(end));
event.setLocation(location);
return event;
}
);

参考

https://github.com/kaiyuanshe/kaiyuanshe.github.io/blob/11caced6bb23286b04203118edefe995743af299/pages/article/%5Bid%5D/index.tsx

合作伙伴页

原始数据

https://kaiyuanshe.feishu.cn/base/bascnUAyhKLADcw3HyNW5OefrMd?table=tbldaVidMHzV9Vo2&view=vewLJAh7R6

参考代码

const biTable = await lark.getBITable(LARK_BITABLE_ID);
const table = await biTable.getTable<Organization>(
LARK_BITABLE_TABLE_ID,
),
{ page_size, page_token, ...filter } = parseURLData(
url!,
) as DataObject;
const { body } = await lark.client.get<TableRecordList<Organization>>(
`${table!.baseURI}/records?${buildURLData({
page_size,
page_token,
filter: makeFilter({ ...filter, verified: '是' }),
})}`,
);
response.json(body!.data);

活动列表页

界面参考

https://web-conf.dev/

数据后端

https://kaiyuanshe.feishu.cn/base/bascnUAyhKLADcw3HyNW5OefrMd?table=tbluBkyvww3w36jN&view=vewkcfQZ6X

代码参考

首页列表

<section className="text-center">
<h2 className="my-5 text-primary">自研开源项目</h2>
<Row
as="ul"
className="list-unstyled mx-0 g-5 justify-content-center"
xs={2}
sm={2}
md={4}
>
{projects.map(this.renderProject)}
</Row>
</section>

列表专页

https://github.com/kaiyuanshe/OpenHackathon-Web/blob/8426e23b9d0e8b3e2c3b0fa685493a6b6d79c6b6/pages/activity/index.tsx

**开源地图类别或领域标签列置顶

能否将这些标签列在地图的最上方(或是地图下方第一行),如此浏览者可以直接选取类别或领域,而无需滚动屏幕向下寻找适用的标签。

研究md转换到html的机制

研究可选方案:

  • Github官方是否有比较好的工具
  • 第三方工具
  • 可考虑集成travis CI完成自动转换

除此之外,也可以考虑不用md格式

成员列表页 服务端渲染

需迁移代码

async componentDidMount() {
const list = await membersStore.getList({}, 1, 300);
const otherMembersList: Member[] = [];
const projectKey = '项目委员会';
const departmentKey = '执行委员会';
let membersGroup: any = {
理事会: { list: [] },
顾问委员会: { list: [] },
法律咨询委员会: { list: [] },
执行委员会: { list: [], tabs: {}, count: 0 },
项目委员会: { list: [], tabs: {}, count: 0 },
};
for (const member of list) {
//Classify the organization of kaiyuanshe | 一级部门分组 👇
groupMemberFn(membersGroup, member.organization as string[], member);
//Classify the department of kaiyuanshe | 工作组分组 👇
groupMemberFn(
membersGroup[departmentKey].tabs,
member.department as string[],
member,
);
member.department && membersGroup[departmentKey].count++;
//Classify the projectKey of kaiyuanshe | 项目分组👇
groupMemberFn(
membersGroup[projectKey].tabs,
member.project as string[],
member,
);
if (member.project) membersGroup[projectKey].count++;
//Classify the OtherMember of kaiyuanshe | 其他未分组用户 👇
if (!member.organization && !member.department && !member.project)
otherMembersList.push(member);
}
// Updata
this.membersGroup = membersGroup;
this.otherMembersList = otherMembersList;
}

参考代码

逻辑封装

https://github.com/kaiyuanshe/OpenHackathon-Web/blob/3bd9edec5a71e21c446514bd352be83427ea549e/models/Enrollment.ts#L80-L111

接口封装

const statistic = cache(async () => {
const biTable = await lark.getBITable(LARK_BITABLE_ID);
const table = await biTable.getTable<Activity>(LARK_BITABLE_ACTIVITY_ID);
const list = await table!.getAllRecords();
return { city: countBy(list, 'city') };
}, 'Activity Statistic');
export type ActivityStatistic = Record<'city', Record<string, number>>;
export default safeAPI(
async ({ method }, response: NextApiResponse<ActivityStatistic>) => {
switch (method) {
case 'GET': {
response.send(await statistic());
}
}
},
);

English Translation

Hello,

I just listened to the lightning talk about this conference at the FOSSASIA 2022 summit.
https://eventyay.com/e/6b901f56
I am interested in this conference but I can not speak Chinese yet. I am sorry. I wonder when the English translation will be available on the website. Is there anything we can do for that? I fear I might not be able to help though as I can not speak or read Chinese. I see the web page has a language button. This seems to only provide Chinese event when I click on English.

Kind regards,
Nicco Kunzmann

**开源地图标签增添新的分类

除了技术领域之外,还能增添别的分类吗?例如:

  • 地区/城市
  • 组织形态(如基金会、综合社区、垂直技术社区、行业协会、企业社区、媒体社区、用户组 UG...)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.