Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 1c72450

Browse files
committed
chore(deploy): footer links/metric re-org
1 parent 0064630 commit 1c72450

File tree

27 files changed

+188
-164
lines changed

27 files changed

+188
-164
lines changed

.huskyrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"hooks": {
3+
"pre-commit": "pretty-quick --staged && npm run lint:staged",
34
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
45
}
56
}

config/config.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,7 @@
6060
"ISSUE_ADDR": "https://github.com/coderplanets/coderplanets_web/issues",
6161
"MENTION_USER_ADDR": "https://coderplanets.com/users/",
6262
"//--- contact configs ---//": "",
63-
"EMAIL_CLUB": "club@group.coderplanets.com",
64-
"EMAIL_SUPPORT": "support@group.coderplanets.com",
65-
"EMAIL_HELLO": "hello@group.coderplanets.com",
66-
"EMAIL_BUSINESS": "business@group.coderplanets.com",
63+
"EMAIL_SUPPORT": "coderplanets@outlook.com",
6764
"// GRAPHQL_ENDPOINT": "https://api.coderplanets.com/graphiql",
6865
"BUILD_VERSION": "v0.8.2",
6966
"// 1000 * 60 * 10 = 10 mins": "",

config/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ export const {
3535
GITHUB_CPS_TEAM,
3636
ISSUE_ADDR,
3737
MENTION_USER_ADDR,
38-
EMAIL_CLUB,
3938
EMAIL_SUPPORT,
40-
EMAIL_HELLO,
41-
EMAIL_BUSINESS,
4239
BUILD_VERSION,
4340
} = CONFIG

src/containers/tool/JoinModal/Groups.tsx

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { FC, useState } from 'react'
22

