Skip to content

Commit e2b67b4

Browse files
committed
[add] Requirement Evaluation pages
[optimize] Service entries in Home page
1 parent 4265c05 commit e2b67b4

File tree

9 files changed

+197
-34
lines changed

9 files changed

+197
-34
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"dependencies": {
1010
"@emotion/react": "^11.14.0",
1111
"@emotion/styled": "^11.14.0",
12+
"@giscus/react": "^3.1.0",
1213
"@mui/lab": "6.0.0-beta.30",
1314
"@mui/material": "^6.4.7",
1415
"@sentry/nextjs": "^9.5.0",

pages/api/home.ts

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,24 @@ export const service = () => [
44
{
55
icon: 'trending_up',
66
title: t('IT_transformation_consulting'),
7-
summary: t('IT_transformation_consulting_summary')
7+
summary: t('IT_transformation_consulting_summary'),
8+
buttonText: t('read_resolution'),
9+
buttonLink: 'https://idea2app.feishu.cn/wiki/RsCvwrpXPimCpRkjpsAcWl2rnJd',
810
},
911
{
1012
icon: 'code',
1113
title: t('custom_software_development'),
1214
summary: t('custom_software_development_summary'),
1315
buttonText: t('consult_immediately'),
14-
buttonLink: 'https://wenjuan.feishu.cn/m?t=sBih7Nzwkwqi-0l12'
16+
buttonLink: '/requirement',
1517
},
1618
{
1719
icon: 'diversity_3',
1820
title: t('agile_team_training'),
19-
summary: t('agile_team_training_summary')
20-
}
21+
summary: t('agile_team_training_summary'),
22+
buttonText: t('read_tutorial'),
23+
buttonLink: 'https://idea2app.feishu.cn/wiki/B956wLo7wilMClkaFsScDL7DnwM',
24+
},
2125
];
2226

2327
export const PARTNERS_INFO = () => [
@@ -26,47 +30,47 @@ export const PARTNERS_INFO = () => [
2630
logoDark: '/aiux-dark.png',
2731
name: t('partner_aiux'),
2832
address: 'https://www.aiuxdesign.com/',
29-
summary: t('partner_aiux_slogan')
33+
summary: t('partner_aiux_slogan'),
3034
},
3135

3236
{
3337
logo: '/23-5.png',
3438
logoDark: '/23-5-dark.png',
3539
name: t('partner_23_5'),
3640
address: 'https://www.in235.com/',
37-
summary: t('partner_23_5_slogan')
41+
summary: t('partner_23_5_slogan'),
3842
},
3943
{
4044
logo: '/fcc-cdg.png',
4145
name: t('partner_fcc_cdg'),
4246
address: 'https://fcc-cd.dev/',
43-
summary: t('partner_fcc_cdg_slogan')
47+
summary: t('partner_fcc_cdg_slogan'),
4448
},
4549

4650
{
4751
logo: '/ic-naming.svg',
4852
name: t('partner_ic_naming'),
4953
address: 'https://icnaming.com/',
50-
summary: t('partner_ic_naming_slogan')
54+
summary: t('partner_ic_naming_slogan'),
5155
},
5256

5357
{
5458
logo: '/creator-1024.png',
5559
logoDark: '/creator-1024-dark.png',
5660
name: t('partner_creator_1024'),
5761
address: 'https://github.com/Creator-1024',
58-
summary: t('partner_creator_1024_slogan')
62+
summary: t('partner_creator_1024_slogan'),
5963
},
6064
{
6165
logo: '/kys.png',
6266
name: t('partner_kys'),
6367
address: 'https://kaiyuanshe.cn/',
64-
summary: t('partner_kys_slogan')
68+
summary: t('partner_kys_slogan'),
6569
},
6670
{
6771
logo: '/eth-planet.png',
6872
name: t('partner_eth_planet'),
6973
address: 'https://x.com/ethplanet/',
70-
summary: t('partner_eth_planet_slogan')
71-
}
74+
summary: t('partner_eth_planet_slogan'),
75+
},
7276
];