3+
import Linker from '@/widgets/Linker'
4+
35
import Footer from './Footer'
46
import {
57
Wrapper,
@@ -30,15 +32,25 @@ export const INGroup: FC<TProps> = ({ qr }) => {
3032
本群内<Focus>仅限于</Focus>讨论和「CoderPlanets」相关的话题。
3133
</LI>
3234
<LI>
33-
除自我介绍外,在本群内<Focus>摸鱼吹水等同于自我退群声明</Focus>
35+
除可选的自我介绍外,在本群内
36+
<Focus>摸鱼吹水等同于自我退群声明</Focus>
3437
</LI>
3538
<LI>
36-
本群<Focus>不欢迎潜水</Focus>
37-
,每月会不定期清理潜水人员以保持低水位,请确保你对本社区有持续的兴趣
39+
本群<Focus>不欢迎潜水员</Focus>
40+
,每月会不定期清理潜水人员以保持低水位,请确保你对社区建设本身有持续的兴趣
3841
</LI>
3942
<LI>
4043
群内有价值的内容会<Focus>定期同步</Focus>
41-
到反馈建议子社区,你不会因为不在群里而错过任何有价值的内容。
44+
45+
<Linker
46+
src="/feedback"
47+
external={false}
48+
text="反馈建议子社区"
49+
inline
50+
left={4}
51+
right={4}
52+
/>
53+
,你不会因为不在群里而错过任何有价值的内容。
4254
</LI>
4355
</UL>
4456
</DescWrapper>
@@ -64,10 +76,11 @@ export const RGroup: FC<TProps> = ({ qr }) => {
6476
讨论信息(源)搜集等「雷达」相关的话题。
6577
</LI>
6678
<LI>
67-
除自我介绍外,在本群内<Focus>摸鱼吹水等同于自我退群声明</Focus>
79+
除可选的自我介绍外,在本群内
80+
<Focus>摸鱼吹水等同于自我退群声明</Focus>
6881
</LI>
6982
<LI>
70-
本群<Focus>不欢迎潜水</Focus>
83+
本群<Focus>不欢迎潜水员</Focus>
7184
,每月会不定期清理潜水人员以保持低水位,请确保你对本社区有持续的兴趣。
7285
</LI>
7386
<LI>

src/containers/tool/JoinModal/styles/groups.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ export const LI = styled.li`
4141
export const Focus = styled.span`
4242
color: ${theme('thread.articleTitle')};
4343
font-size: 14px;
44-
margin-left: 3px;
45-
margin-right: 3px;
44+
margin-left: 1px;
45+
margin-right: 1px;
4646
`

src/containers/unit/Footer/ContactList.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { FC, memo } from 'react'
22

3-
import { ICON_CMD, EMAIL_SUPPORT } from '@/config'
3+
import { GITHUB, ICON_CMD, EMAIL_SUPPORT } from '@/config'
44
import { joinUS } from '@/utils/helper'
55

66
import { Wrapper, Item, Icon } from './styles/contact_list'
@@ -17,11 +17,7 @@ const SocialList: FC = () => (
1717
<Icon src={`${ICON_CMD}/footer_weixin.svg`} />
1818
</Item>
1919

20-
<a
21-
href="https://github.com/coderplanets/"
22-
rel="noopener noreferrer"
23-
target="_blank"
24-
>
20+
<a href={`${GITHUB}`} rel="noopener noreferrer" target="_blank">
2521
<Item>
2622
<Icon src={`${ICON_CMD}/github.svg`} />
2723
</Item>

src/containers/unit/Footer/DesktopView/ArticleLayout.tsx

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
/* eslint-disable jsx-a11y/accessible-emoji */
12
import { FC, memo } from 'react'
23

4+
import Link from 'next/link'
5+
36
import type { TArticle, TC11NLayout, TMetric } from '@/spec'
4-
import { ISSUE_ADDR, GITHUB, API_SERVER_ADDR } from '@/config'
5-
import { METRIC } from '@/constant'
7+
import { GITHUB } from '@/config'
8+
import { METRIC, ROUTE } from '@/constant'
69
import { joinUS } from '@/utils/helper'
710

811
import TopInfo from './TopInfo'
@@ -30,34 +33,23 @@ const BriefView: FC<TProps> = ({ metric, article, layout }) => {
3033
<TopInfo metric={METRIC.ARTICLE} article={article} noBottomBorder />
3134
<MainInfos>
3235
<BaseInfo>
33-
<Item href="/home/post/1" rel="noopener noreferrer" target="_blank">
34-
关于
35-
</Item>
36-
<Item
37-
href="/cps-support/posts"
38-
rel="noopener noreferrer"
39-
target="_blank"
40-
>
41-
创建社区
42-
</Item>
36+
<Link href="/home/post/1" passHref>
37+
<Item>关于</Item>
38+
</Link>
39+
40+
<Link href={`/${ROUTE.APPLY_COMMUNITY}`} passHref>
41+
<Item>创建社区</Item>
42+
</Link>
4343
<NoLinkItem onClick={() => joinUS()}>加入群聊</NoLinkItem>
4444
<Item href={`${GITHUB}`} rel="noopener noreferrer" target="_blank">
4545
Github
4646
</Item>
47-
<Item
48-
href={`${API_SERVER_ADDR}`}
49-
rel="noopener noreferrer"
50-
target="_blank"
51-
>
52-
特别感谢
53-
</Item>
54-
<Item
55-
href={`${ISSUE_ADDR}`}
56-
rel="noopener noreferrer"
57-
target="_blank"
58-
>
59-
反馈与建议
60-
</Item>
47+
<Link href={`/${ROUTE.SPONSOR}`} passHref>
48+
<Item>❤️&nbsp;特别感谢</Item>
49+
</Link>
50+
<Link href="/feedback" passHref>
51+
<Item>反馈与建议</Item>
52+
</Link>
6153
</BaseInfo>
6254
</MainInfos>
6355
</InnerWrapper>

src/containers/unit/Footer/DesktopView/GeneralLayout.tsx

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
/* eslint-disable jsx-a11y/accessible-emoji */
12
import { FC, memo } from 'react'
23

4+
import Link from 'next/link'
35
import type { TMetric } from '@/spec'
4-
import { ISSUE_ADDR, API_SERVER_ADDR, GITHUB } from '@/config'
6+
import { ICON, GITHUB } from '@/config'
7+
import { ROUTE } from '@/constant'
58
import { joinUS } from '@/utils/helper'
69

710
import TopInfo from './TopInfo'
@@ -14,47 +17,40 @@ import {
1417
BaseInfo,
1518
Item,
1619
NoLinkItem,
20+
HeartCrabIcon,
1721
} from '../styles/desktop_view/general_layout'
1822

1923
type TProps = {
2024
metric: TMetric
25+
title?: string
2126
}
2227

23-
const GeneralLayout: FC<TProps> = ({ metric }) => {
28+
const GeneralLayout: FC<TProps> = ({ metric, title = '' }) => {
2429
return (
2530
<Wrapper>
26-
<InnerWrapper>
27-
<TopInfo metric={metric} noBottomBorder />
31+
<InnerWrapper metric={metric}>
32+
<TopInfo metric={metric} title={title} noBottomBorder />
2833
<MainInfos>
2934
<BaseInfo>
30-
<Item href="/home/post/1" rel="noopener noreferrer" target="_blank">
31-
关于
32-
</Item>
33-
<Item
34-
href="/cps-support/posts"
35-
rel="noopener noreferrer"
36-
target="_blank"
37-
>
38-
创建社区
39-
</Item>
35+
<Link href="/home/post/1" passHref>
36+
<Item>关于</Item>
37+
</Link>
38+
<Link href={`/${ROUTE.APPLY_COMMUNITY}`} passHref>
39+
<Item>创建社区</Item>
40+
</Link>
4041
<NoLinkItem onClick={() => joinUS()}>加入群聊</NoLinkItem>
4142
<Item href={`${GITHUB}`} rel="noopener noreferrer" target="_blank">
4243
Github
4344
</Item>
44-
<Item
45-
href={`${API_SERVER_ADDR}`}
46-
rel="noopener noreferrer"
47-
target="_blank"
48-
>
49-
特别感谢
50-
</Item>
51-
<Item
52-
href={`${ISSUE_ADDR}`}
53-
rel="noopener noreferrer"
54-
target="_blank"
55-
>
56-
反馈与建议
57-
</Item>
45+
<Link href="/feedback" passHref>
46+
<Item>反馈 &amp; 建议</Item>
47+
</Link>
48+
<Link href={`/${ROUTE.SPONSOR}`} passHref>
49+
<Item>
50+
<HeartCrabIcon src={`${ICON}/emotion/heart.png`} noLazy />
51+
特别感谢
52+
</Item>
53+
</Link>
5854
</BaseInfo>
5955
</MainInfos>
6056
</InnerWrapper>

src/containers/unit/Footer/DesktopView/HomeLayout.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { FC, memo } from 'react'
22
import { useTheme } from 'styled-components'
33

44
import type { TThemeMap, TC11NLayout, TMetric } from '@/spec'
5-
import { GITHUB, API_SERVER_ADDR, ISSUE_ADDR, BUILD_VERSION } from '@/config'
5+
import { GITHUB, BUILD_VERSION } from '@/config'
66
import { ROUTE } from '@/constant'
77
import { siteBirthDay } from '@/utils/helper'
88

@@ -42,22 +42,22 @@ const HomeView: FC<TProps> = ({ metric, layout }) => {
4242
<Column>
4343
<Title>网站地图</Title>
4444
<Body>
45-
<LinkItem href="/home/post/1" {...linkColors}>
45+
<LinkItem href={`${ROUTE.EXPLORE}`} {...linkColors}>
4646
子社区
4747
</LinkItem>
48-
<LinkItem href={`${ISSUE_ADDR}`} {...linkColors}>
48+
<LinkItem href={`${ROUTE.WORKS}`} {...linkColors}>
4949
作品集市
5050
</LinkItem>
51-
<LinkItem href="https://github.com/coderplanets" {...linkColors}>
51+
<LinkItem href={`${ROUTE.COOL_GUIDE}`} {...linkColors}>
5252
酷导航
5353
</LinkItem>
54-
<LinkItem href="/cps-support/posts" {...linkColors}>
54+
<LinkItem href={`${ROUTE.HAVE_A_DRINK}`} {...linkColors}>
5555
来一杯
5656
</LinkItem>
57-
<LinkItem href={`${ROUTE.SUPPORT_US}`} {...linkColors}>
57+
<LinkItem href={`${ROUTE.MEETUPS}`} {...linkColors}>
5858
小聚
5959
</LinkItem>
60-
<LinkItem href={`${ROUTE.SUPPORT_US}`} {...linkColors}>
60+
<LinkItem href="/makers" {...linkColors}>
6161
Makers
6262
</LinkItem>
6363
</Body>
@@ -90,16 +90,16 @@ const HomeView: FC<TProps> = ({ metric, layout }) => {
9090
<Item as="span" normal>
9191
开发计划
9292
</Item>
93-
<LinkItem href="/cps-support/post/42" {...linkColors}>
93+
<LinkItem href="/feedback" {...linkColors}>
9494
文档中心
9595
</LinkItem>
9696
<LinkItem href={`${GITHUB}`} {...linkColors}>
9797
技术栈
9898
</LinkItem>
99-
<LinkItem href={`${API_SERVER_ADDR}`} {...linkColors}>
99+
<LinkItem href={`${GITHUB}`} {...linkColors}>
100100
API
101101
</LinkItem>
102-
<LinkItem href={`${API_SERVER_ADDR}`} {...linkColors}>
102+
<LinkItem href={`${GITHUB}`} {...linkColors}>
103103
Github
104104
</LinkItem>
105105
</Body>

src/containers/unit/Footer/DesktopView/TopInfo/Article.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
import { FC, memo } from 'react'
22
import Link from 'next/link'
33

4-
import { ICON } from '@/config'
4+
import BlinkCursor from '@/widgets/BlinkCursor'
55
import type { TProps as TTopInfoProps } from './index'
66

77
import {
88
Wrapper,
99
InfoBar,
1010
CommunityTitle,
1111
ArticleTitle,
12-
ArrowDividerIcon,
1312
Logo,
1413
} from '../../styles/desktop_view/top_info/article'
1514

@@ -23,11 +22,10 @@ const Article: FC<TProps> = ({ article, noBottomBorder = false }) => {
2322
<InfoBar>
2423
<Logo />
2524
</InfoBar>
26-
<ArrowDividerIcon src={`${ICON}/shape/arrow-simple.svg`} />
2725
<Link href={`/${originalCommunity.raw}`} passHref>
2826
<CommunityTitle as="a">{originalCommunity.title}</CommunityTitle>
2927
</Link>
30-
<ArrowDividerIcon src={`${ICON}/shape/arrow-simple.svg`} />
28+
<BlinkCursor />
3129
<ArticleTitle>{title}</ArticleTitle>
3230
</Wrapper>
3331
)

0 commit comments

Comments
 (0)