pages/index.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Masonry from '@mui/lab/Masonry';
2+
import { Button } from '@mui/material';
23
import { GitRepository } from 'mobx-github';
34
import { observer } from 'mobx-react';
45
import { compose, errorLogger, translator } from 'next-ssr-middleware';
@@ -52,20 +53,11 @@ const HomePage: FC<HomePageProps> = observer(({ repositories, members }) => (
5253
<p>{t('idea2app_slogan')}</p>
5354

5455
<p className="my-4 text-neutral-500">{t('idea2app_slogan_2')}?</p>
55-
56-
<a
57-
className="border-b-2 border-b-black py-1 dark:border-b-white"
58-
href="https://wenjuan.feishu.cn/m?t=sBih7Nzwkwqi-0l12"
59-
target="_blank"
60-
rel="noopener noreferrer"
61-
>
62-
{t('contact_us')}
63-
</a>
6456
</header>
6557
</div>
6658

6759
<ul className="grid grid-cols-1 gap-4 sm:grid-cols-3">
68-
{service().map(({ title, summary, icon }) => (
60+
{service().map(({ title, summary, icon, buttonText, buttonLink }) => (
6961
<li
7062
key={title}
7163
className="elevation-1 hover:elevation-8 flex flex-col gap-4 rounded-3xl border p-4 dark:border-0"
@@ -76,6 +68,14 @@ const HomePage: FC<HomePageProps> = observer(({ repositories, members }) => (
7668
</h5>
7769

7870
<p>{summary}</p>
71+
72+
<Button
73+
variant="contained"
74+
href={buttonLink}
75+
target={buttonLink.startsWith('http') ? '_blank' : undefined}
76+
>
77+
{buttonText}
78+
</Button>
7979
</li>
8080
))}
8181
</ul>

pages/requirement/[title].tsx

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import Giscus from '@giscus/react';
2+
import { Alert } from '@mui/material';
3+
import { observer } from 'mobx-react';
4+
import { NextPage } from 'next';
5+
import { compose, RouteProps, router, translator } from 'next-ssr-middleware';
6+
7+
import { PageHead } from '../../components/PageHead';
8+
import { i18n, t } from '../../models/Translation';
9+
10+
export const getServerSideProps = compose(router, translator(i18n));
11+
12+
const RequirementDetailPage: NextPage<RouteProps<{ title: string }>> = observer(
13+
({ route: { params } }) => {
14+
const title = `${params!.title} - ${t('AI_requirement_evaluation')}`;
15+
16+
return (
17+
<div className="container mx-auto flex max-w-(--breakpoint-xl) flex-col gap-4 px-4 pt-16 pb-6">
18+
<PageHead title={title}>
19+
<meta property="og:title" content={params!.title} />
20+
</PageHead>
21+
22+
<h1 className="py-10 text-center text-5xl">{title}</h1>
23+
24+
<Alert severity="warning">
25+
<span dangerouslySetInnerHTML={{ __html: t('information_security_alert') }} />
26+
</Alert>
27+
28+
<Giscus
29+
repo="idea2app/.github"
30+
repoId="R_kgDOOHPqjQ"
31+
category="Ideas"
32+
categoryId="DIC_kwDOOHPqjc4Cn5sg"
33+
mapping="og:title"
34+
emitMetadata="1"
35+
lang={i18n.currentLanguage}
36+
/>
37+
</div>
38+
);
39+
},
40+
);
41+
42+
export default RequirementDetailPage;

pages/requirement/index.tsx

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { Button, TextField } from '@mui/material';
2+
import { observer } from 'mobx-react';
3+
import { NextPage } from 'next';
4+
import { compose, translator } from 'next-ssr-middleware';
5+
import { formToJSON } from 'web-utility';
6+
7+
import { PageHead } from '../../components/PageHead';
8+
import { i18n, t } from '../../models/Translation';
9+
10+
export const getServerSideProps = compose(translator(i18n));
11+
12+
const RequirementEntryPage: NextPage = observer(() => (
13+
<form
14+
className="container mx-auto flex max-w-max flex-col gap-4 px-4 pt-16 pb-6"
15+
onSubmit={event => {
16+
event.preventDefault();
17+
18+
const { title } = formToJSON<{ title: string }>(event.currentTarget);
19+
20+
location.href += `/${title}`;
21+
}}
22+
>
23+
<PageHead title={t('AI_requirement_evaluation')} />
24+
25+
<h1 className="py-10 text-center text-6xl">{t('AI_requirement_evaluation')}</h1>
26+
27+
<TextField label={t('project_name')} name="title" required defaultValue="动物保护平台" />
28+
29+
<Button variant="contained" size="large" type="submit">
30+
{t('AI_requirement_evaluation')}
31+
</Button>
32+
</form>
33+
));
34+
35+
export default RequirementEntryPage;

pnpm-lock.yaml

Lines changed: 59 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

translation/en-US.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ export default {
88
IT_transformation_consulting: 'IT transformation consulting',
99
IT_transformation_consulting_summary:
1010
'Help you sort out business processes, discover the pain points of Improving Efficiency & Reducing Costs", and tailor IT Transformation solutions',
11+
read_resolution: 'Read resolution',
1112
custom_software_development: 'Custom software development',
1213
custom_software_development_summary:
1314
'Front-line engineers efficiently deliver Software systems based on Industry-leading technologies, allowing you to spend your money wisely',
15+
consult_immediately: 'Consult immediately',
1416
agile_team_training: 'Agile team training',
1517
agile_team_training_summary:
1618
'Face-to-face with your technical team to learn Agile Development methodology from practice, and grow into a reliable and efficient Modern Engineering Team',
17-
consult_immediately: 'Consult immediately',
19+
read_tutorial: 'Read tutorial',
1820
latest_projects: 'Latest projects',
1921
welcome_to: 'Welcome to',
2022
get_started_by_editing: 'Get started by editing',
@@ -64,5 +66,11 @@ export default {
6466

6567
// Open source project
6668
load_more: 'Load more...',
67-
no_more: 'No more'
69+
no_more: 'No more',
70+
71+
// Requirement Evaluation
72+
AI_requirement_evaluation: '🤖 Requirement Evaluation',
73+
information_security_alert:
74+
'This service is free of charge, but only accepts <strong>publicly available information</strong> related to estimation.',
75+
project_name: 'Project Name',
6876
} as const;

0 commit comments

Comments
 (0)